www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Conditional behavior within makefiles

reply Sean Kelly <sean f4.ca> writes:
There doesn't seem to be a tools newsgroup so I figured I'd just post 
this here.  Does the DigitalMars make tool support conditional behavior 
with ifeq and the like?  And more importantly, is there any equivalent 
for the GNU MAKECMDGOALS variable?  I'm trying to change makefile 
behavior based on the target specified and am not really sure how to 
proceed.


Sean
Nov 13 2007
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
Sean Kelly wrote:
 There doesn't seem to be a tools newsgroup so I figured I'd just post 
 this here.  Does the DigitalMars make tool support conditional behavior 
 with ifeq and the like?  And more importantly, is there any equivalent 
 for the GNU MAKECMDGOALS variable?  I'm trying to change makefile 
 behavior based on the target specified and am not really sure how to 
 proceed.
You probably know this much, but I'll say it anyway. The free make tool that comes with DMD/DMC doesn't support much of anything. The version that comes with the Extended Utilities Package or the DMC CD-ROM supports more features. I *think* the for-fee one has conditionals. And I'm almost certain you're out of luck with the free one. But there are many ports of gnumake to Win32, so why not just use that? --bb
Nov 13 2007
parent reply Sean Kelly <sean f4.ca> writes:
Bill Baxter wrote:
 Sean Kelly wrote:
 There doesn't seem to be a tools newsgroup so I figured I'd just post 
 this here.  Does the DigitalMars make tool support conditional 
 behavior with ifeq and the like?  And more importantly, is there any 
 equivalent for the GNU MAKECMDGOALS variable?  I'm trying to change 
 makefile behavior based on the target specified and am not really sure 
 how to proceed.
You probably know this much, but I'll say it anyway. The free make tool that comes with DMD/DMC doesn't support much of anything. The version that comes with the Extended Utilities Package or the DMC CD-ROM supports more features. I *think* the for-fee one has conditionals. And I'm almost certain you're out of luck with the free one. But there are many ports of gnumake to Win32, so why not just use that?
This is for the Tango makefiles, so I can't expect the user to have anything but the version of make.exe that comes with DMD/DMC. I'm trying to sort out separate debug and release builds within the same makefile. Sean
Nov 13 2007
next sibling parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Sean Kelly wrote:
 Bill Baxter wrote:
 Sean Kelly wrote:
 There doesn't seem to be a tools newsgroup so I figured I'd just post 
 this here.  Does the DigitalMars make tool support conditional 
 behavior with ifeq and the like?  And more importantly, is there any 
 equivalent for the GNU MAKECMDGOALS variable?  I'm trying to change 
 makefile behavior based on the target specified and am not really 
 sure how to proceed.
You probably know this much, but I'll say it anyway. The free make tool that comes with DMD/DMC doesn't support much of anything. The version that comes with the Extended Utilities Package or the DMC CD-ROM supports more features. I *think* the for-fee one has conditionals. And I'm almost certain you're out of luck with the free one. But there are many ports of gnumake to Win32, so why not just use that?
This is for the Tango makefiles, so I can't expect the user to have anything but the version of make.exe that comes with DMD/DMC. I'm trying to sort out separate debug and release builds within the same makefile.
Ok. Well if you run into a brick wall with DMD/DMC's make, you could always include gmake with the Tango distribution. --bb
Nov 13 2007
prev sibling parent reply torhu <no spam.invalid> writes:
Sean Kelly wrote:
 This is for the Tango makefiles, so I can't expect the user to have 
 anything but the version of make.exe that comes with DMD/DMC.  I'm 
 trying to sort out separate debug and release builds within the same 
 makefile.
I think the closest you can get is having a batch file that runs make with the correct DFLAGS, etc. make -f win32.mak DFLAGS=-inline -O -release make -f win32.mak DFLAGS=-g I tried dmd make a while back, and didn't find it very amusing.
Nov 14 2007
parent reply Sean Kelly <sean f4.ca> writes:
torhu wrote:
 Sean Kelly wrote:
 This is for the Tango makefiles, so I can't expect the user to have 
 anything but the version of make.exe that comes with DMD/DMC.  I'm 
 trying to sort out separate debug and release builds within the same 
 makefile.
I think the closest you can get is having a batch file that runs make with the correct DFLAGS, etc.
Yuck :-) Sean
Nov 14 2007
parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Sean Kelly wrote:
 torhu wrote:
 Sean Kelly wrote:
 This is for the Tango makefiles, so I can't expect the user to have 
 anything but the version of make.exe that comes with DMD/DMC.  I'm 
 trying to sort out separate debug and release builds within the same 
 makefile.
I think the closest you can get is having a batch file that runs make with the correct DFLAGS, etc.
Yuck :-) Sean
I wonder if there's any technical reason why Walter couldn't just dump DMD make in favor of gmake. Other than that DMD make is his baby. The DMC build of wxWidgets is also screwed up because of the limited make that comes with the DMC compiler. But they insist on using it rather than gmake for the same reason as you -- because if you have dmc, you're guaranteed to have dmc's make. --bb
Nov 14 2007