[Top][All Lists]

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

Re: Pre-including a generated file

From: Paul Smith
Subject: Re: Pre-including a generated file
Date: Wed, 12 Aug 2009 14:45:35 -0400

On Wed, 2009-08-12 at 14:37 -0300, Leandro Lucarella wrote:
> Paul Smith, el 12 de agosto a las 12:22 me escribiste:
> > If you really want that command run every single time, probably simpler
> > is to remove the rule to build it and just use $(shell ...), like this:
> > 
> >     __dummy := $(shell ./gen_file)
> >     include file
> I tried to do that too, but I had some problems. The thing is, I use make
> to generate the file. Maybe it's time to explain what I'm trying to do
> with some more detail =)
> To invoke the script I use:
>       ./gen_file $(MAKE) $(MAKECMDGOALS)
> If I put this in the Makefile:
>       __dummy := $(shell ./gen_file $(MAKE) $(MAKECMDGOALS))
>       include file
> And then run make CFLAGS=-Wall, for example, it looks like the make -Bn
> that I run inside gen_file is not getting the CFLAGS, and thus not
> detecting any changes in the command line used to build the targets.

You probably want to look at the "Communicating Options to a Sub-'make'"
section of the GNU make manual, in particular the section on

 Paul D. Smith <address@hidden>          Find some GNU make tips at:            
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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