[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing MAKEFLAGS to affect current makefile

From: Boris Kolpackov
Subject: Re: changing MAKEFLAGS to affect current makefile
Date: Wed, 31 Mar 2004 10:41:25 -0600
User-agent: Mutt/1.5.4i

Hi Noel,
> >>You might want to read 
> >>for an idea for how to do what you want.
> >
> >Obviously that's not what I want.
> How not?  Don't be mislead by the article's title, it uses techniques that 
> may be useful to you.  IMHO, part of the article should be separated into a 
> separate article entitled "A GNU make Wrapper using GNU make."

Are you suggesting that I adjust MAKEFLAGS for options I want and then
re-execute make on itself? Well this could work except 

  (a) This is ugly. And since I am using my own patched make anyway
      I might as well fix this one. 

  (b) My makes are generally very big and it could be expensive to 
      re-execute them.

Well, if I am to tell the whole story, I was actually looking for a
mechanism to switch features on and off from inside. Here is an 
example to make things clear. I have a patch (for make) that 
inhibits make's ability to assume targets are phony. For example
when you write something like this

all : driver

without explicitly declaring target all .PHONY make assumes it is
phony. This has consequences sometimes. But now it makes my patched
version of make incompatible with some poorly implemented makefiles.

So what I want is some generic mechanism to control feature 
availability from inside make (it would also be nice from command
line). One idea that came to my mind was to create yet another
pseudo-target (let's say .FEATURE) where one could specify which
features should be turned on and off:

.FEATURE -implicit-phony +built-in-implicit-rules

But then after reading the manual it seems we have this mechanism 
already - MAKEFLAGS. Except that it doesn't seem to work from 
within a makefile.

Comments are welcome.


Attachment: signature.asc
Description: Digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]