diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/disser/include/latex.fig.mk')
-rw-r--r-- | Master/texmf-dist/doc/latex/disser/include/latex.fig.mk | 111 |
1 files changed, 65 insertions, 46 deletions
diff --git a/Master/texmf-dist/doc/latex/disser/include/latex.fig.mk b/Master/texmf-dist/doc/latex/disser/include/latex.fig.mk index 9c77cdde874..41cfdecd501 100644 --- a/Master/texmf-dist/doc/latex/disser/include/latex.fig.mk +++ b/Master/texmf-dist/doc/latex/disser/include/latex.fig.mk @@ -3,74 +3,93 @@ # Author: Stanislav Kruchinin <stanislav.kruchinin@gmail.com> # -E2E?=eps2eps -EPSTOOL?=epstool -EPSTOPDF?=epstopdf -GS?=gs +BMTOEPS ?= sam2p +E2E ?= eps2eps +EPSTOOL ?= epstool +EPSTOPDF ?= epstopdf +GS ?= gs -E2EFLAGS?=-dSAFER -ETFLAGS?=--quiet --copy --bbox -RES?=600 +BMTOEPSFLAGS ?= +E2EFLAGS ?= -dSAFER -dNOCACHE +ETFLAGS ?= --quiet --copy --bbox +RES ?= 600 -E2EFILES?=*.eps -E2PFILES?=*.eps -FBBFILES?=*.eps -PDF2PNGFILES?=*.pdf -PDF2TIFFILES?=*.pdf -FIGCLFILES?=*.pdf *.png *.tif -SUFFIX?=~ +BMTOEPSFILES ?= $(wildcard *.jpg *.png *.tif) +E2PFILES ?= *.eps +FBBFILES ?= *.eps +FIGCLFILES ?= *.pdf *.jpg *.png *.tif +OPTFILES ?= *.eps +PDF2PNGFILES ?= *.pdf +PDF2TIFFILES ?= *.pdf +PREFIX ?= ~ -# end of configuration help: - @echo " clean clean PDF, PNG and TIFF files" - @echo " epstoeps optimize EPS files using Ghostscript" - @echo " epstopdf convert EPS to PDF" - @echo " fixbb fix BoundingBox of EPS files" - @echo " help (default) show description of targets" - @echo " pdftopng256 convert PDF to PNG (256-color)" - @echo " pdftotiffg4 convert PDF to TIFF (b/w CCITT Group 4)" + @echo " bmtoeps convert bitmap images to EPS format" ;\ + echo " clean remove output files" ;\ + echo " epstoeps alias for optimize target" ;\ + echo " epstopdf convert EPS to PDF" ;\ + echo " fixbb fix BoundingBox of EPS files" ;\ + echo " help show description of targets" ;\ + echo " optimize optimize EPS files (implies fixbb)" ;\ + echo " pdftopng256 convert PDF to PNG (256-color)" ;\ + echo " pdftotiffg4 convert PDF to TIFF (b/w CCITT Group 4)" -clean: - rm -f $(FIGCLFILES) - -epstoeps: $(E2EFILES) - @for f in $^ ;\ - do \ - echo -n "fixbb: $$f..." ;\ - $(E2E) $(E2EFLAGS) $$f $$f$(SUFFIX) ;\ - mv $$f$(SUFFIX) $$f ;\ +bmtoeps: $(BMTOEPSFILES) + @for f in $^ ; do \ + echo -n "bmtoeps: $$f..." ;\ + $(BMTOEPS) $(BMTOEPSFLAGS) "$$f" "$${f%.*}.eps" > /dev/null 2>&1 ;\ echo "done" ;\ done +clean: + -rm -f $(FIGCLFILES) + +epstoeps: optimize + epstopdf: $(patsubst %.eps, %.pdf, $(wildcard $(E2PFILES))) fixbb: $(FBBFILES) - @for f in $^ ;\ - do \ + @for f in $^ ; do \ echo -n "fixbb: $$f..." ;\ - $(EPSTOOL) $(ETFLAGS) $$f $$f$(SUFFIX) ;\ - mv $$f$(SUFFIX) $$f ;\ + $(EPSTOOL) $(ETFLAGS) "$$f" "$(PREFIX)$$f" ;\ + mv "$(PREFIX)$$f" "$$f" ;\ echo "done" ;\ done +optimize: $(OPTFILES) + @for f in $^ ; do \ + echo -n "optimize: $$f..." ;\ + $(E2E) $(E2EFLAGS) "$$f" "$(PREFIX)$$f" ;\ + $(EPSTOOL) $(ETFLAGS) "$(PREFIX)$$f" "$(PREFIX)1$$f" ;\ + mv "$(PREFIX)1$$f" "$(PREFIX)$$f" ;\ + if [ `stat -c%s $$f` -gt `stat -c%s $(PREFIX)$$f` ] ; then \ + mv "$(PREFIX)$$f" "$$f" ;\ + echo "done" ;\ + else \ + rm "$(PREFIX)$$f" ;\ + echo "does not need optimization" ;\ + fi ;\ + done + pdftopng256: $(patsubst %.pdf, %.png, $(wildcard $(PDF2PNGFILES))) pdftotiffg4: $(patsubst %.pdf, %.tif, $(wildcard $(PDF2TIFFILES))) %.pdf: %.eps - @echo -n "epstopdf: $^..." - @$(EPSTOPDF) "$^" - @echo "done" + @echo -n "epstopdf: $^..." ;\ + $(EPSTOPDF) "$^" ;\ + echo "done" %.png: %.pdf - @echo -n "pdftopng256: $^..." - @$(GS) -sDEVICE=png256 -r$(RES) -q -sOutputFile=$(^:.pdf=.png) \ - -dNOPAUSE -dBATCH -dSAFER "$^" - @echo "done" + @echo -n "pdftopng256: $^..." ;\ + $(GS) -sDEVICE=png256 -r$(RES) -q -sOutputFile=$(^:.pdf=.png) \ + -dNOPAUSE -dBATCH -dSAFER "$^" ;\ + echo "done" %.tif: %.pdf - @echo -n "pdftotiffg4: $^..." - @$(GS) -sDEVICE=tiffg4 -r$(RES) -q -sOutputFile=$(^:.pdf=.tif) \ - -dNOPAUSE -dBATCH -dSAFER "$^" - @echo "done" + @echo -n "pdftotiffg4: $^..." ;\ + $(GS) -sDEVICE=tiffg4 -r$(RES) -q -sOutputFile=$(^:.pdf=.tif) \ + -dNOPAUSE -dBATCH -dSAFER "$^" ;\ + echo "done" + |