Problems with dmd Switches in Makefiles

Tom Browder via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 17 06:00:15 PDT 2014


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


More information about the Digitalmars-d-learn mailing list