digitalmars.D.learn - Problems with dmd Switches in Makefiles
- Tom Browder via Digitalmars-d-learn (16/16) May 17 2014 I know I'm supposed to use dub, but I'm not ready.
- "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> (4/13) May 17 2014 dmd -c $< -of$@
- Tom Browder via Digitalmars-d-learn (10/18) May 17 2014 ...
- "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> (2/2) May 18 2014 For the compiler version, I've submitted a PR:
- "Marc =?UTF-8?B?U2Now7x0eiI=?= <schuetzm gmx.net> (6/8) May 19 2014 Ok, the outcome is that a dedicated option is not seen as
I know I'm supposed to use dub, but I'm not ready. I just found out I can't use dmd switches for file names variable in a GNU makefile, e.g., see this fragment %.o : %.d dmd -c $< -of $ which doesn't work because the "-of" must be followed immediately by a file name with no intervening spaces. This simple case works by simply removing the code chunk "-of $ " but the problem precludes more complex makefiles. Also, I notice dmd has no simple way to output its version (by the way, I'm using dmd version 2.065 installed via the Debian apt package management system). Am I missing something, or are these situations legitimate bugs? Thanks. Best regards, -Tom
May 17 2014
On Saturday, 17 May 2014 at 13:01:07 UTC, Tom Browder via Digitalmars-d-learn wrote:I know I'm supposed to use dub, but I'm not ready. I just found out I can't use dmd switches for file names variable in a GNU makefile, e.g., see this fragment %.o : %.d dmd -c $< -of $ which doesn't work because the "-of" must be followed immediately by a file name with no intervening spaces.dmd -c $< -of$ works for me with GNU Make 3.82.
May 17 2014
On Sat, May 17, 2014 at 8:05 AM, via Digitalmars-d-learn <digitalmars-d-learn puremagic.com> wrote:On Saturday, 17 May 2014 at 13:01:07 UTC, Tom Browder via Digitalmars-d-learn wrote:......I just found out I can't use dmd switches for file names variable in a GNU makefile, e.g., see this fragmentYou're correct, my error. I had another error which I misinterpreted. So GNU make expands the "$ " variable even without the space after "-of"--great! Thanks for the help. Best regards, -Tomdmd -c $< -of$ which doesn't workworks for me with GNU Make 3.82.
May 17 2014
For the compiler version, I've submitted a PR: https://github.com/D-Programming-Language/dmd/pull/3558
May 18 2014
On Sunday, 18 May 2014 at 16:15:53 UTC, Marc Schütz wrote:For the compiler version, I've submitted a PR: https://github.com/D-Programming-Language/dmd/pull/3558Ok, the outcome is that a dedicated option is not seen as necessary. DMD already prints its version as the first line if you call it without arguments. If you need only the version, you can use: dmd | head -n1
May 19 2014