www.digitalmars.com         C & C++   DMDScript  

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

reply d-bugmail puremagic.com writes:
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 puremagic.com
        ReportedBy: leandro.lucarella sociomantic.com


--- Comment #0 from Leandro Lucarella <leandro.lucarella 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: -------
Mar 12 2014
next sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12354


Leandro Lucarella <leandro.lucarella sociomantic.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |industry, pull


--- Comment #1 from Leandro Lucarella <leandro.lucarella sociomantic.com>
2014-03-12 15:04:09 PDT ---
https://github.com/D-Programming-Language/tools/pull/122

-- 
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Mar 12 2014
prev sibling parent d-bugmail puremagic.com writes:
https://d.puremagic.com/issues/show_bug.cgi?id=12354



--- Comment #2 from github-bugzilla puremagic.com 2014-03-19 12:37:12 PDT ---
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)

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