[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Canned recipes
From: |
Harvey Chapman |
Subject: |
Canned recipes |
Date: |
Wed, 20 Jul 2011 12:24:53 -0400 |
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.
Thank you,
Harvey
$ cat Makefile
# From http://www.gnu.org/software/make/manual/make.html#Canned-Recipes
# 5.8 Defining Canned Recipes
define run-yacc =
yacc $(firstword $^)
mv y.tab.c $@
endef
foo.c : foo.y
@echo "Just before"
$(run-yacc)
foo.y:
touch $@
.PHONY: clean
clean:
rm -f foo.y foo.c
$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin10.0
$ make
touch foo.y
Just before
$
$ make --version
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i486-pc-linux-gnu
$ make
touch foo.y
Just before
$
- Canned recipes,
Harvey Chapman <=