[vox-tech] make question - pattern rule

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


On second thought...

   dvips -E $(shell basename $< .tex).dvi > $(shell basename $@)

would be better.  BTW, the latex line I think should be:

   latex $(shell basename $<)

but I just work here (tm).

-Mark


On Tue, 29 Oct 2002, Mark K. Kim wrote:

> 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.
>
>
>
>
> _______________________________________________
> vox-tech mailing list
> vox-tech@lists.lugod.org
> http://lists.lugod.org/mailman/listinfo/vox-tech
>

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