help-make
[Top][All Lists]
Advanced

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

help with pattern rules


From: Kevin Barry
Subject: help with pattern rules
Date: Wed, 13 Jan 2016 18:39:07 +0000

Dear Make experts,

Apologies if this question has a trivial answer. I promise I read the
manual! But I am a novice and not everything makes perfect sense.

I'm not writing C programs. I'm compiling a large number (many hundreds) of
pdf documents from text files, and I don't want to list the many targets
explicitly, because they are not fixed. I want to be able to type something
like: make foo.pdf, and make will look for an equivalent foo.txt. From the
manual section on pattern rules I thought a simple rule like the following
would work:

%.pdf: %.txt
        $(COMMAND) $<

But I get an error saying there is "No rule to make target 'foo.pdf'". What
am I doing wrong?

Thanks in advance,
Kevin Barry


reply via email to

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