%% Sandy Currier <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED]" != "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 <[EMAIL PROTECTED]>          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


_______________________________________________
Help-make mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/help-make

Reply via email to