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



_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make

Reply via email to