[vox-tech] make question - pattern rule

Mark K. Kim vox-tech@lists.lugod.org
Tue, 29 Oct 2002 16:24:41 -0800 (PST)


On Tue, 29 Oct 2002, Peter Jay Salzman wrote:

> I'd like to replace all the "postscript/blah.pdf" rules with a pattern
> rule, but i'm stuck.  here's what i tried:
>
>    %.pdf : %.tex
>       cd postscript; latex $<; dvips -E
>
> i'm not sure what to put after -E.    i'd like to mimic what i have
> above, but am unsure how to handle changing the suffix of the target
> name.

A quick and dirty fix would be:

   dvips -E `basename $< .tex`.dvi > `basename $@`

but... there's prolly a $(blah blah) thing similar to $(wildcard blah).

BTW, you need to compensate for subdirectories.  The above will do what
I think you wanna do but... check first.

-Mark

-- 
Mark K. Kim
http://www.cbreak.org/
PGP key available upon request.