On Thu, Dec 9, 2010 at 6:26 AM, AdamWainwright <[email protected]> wrote: > ------------------------------------------------- > PROGS=../xxx > > $(PROGS): $(addsuffix .y, $(@F)) > cp $(@F).y $@ > ------------------------------------------------- > > Initial run copies file 'xxx.y' to 'xxx'. If 'xxx.y' is updated then the > rule does not equate to 'true' (because the file 'xxx' doesn't exist) and > actions taken. Using debug I find it isn't even considering the > dependencies of the addsuffix() and states that the file doesn't need to be > updated. I feel there is some error in my logic here but I can't put my > finger on it.
One error in your logic is documented at http://www.gnu.org/software/make/manual/make.html#Automatic-Variables: "It's very important that you recognize the limited scope in which automatic variable values are available: they only have values within the recipe." Since $@ and its variant $(@F) are automatic variables, they cannot be used in the top (target: prereq) line. David Boyce _______________________________________________ Help-make mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-make
