Bug 12354 – rdmd --makedep(end|file) doesn't output empty rules for all source files

Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P2
Component
tools
Product
D
Version
D2
Platform
All
OS
All
Creation time
2014-03-12T14:31:00Z
Last change time
2014-04-24T16:45:34Z
Keywords
industry, pull
Assigned to
nobody
Creator
leandro.lucarella

Comments

Comment #0 by leandro.lucarella — 2014-03-12T14:31:28Z
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 #1 by leandro.lucarella — 2014-03-12T15:04:09Z
Comment #2 by github-bugzilla — 2014-03-19T12:37:12Z
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 #122 from leandro-lucarella-sociomantic/rdmd-exe-target Fix rdmd --makedep(end|file) (issues 12351 and 12354)