Andreas Bihlmaier [2007-01-30, 17:47:52]:
> Hello ports@,
> 
> since I started to learn LaTeX I like the convenience of _not_ having to
> write long and complicated Makefiles.
> The solution: latex-mk
> 
> # pkg_info latex-mk
> Information for latex-mk-1.8
> 
> Comment:
> set of Makefile fragments to manage LaTex documents
> 
> Description:
> latex-mk is a set of Makefile fragments designed to assist in the
> management of LaTeX documents. The user creates a simple Makefile
> which sets up a few simple variables and then includes the latex.mk
> fragment at the end. Large documents, which require many many steps to
> typset can be managed easily.
> 
> Maintainer: Andreas Bihlmaier <[EMAIL PROTECTED]>
> 
> WWW: http://latex-mk.sourceforge.net/

I'd prefer to patch their install target with the desired locations,
then you won't forget to install files, e.g. dated_draft.ps.

I've asked the author about including DVIPS_ENV, which I think can be
useful, e.g. to find images in different places through TEXINPUTS.
(A patch for this is attached, in case anyone is interested.)

steven


Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

$OpenBSD$
--- latex.mk.in.in.orig Tue Jan 30 21:38:37 2007
+++ latex.mk.in.in      Tue Jan 30 21:42:32 2007
@@ -60,6 +60,7 @@
 #  DVIPDFM_ENV  = environment variables set when running the dvipdfm executable
 #  DVIPDFM_FLAGS= flags passed to the dvipdfm executable
 #  DVIPS       = the dvips executable
+#  DVIPS_ENV   = environment variables set when running the dvips executable
 #  DVIPS_FLAGS = flags passed to the dvips executable
 #  GZIP                = gzip program
 #  GV          = a postscript previewer executable
@@ -145,6 +146,7 @@ DVIPDFM_ENV?=       
 DVIPDFM_FLAGS+=        
 DVIPDFM_LANDSCAPE_FLAGS?=      -l
 DVIPS?=                @DVIPS@
+DVIPS_ENV?=    
 DVIPS_FLAGS+=  -j0
 DVIPS_LANDSCAPE_FLAGS?=        -t landscape
 ECHO?=         @ECHO@
@@ -473,7 +475,7 @@ BMK:DEFAULTVIEWPS_DRAFT?=   viewps_${__tmp
 BMK:ALLVIEWPS_DRAFT+=  viewps_${__tmp__}-draft
 BMK:${__tmp__}-draft.ps: ${__tmp__}.dvi ${DATED_DRAFT_PS}
 BMK:   sed "s;DATE;`date`;g" ${DATED_DRAFT_PS:Q} > ${DRAFT_STAMP_PS:Q}
-BMK:   ${DVIPS:Q} -h ${DRAFT_STAMP_PS:Q} ${DVIPS_FLAGS} -o $@ ${__tmp__}.dvi
+BMK:   ${ENV_PROG:Q} ${DVIPS_ENV} ${DVIPS:Q} -h ${DRAFT_STAMP_PS:Q} 
${DVIPS_FLAGS} -o $@ ${__tmp__}.dvi
 BMK:.endfor
 
 GMK:define viewps_template
@@ -489,7 +491,7 @@ GMK:DEFAULTVIEWPS_DRAFT?=   viewps_$(1)-dr
 GMK:ALLVIEWPS_DRAFT+=  viewps_$(1)-draft
 GMK:$(1)-draft.ps: $(1).dvi ${DATED_DRAFT_PS}
 GMK:   sed "s;DATE;`date`;g" ${DATED_DRAFT_PS} > ${DRAFT_STAMP_PS}
-GMK:   $(DVIPS) -h ${DRAFT_STAMP_PS} $(DVIPS_FLAGS) -o $@ $(1).dvi
+GMK:   $(ENV_PROG) $(DVIPS_ENV) $(DVIPS) -h ${DRAFT_STAMP_PS} $(DVIPS_FLAGS) 
-o $@ $(1).dvi
 GMK:endef
 GMK:$(foreach __tmp__,$(NAME),$(eval $(call viewps_template,$(__tmp__))))
 
@@ -960,13 +962,13 @@ GMK:endif
 BMK:.if defined(__DRAFT)
 GMK:ifdef __DRAFT
 GMK:   sed "s;DATE;`date`;g" ${DATED_DRAFT_PS} > ${DRAFT_STAMP_PS}
-GMK    $(DVIPS) -h ${DRAFT_STAMP_PS} $(DVIPS_FLAGS) -o $*-draft.ps $<
+GMK:   $(ENV_PROG) $(DVIPS_ENV) $(DVIPS) -h ${DRAFT_STAMP_PS} $(DVIPS_FLAGS) 
-o $*-draft.ps $<
 BMK:   sed "s;DATE;`date`;g" ${DATED_DRAFT_PS:Q} > ${DRAFT_STAMP_PS:Q}
-BMK:   ${DVIPS:Q} -h ${DRAFT_STAMP_PS:Q} ${DVIPS_FLAGS} -o $*-draft.ps $<
+BMK:   ${ENV_PROG:Q} ${DVIPS_ENV} ${DVIPS:Q} -h ${DRAFT_STAMP_PS:Q} 
${DVIPS_FLAGS} -o $*-draft.ps $<
 BMK:.else
-BMK:   ${DVIPS:Q} ${DVIPS_FLAGS} -o $@ $<
+BMK:   ${ENV_PROG:Q} ${DVIPS_ENV} ${DVIPS:Q} ${DVIPS_FLAGS} -o $@ $<
 GMK:else
-GMK:   $(DVIPS) $(DVIPS_FLAGS) -o $@ $<
+GMK:   $(ENV_PROG) $(DVIPS_ENV) $(DVIPS) $(DVIPS_FLAGS) -o $@ $<
 BMK:.endif
 GMK:endif
 

Reply via email to