[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: non-recursive build question
From: |
Paul D. Smith |
Subject: |
Re: non-recursive build question |
Date: |
Wed, 28 Apr 2004 00:35:47 -0400 |
%% Sandy Currier <address@hidden> writes:
sc> Actually, though the primary point is to not have targets that
sc> depend on foo.exp rebuild when it is not physically changed, the
sc> secondary point IS to touch the foo.exp target. By touching it
sc> when it is rebuilt, then the next time that make is run, if none
sc> of the $(ALL_FOO_OFILES) have changed, then the neither foo.exp or
sc> foo.so is rebuilt.
Well, you can't have it both ways: either the target is updated, in
which case things that depend on the target are updated, or it's not
updated, in which case it will be re-assessed in relation to its
prerequisites the next time make is run.
Well, you could actually get both but you need an extra file; you can
use this "sentinel" file to manage controlling the expensive part and
then the only part that is run multiple times is the cheap part of
comparing the results.
For example:
foo.so: $(ALL_FOO_OFILES) foo.exp
create_sharedlib.pl ...
foo.exp: .foo.exp.new
if [ "x`stat.pl address@hidden" != "x`stat.pl $<`" ]; then \
cp $< $@; \
fi
.foo.exp.new: $(ALL_FOO_OFILES)
create_export_list.pl $@ $^
Now create_export_list.pl will only be invoked when some OFILE actually
changes, and foo.exp will only be updated when the export list has
changed, but you don't pay the cost of updating the export list every
time you only pay the cost of the comparison.
--
-------------------------------------------------------------------------------
Paul D. Smith <address@hidden> Find some GNU make tips at:
http://www.gnu.org http://make.paulandlesley.org
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist
- re: non-recursive build question, sandy currier, 2004/04/27
- re: non-recursive build question, Paul D. Smith, 2004/04/27
- Re: non-recursive build question, Sandy Currier, 2004/04/27
- Re: non-recursive build question,
Paul D. Smith <=
- Re: non-recursive build question, Noel Yap, 2004/04/28
- Re: non-recursive build question, Paul D. Smith, 2004/04/29
- Re: non-recursive build question, Noel Yap, 2004/04/29
- Re: non-recursive build question, Paul D. Smith, 2004/04/29
- Re: non-recursive build question, Noel Yap, 2004/04/29
- Re: non-recursive build question, Paul D. Smith, 2004/04/29
- Re: non-recursive build question, Sandy Currier, 2004/04/30
- Re: non-recursive build question, Noel Yap, 2004/04/29
- Re: non-recursive build question, David Boyce, 2004/04/30
- Re: pluggable out-of-date (Was: non-recursive build question), Noel Yap, 2004/04/30