[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: A4 Printing



On Sep 10, 2007, at 7:10 PM, Greg Cunningham wrote:

> On Mon, 2007-09-10 at 20:33 -0400, DJ Delorie wrote:
>>> However, the pdf barfs.  Is there a wrap error in your post, or is
>>> "$<" a construct I'm not familiar with?
>>
>> When using pattern rules (wildcards) in Makefiles, there are some
>> variables you can use to expand to the part of the filenames that
>> match the wildcards.  Example:
>>
>> %.pdf : %.ps Makefile
>> 	ps2pdf $< > $@
>>
>> If we're converting "page.ps" to "page.pdf", some useful variables  
>> are
>> as follows:
>>
>> $@	page.pdf (the target)
>> $<	page.ps  (the first depends-on file)
>> $^	"page.ps Makefile" (all depends-on files)
>> $*	page     (the part that matched the '%')
> Thanks again DJ.  Over the last 10 years, I have had 2 or 3  
> attempts (my
> only ventures into a bit of serious code...)to climb the Makefile
> plateau.  But, seeing 99.99*% of my work is sys-admin for a regional
> daily newspaper, I just keep forgetting almost everything I read.  Not
> enough playtime...

FWIW, there's a good O'Reilly book about creating and using Makefiles:

http://www.oreilly.com/catalog/make3/index.html

Don't worry ... it's not as thick as the sendmail "bat" book.

-a


_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user