help-make
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: help patter mathcing


From: Maxim Yegorushkin
Subject: Re: help patter mathcing
Date: Tue, 29 Aug 2006 22:24:33 +0100
User-agent: Thunderbird 1.5.0.5 (X11/20060808)

Zunbeltz Izaola wrote:

I have the following files

foo-1.pdf foo-2.pdf whose prerequisite is foo.mp  and
baz-1.pdf whose prerequisite is baz.mp


They are generated with the command

mptopdf foo.mp


I what to wirte a pattern rule similar to

%.pdf : something
   mptopdf $<

where someting tramsform names like foo-[0-9]*.pdf to foo.mp

Does this not do what you need? (you can specify dependencies without having to write commands)

$ cat Makefile
foo-1.pdf foo-2.pdf : foo.mp
baz-1.pdf : baz.mp

%.pdf :
        @echo "$@ <--- mptopdf $<"
$ touch {foo,baz}.mp
$ make {foo-{1,2},baz-1}.pdf
foo-1.pdf <--- mptopdf foo.mp
foo-2.pdf <--- mptopdf foo.mp
baz-1.pdf <--- mptopdf baz.mp





reply via email to

[Prev in Thread] Current Thread [Next in Thread]