开发者

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)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜