Hi Paul,

        prog: foosrc/libfoo.a
                ...do something...

        foosrc/libfoo.a: FORCE
                $(MAKE) -C foosrc

        FORCE: ;

In this model, libfoo.a will always be considered out of date (because
of the FORCE prerequisite--just be sure you don't create a file "FORCE"
in your directory), so the command to build it will be invoked.  The
command is the submake.

If the submake actually updates libfoo.a, then "prog" will be rebuilt.
If the submake does not change libfoo.a, then "prog" will not be
considered out of date.


Sorry if the answer is obvious, but I don't understand why "prog" isn't simply always rebuilt, because libfooa is always updated. Is it because the command is $(MAKE)?

(Replacing $(MAKE) -C foosrc by touch $@ actually implies that prog is always updated)

It tried to find something about this in the documentation, but I failed.

Thanks

Christophe.


_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to