Closed wilzbach closed 10 years ago
Comment author: Leandro Lucarella <leandro.lucarella@sociomantic.com>
When using automatic dependencies, if you include an old dependencies file that have a file that was removed, make will issue an error like:
make: *** No rule to make target missing_file.d', needed by
some_rule'. Stop.
To avoid this there is a popular trick used by GCC consisting in adding empty rules for each source file. Make treats any empty rule (no prerequisites, no actions) as if they were .PHONY (and not issuing any errors), so the effect of doing this is, if a file that was listed as a dependency is gone, a rebuild will be triggered.
rdmd should do the same.
Comment author: Leandro Lucarella <leandro.lucarella@sociomantic.com>
Comment author: github-bugzilla@puremagic.com
Commits pushed to master at https://github.com/D-Programming-Language/tools
https://github.com/D-Programming-Language/tools/commit/314d92e192c88ccd15982dd9b11f69aaafb47efa Fix issue 12354: rdmd --makedep(end|file) doesn't output empty rules for all source files
Now rdmd --makedep(end|file) will print an empty rule for each source file.
https://github.com/D-Programming-Language/tools/commit/09aaa0953e79052f70ea71800f3d344feec82ff3 Merge pull request BZ#122 from leandro-lucarella-sociomantic/rdmd-exe-target
Fix rdmd --makedep(end|file) (issues 12351 and 12354)
Note: the issue was created automatically migrated from https://issues.dlang.org
Original bug ID: BZ#12354 From: Leandro Lucarella <leandro.lucarella@sociomantic.com> Reported version: D2