help-make
[Top][All Lists]
Advanced

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

Re: MAKEFLAGS (Was: forcing a rule)


From: Noel Yap
Subject: Re: MAKEFLAGS (Was: forcing a rule)
Date: Fri, 02 Apr 2004 15:08:03 -0500
User-agent: Mozilla Thunderbird 0.5 (Windows/20040212)

You missed the MAKEFILES portion of my email.

I haven't tried it, but I'm thinking of something like:

  # bootstrap.mk
  ifeq ($(MAKELEVEL),0)
    # re-exec make with new MAKEFLAGS
  endif


then set MAKEFLAGS=bootstrap.mk.

Noel

Boris Kolpackov wrote:

Hi Noel,
It's also just occurred to me that, using MAKEFILES and the "gmake self wrapper" trick, you could get what you want without having to patch make. OTOH, it is a bit more complicated even though the complication is hidden.


How is it hidden? In every makefile you have two write something like
this:


if <MAKEFLAGS need adjustment>
include make-re-executor.make

else

# your code here


endif

This is ugly. If I needed this feature in a project that otherwise
uses vanilla make I would think twice before patching make. But in
my case Rubicon is already crossed.


-boris




reply via email to

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