[Issue 12354] New: rdmd --makedep(end|file) doesn't output empty rules for all source files

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Mar 12 14:31:31 PDT 2014


https://d.puremagic.com/issues/show_bug.cgi?id=12354

           Summary: rdmd --makedep(end|file) doesn't output empty rules
                    for all source files
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: tools
        AssignedTo: nobody at puremagic.com
        ReportedBy: leandro.lucarella at sociomantic.com


--- Comment #0 from Leandro Lucarella <leandro.lucarella at sociomantic.com> 2014-03-12 14:31:28 PDT ---
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.

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list