digitalmars.D - Added --makedepend flag to rdmd
- Andrei Alexandrescu (21/21) Jun 05 2011 I just added a --makedepend flag to rdmd:
- Andrei Alexandrescu (7/16) Jun 05 2011 Ehm, I meant to not include the .d suffixes...
- Andrej Mitrovic (6/6) Jun 05 2011 Well your changes don't seem to work on Windows. For this layout:
- Andrej Mitrovic (3/10) Jun 05 2011 Stupid stupid me, I was using makeDepend instead of makedepend.
- Andrej Mitrovic (3/3) Jun 05 2011 I think what confused me was that I was reading the code and saw this:
- Graham St Jack (4/25) Jun 06 2011 --
I just added a --makedepend flag to rdmd: https://github.com/D-Programming-Language/tools/commit/451ffed8ff985465a52124f7671494ac1d3744b4 It instructs rdmd to simply print to stdout the name of the input file followed by a colon and then by the space-separated files that the input file depends on, directly or indirectly. Example: // file test1.d; import test2.d; // file test2.d; import test3.d, mylib.test4.d; With this setup, assuming test3.d and test4.d contain no further non-system imports, the command: rdmd --makedepend test1.d will print test1.d : ./test2.d ./mylib/test4.d ./test3.d This flag is intended to be useful to larger-scale build tools that need to store and track module interdependencies. In the simplest use case, directing the output of rdmd --makedepend (for each of a project's root files) to a file and then including that file in a makefile will ensure that dependencies are properly maintained. Cheers, Andrei
Jun 05 2011
On 06/05/2011 10:48 AM, Andrei Alexandrescu wrote:I just added a --makedepend flag to rdmd: https://github.com/D-Programming-Language/tools/commit/451ffed8ff985465a52124f7671494ac1d3744b4 It instructs rdmd to simply print to stdout the name of the input file followed by a colon and then by the space-separated files that the input file depends on, directly or indirectly. Example: // file test1.d; import test2.d; // file test2.d; import test3.d, mylib.test4.d;Ehm, I meant to not include the .d suffixes... // file test1.d; import test2; // file test2.d; import test3, mylib.test4; Andrei
Jun 05 2011
Well your changes don't seem to work on Windows. For this layout: main.d // module main foo/test.d // module foo.test I get back: Failed: dmd --makeDepend -v -o- "main.d" -I"." >main.d.deps I'll try to figure out what's going on and make a pull if I can get it to work.
Jun 05 2011
Stupid stupid me, I was using makeDepend instead of makedepend. Works fine on Windoze, sorry for the noise. On 6/5/11, Andrej Mitrovic <andrej.mitrovich gmail.com> wrote:Well your changes don't seem to work on Windows. For this layout: main.d // module main foo/test.d // module foo.test I get back: Failed: dmd --makeDepend -v -o- "main.d" -I"." >main.d.deps I'll try to figure out what's going on and make a pull if I can get it to work.
Jun 05 2011
I think what confused me was that I was reading the code and saw this: "makedepend", &makeDepend, Heh. :)
Jun 05 2011
Thanks very much for this - I need it for the build tool I am working on. On 06/06/11 01:18, Andrei Alexandrescu wrote:I just added a --makedepend flag to rdmd: https://github.com/D-Programming-Language/tools/commit/451ffed8ff985465a521 4f7671494ac1d3744b4 It instructs rdmd to simply print to stdout the name of the input file followed by a colon and then by the space-separated files that the input file depends on, directly or indirectly. Example: // file test1.d; import test2.d; // file test2.d; import test3.d, mylib.test4.d; With this setup, assuming test3.d and test4.d contain no further non-system imports, the command: rdmd --makedepend test1.d will print test1.d : ./test2.d ./mylib/test4.d ./test3.d This flag is intended to be useful to larger-scale build tools that need to store and track module interdependencies. In the simplest use case, directing the output of rdmd --makedepend (for each of a project's root files) to a file and then including that file in a makefile will ensure that dependencies are properly maintained. Cheers, Andrei-- Graham St Jack
Jun 06 2011