automake
[Top][All Lists]
Advanced

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

Re: Need for a portable way to specify intermediate targets.


From: Bruce Korb
Subject: Re: Need for a portable way to specify intermediate targets.
Date: Wed, 04 Jan 2006 10:18:46 -0800
User-agent: Mozilla Thunderbird 1.0.7 (X11/20050923)

Peter Ekberg wrote:
Hello!

I have the following needs:

1. Extract some data from a list of files using script foo.
2. Process the data further using a second script bar.
3. Concatenate the processed data.
4. Run a third script foobar on the concatenation to
   produce a .c file.
5. Distribute the generated .c file, so that only
   the maintainer (me) needs to run 1-4.
6. Use the generated .c file as usual.

I have made an attempt as outlined in the attached sample,
with silly barebones scripts to save some bandwidth.
Run "./bootstrap; ./configure; make" to test the attempt.

My attempt fails the last bit of point 5, the scripts are
triggered for everyone, even when the generated .c file is
newer than any of its dependencies.

The real project where this is needed currently requires
GNU make, and is using the .INTERMEDIATE target, just add

.INTERMEDIATE: $(FOOBARS) splunk.foobar

to Makefile.am and use GNU make to get the behaviour I desire.

Is there a portable solution to my needs?

Remove the generation of the .c files from your make files.
Put that logic in "bootstrap" and remove it from Makefile.am.
It makes life easier.  If you distribute "bootstrap", any
"customer" can run the script, if they so choose.  :)

Keep It Simple.  Regards, Bruce




reply via email to

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