~1000 redundant lines removed from mak/WINDOWS#3024
~1000 redundant lines removed from mak/WINDOWS#3024denizzzka wants to merge 5 commits intodlang:masterfrom
Conversation
|
Thanks for your pull request and interest in making D better, @denizzzka! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + druntime#3024" |
thewilsonator
left a comment
There was a problem hiding this comment.
Looks great, ping me when its good.
|
Looks like the right direction, however I'd ping some people that are familiar with this build system before merging. Also can we not add more top-level file ? Put them in |
I suggest first to decide exactly where to move it. Because it looks like ./mak/ directory is for makefiles strictly. |
|
@thewilsonator ping :-) |
|
Please put those |
|
@thewilsonator done! |
| set WORKING_DIR=%cd% | ||
| set ROUTINE=%cd%\mak\wroutine.bat | ||
|
|
||
| C:\Windows\System32\forfiles.exe /p %PATH% /m %MASK% /s /c "cmd /c %ROUTINE% @RELPATH" |
There was a problem hiding this comment.
Don't use the absolute path here. I would expect c:\Windows\System32 to be in PATH. Even if not, c:\Windows is not guaranteed to be the installation path, %windir% contains it.
There was a problem hiding this comment.
At first I tried it without full path, but it works only in local console, but not in .bat files. I don't know why. If you can please fix it.
|
@thewilsonator : I explicitly asked to ping people familiar with the build system before mindlessly merging this. For example, doing a bit of CC @rainers . |
|
If we use wildcard processing, why not just use xcopy? Does anyone remember what's special about the modules in the core/sync folder? The generated di files still contain platform specific code (the ctors are not reduced to the declaration !?), so why are they not simply copied aswell? |
|
@rainers I just replaced lines of code by same but generated. I have no idea why it was implemented by this way.
Ditto. This PR changes nothing except replace of tons of copy-pasted code. (I did this PR not because I suddenly decided to fall in love with Windows :-) But because this huge mak/WINDOWS file prevents me from making other changes that aren't related to Windows.) |
|
I don't like the verbosity of the makefiles, but I'm afraid that this PR adds too many subtle details and brittle build steps. Walter is rather fond of the explicit list of commands. with this tiny D tool: module copyimports;
import std.array, std.file, std.path, std.stdio;
void main(string[] args)
{
string importPath = absolutePath("import");
string srcPath = absolutePath("src");
foreach(impfile; args[1..$])
{
impfile = absolutePath(impfile);
string srcfile = buildPath(srcPath, asRelativePath(impfile, importPath).array);
if (std.file.exists(impfile))
if (timeLastModified(impfile) >= timeLastModified(srcfile))
continue;
writeln("copying ", srcfile, " -> ", impfile);
mkdirRecurse(dirName(impfile));
std.file.copy(srcfile, impfile);
}
} |
|
Can anyone from WIndows World implement @rainers proposal? |
|
@12345swordy I am personally currently not have problem with Windows VM. But stil, this is alien system which is not my "goal". I look at it like this: By some coincidence, current mak/WINDOWS affects all systems (any addition/deletion of .d file requires changes to it). I fixed it by this PR. It would be fair to accept the patch as is and then, people interested in the Windows platform will abble fix it or do something else. Non-Windows people will be able to do things as they see fit without paying attention to mak/WINDOWS. Otherwise, this situation will continue rot for years. |
|
#3026 concluded as better solution |
No description provided.