diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/standalone/Makefile')
-rw-r--r-- | Master/texmf-dist/source/latex/standalone/Makefile | 60 |
1 files changed, 36 insertions, 24 deletions
diff --git a/Master/texmf-dist/source/latex/standalone/Makefile b/Master/texmf-dist/source/latex/standalone/Makefile index edd3f4ecdb8..f399ae376d5 100644 --- a/Master/texmf-dist/source/latex/standalone/Makefile +++ b/Master/texmf-dist/source/latex/standalone/Makefile @@ -4,6 +4,7 @@ DOCINSTALLDIR=${TEXMF}/doc/latex/standalone CP=cp RMDIR=rm -rf PDFLATEX=pdflatex -interaction=batchmode +LATEXMK=latexmk -pdf -silent PACKEDFILES=standalone.cls standalone.sty standalone.cfg standalone.tex DOCFILES=standalone.pdf @@ -11,21 +12,32 @@ SRCFILES=standalone.dtx standalone.ins README Makefile all: unpack doc -unpack: standalone.dtx standalone.ins - yes | pdflatex standalone.ins - package: unpack class: unpack -doc: ${DOCFILES} +${PACKEDFILES}: standalone.dtx standalone.ins + yes | pdflatex standalone.ins + +unpack: ${PACKEDFILES} + +# 'doc' and 'standalone.pdf' call itself until everything is stable +doc: standalone.pdf + @${MAKE} --no-print-directory standalone.pdf + +pdfopt: doc + @-pdfopt standalone.pdf .temp.pdf && mv .temp.pdf standalone.pdf + +standalone.pdf: standalone.dtx standalone.gls standalone.ind + ${LATEXMK} standalone.dtx + +standalone.idx standalone.glo: standalone.dtx + ${LATEXMK} standalone.dtx + +standalone.ind: standalone.idx + -makeindex -s gind.ist -o "$@" "$<" -standalone.pdf: %.pdf: standalone.dtx - ${PDFLATEX} $< - ${PDFLATEX} $< - -makeindex -s gind.ist -o $*.ind $*.idx - -makeindex -s gglo.ist -o $*.gls $*.glo - ${PDFLATEX} $< - ${PDFLATEX} $< +standalone.gls: standalone.glo + -makeindex -s gglo.ist -o "$@" "$<" .PHONY: test @@ -33,8 +45,9 @@ test: unpack for T in test*.tex; do echo "$$T"; pdflatex -interaction=batchmode $$T && echo "OK" || echo "Failure"; done clean: - ${RM} ${PACKEDFILES} *.zip *.log *.aux *.toc *.vrb *.nav *.pdf *.snm *.out *.fdb_latexmk *.glo - ${RMDIR} .tds + -latexmk -C standalone.dtx + ${RM} ${PACKEDFILES} *.zip *.log *.aux *.toc *.vrb *.nav *.pdf *.snm *.out *.fdb_latexmk *.glo *.gls *.hd *.sta *.stp + ${RMDIR} tds install: unpack doc ${INSTALLDIR} ${DOCINSTALLDIR} ${CP} ${PACKEDFILES} ${INSTALLDIR} @@ -57,18 +70,17 @@ zip: standalone.zip tdszip: standalone.tds.zip -standalone.zip: ${SRCFILES} ${DOCFILES} +standalone.zip: ${SRCFILES} ${DOCFILES} | pdfopt ${RM} $@ zip $@ $^ -standalone.tds.zip: ${SRCFILES} ${DOCFILES} ${PACKEDFILES} - ${RMDIR} .tds - mkdir -p .tds/tex/latex/standalone - mkdir -p .tds/doc/latex/standalone - mkdir -p .tds/source/latex/standalone - ${CP} ${DOCFILES} .tds/doc/latex/standalone - ${CP} ${PACKEDFILES} .tds/tex/latex/standalone - ${CP} ${SRCFILES} .tds/source/latex/standalone - cd .tds; zip -r ../$@ . - ${RMDIR} .tds +standalone.tds.zip: ${SRCFILES} ${PACKEDFILES} ${DOCFILES} | pdfopt + ${RMDIR} tds + mkdir -p tds/tex/latex/standalone + mkdir -p tds/doc/latex/standalone + mkdir -p tds/source/latex/standalone + ${CP} ${DOCFILES} tds/doc/latex/standalone + ${CP} ${PACKEDFILES} tds/tex/latex/standalone + ${CP} ${SRCFILES} tds/source/latex/standalone + cd tds; zip -r ../$@ . |