I have the following makefile:
SHELL:/bin/bash
all: euro.n.{a,b}
euro.{a,b}:
touch euro.{a,b}
euro.n.{a,b}: euro.{a,b}
cat euro.a > euro.n.a
cat euro.b > euro.n.b
Now if I run make
twice, the makefile won't recognize in the second run that the files euro.na and euro.nb have already been created (and it will be executed again).
What is the problem?
What is the problem?
{a,b}
is not syntax recognized by GNU make.
SHELL := /bin/bash
(you missed =
there) only affects the syntax of recipes.
One alternative solution:
SHELL := /bin/bash
all: $(addprefix euro.n.,a b)
euro.%:
touch $@
euro.n.% : euro.%
cp $< $@
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.