On Wed, 2011-07-20 at 12:24 -0400, Harvey Chapman wrote: > I copied an example from the make manual and I don't see why it > doesn't work. It never runs the canned recipe commands.
> $ cat Makefile > # From http://www.gnu.org/software/make/manual/make.html#Canned-Recipes > # 5.8 Defining Canned Recipes The version of the manual on the FSF web site always describes the latest released version of GNU make, currently 3.82. > define run-yacc = > yacc $(firstword $^) > mv y.tab.c $@ > endef > $ make --version > GNU Make 3.81 You are running the previous version of GNU make, 3.81. If you want to read the version of the manual for your version of GNU make you should read the one that was installed on your system; that version should be the right one for your installed version of GNU make. The syntax that allows the type of variable to be defined by adding "=", ":=", "+=" etc. was added in 3.82 so your version does not support this syntax, which is why you're seeing this issue. Remove the "=", so it's just: define run-yacc .... endef and that should work. -- ------------------------------------------------------------------------------- Paul D. Smith <[email protected]> Find some GNU make tips at: http://www.gnu.org http://make.mad-scientist.net "Please remain calm...I may be mad, but I am a professional." --Mad Scientist _______________________________________________ Help-make mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-make
