How can I make a general makefile that selects all files with a specific extension
How does a makefile look like that makes a target for every extension?
My current makefile:
S开发者_StackOverflow中文版OURCES=*.gnuplot
TARGETS=$(SOURCES:.gnuplot=.pdf)
all: $(TARGETS)
%.pdf: %.gnuplot
cp $< $@
The problem is that there is only 1 target: *.pdf and not test.pdf as I wanted.
How can I let this make file make a pdf file for every gnuplot file?
SOURCES = $(wildcard *.gnuplot)
精彩评论