diff options
Diffstat (limited to 'Master/texmf-dist/source/latex/svn-multi/Makefile')
-rw-r--r-- | Master/texmf-dist/source/latex/svn-multi/Makefile | 114 |
1 files changed, 80 insertions, 34 deletions
diff --git a/Master/texmf-dist/source/latex/svn-multi/Makefile b/Master/texmf-dist/source/latex/svn-multi/Makefile index 719834dda14..e5964b0c68a 100644 --- a/Master/texmf-dist/source/latex/svn-multi/Makefile +++ b/Master/texmf-dist/source/latex/svn-multi/Makefile @@ -1,57 +1,70 @@ -# $Id: Makefile 628 2007-07-10 20:32:06Z martin $ +# $Id: Makefile 1052 2009-05-03 12:24:53Z martin $ + +PACKAGE = svn-multi +PACKAGE_STY = ${PACKAGE}.sty +PACKAGE_DTX = ${PACKAGE}.dtx ${PACKAGE}-pl.dtx +PACKAGE_SCR = ${PACKAGE}.pl +PACKAGE_DOC = $(PACKAGE_DTX:.dtx=.pdf) +PACKAGE_SRC = ${PACKAGE_DTX} ${PACKAGE}.ins Makefile example_chap1.tex example_main.tex group_example.tex +PACKFILES = ${PACKAGE_SRC} ${PACKAGE_DOC} README + +TEXAUX = *.aux *.log *.glo *.ind *.idx *.out *.svn *.svx *.svt *.toc *.ilg *.gls *.hd *.exa *.exb *.fdb_latexmk +INSGENERATED = ${PACKAGE_STY} svnkw.sty svn-multi.pl +GENERATED = ${INSGENERATED} ${PACKAGE}.pdf svn-multi-pl.pdf example.pdf group_example.pdf group_example_*.tex ${PACKAGE}.zip ${PACKAGE}.tar.gz ${TESTDIR}/test*.pdf +ZIPFILE = ${PACKAGE}-${ZIPVERSION}.zip +TDSZIPFILE = ${PACKAGE}.tds.zip -PACKAGE=svn-multi -PACKFILES = ${PACKAGE}.dtx ${PACKAGE}.ins ${PACKAGE}.pdf svn-multi-pl.dtx example_main.tex \ - example_chap1.tex example.pdf Makefile README group_example.tex -TEXAUX = *.aux *.log *.glo *.ind *.idx *.out *.svn *.svx *.svt *.toc *.ilg *.gls *.hd TESTDIR = tests TESTS = $(patsubst %.tex,%,$(subst ${TESTDIR}/,,$(wildcard ${TESTDIR}/test?.tex ${TESTDIR}/test??.tex))) # look for all test*.tex file names and remove the '.tex' TESTARGS = -output-directory ${TESTDIR} -INSGENERATED = ${PACKAGE}.sty svnkw.sty svn-multi.pl -GENERATED = ${INSGENERATED} ${PACKAGE}.pdf svn-multi-pl.pdf example.pdf group_example.pdf group_example_*.tex ${PACKAGE}.zip ${PACKAGE}.tar.gz ${TESTDIR}/test*.pdf -ZIPFILE = ${PACKAGE}-${ZIPVERSION}.zip LATEX_OPTIONS = -interaction=batchmode LATEX = pdflatex ${LATEX_OPTIONS} +TEXMFDIR = ${HOME}/texmf + RED = \033[01;31m GREEN = \033[01;32m WHITE = \033[00m -.PHONY: all doc package clean fullclean example testclean ${TESTS} +CP = cp -v +MV = mv -v +RMDIR = rm -rf +MKDIR = mkdir -p + +.PHONY: all doc package clean fullclean example testclean ${TESTS} tds ${CHECK_LOG} + +############################################################################### all: package doc example new: fullclean all -doc: ${PACKAGE}.pdf svn-multi-pl.pdf +doc: ${PACKAGE_DOC} -package: ${PACKAGE}.sty ${PACKAGE}.pl +package: ${PACKAGE_STY} ${PACKAGE_SCR} %.pdf: %.dtx ${LATEX} $*.dtx - ${LATEX} $*.dtx -makeindex -s gind.ist -o $*.ind $*.idx -makeindex -s gglo.ist -o $*.gls $*.glo ${LATEX} $*.dtx ${LATEX} $*.dtx -%.pdf: %.eps - epstopdf $< - -%.eps: %.dia - dia -t eps -e $@ $< - ${PACKAGE}.pdf: ${PACKAGE}.sty -${INSGENERATED}: *.dtx ${PACKAGE}.ins +${INSGENERATED}: ${PACKAGE_DTX} ${PACKAGE}.ins yes | latex ${PACKAGE}.ins @-chmod +x *.pl clean: rm -f ${TEXAUX} $(addprefix ${TESTDIR}/, ${TEXAUX}) -fullclean: - rm -f ${TEXAUX} $(addprefix ${TESTDIR}/, ${TEXAUX}) ${GENERATED} *~ *.backup +fullclean: clean + rm -f ${GENERATED} *~ *.backup + rm -f ${PACKAGE}*.zip + rm -rf tds/ + +############################################################################### example: example.pdf gexample @@ -66,30 +79,30 @@ gexample: group_example.pdf group_example.pdf: group_example.tex svn-multi.sty ${RM} $(addprefix group_example, ${TEXAUX}) group_example_*.tex ${LATEX} $< - ${LATEX} $< perl svn-multi.pl group_example ${LATEX} $< ${LATEX} $< ${LATEX} $< -zip: fullclean package doc example tests ${ZIPFILE} -${PACKAGE}.zip: zip +############################################################################### + +zip: ${PACKFILES} + @${MAKE} --no-print-directory ${ZIPFILE} -zip: ZIPVERSION=$(shell grep 'Package: svn-multi ' svn-multi.log | \ - sed -e 's/.*Package: svn-multi ....\/..\/..\s\+\(v\S\+\).*/\1/') +zip: ZIPVERSION=$(shell grep "Package: ${PACKAGE} " ${PACKAGE}.log | \ + sed -e "s/.*Package: ${PACKAGE} ....\/..\/..\s\+\(v\S\+\).*/\1/") -${ZIPFILE}: ${PACKFILES} - grep -q '\* Checksum passed \*' svn-multi.log - grep -q '\* Checksum passed \*' svn-multi-pl.log +${PACKAGE}%.zip: ${PACKFILES} + grep -L '\* Checksum passed \*' ${PACKAGE_DTX:.dtx=.log} | wc -l | grep -q '^0$$' -pdfopt ${PACKAGE}.pdf opt_${PACKAGE}.pdf && mv opt_${PACKAGE}.pdf ${PACKAGE}.pdf - zip ${ZIPFILE} ${PACKFILES} + ${RM} $@ + zip $@ ${PACKFILES} @echo - @echo "ZIP file ${ZIPFILE} created!" + @echo "ZIP file $@ created!" -tar.gz: ${PACKAGE}.tar.gz +release: fullclean package doc example tests ${ZIPFILE} -${PACKAGE}.tar.gz: - tar -czf $@ ${PACKFILES} +############################################################################### # Make sure TeX finds the input files in TESTDIR tests ${TESTS}: export TEXINPUTS:=${TEXINPUTS}:${TESTDIR} @@ -112,4 +125,37 @@ ${TESTS}: % : ${TESTDIR}/%.tex package testclean then /bin/echo -e "${GREEN}$@ succeeded${WHITE}" >&2; \ else /bin/echo -e "${RED}$@ failed!!!!!!${WHITE}" >&2; fi +############################################################################### + +tds: .tds + +.tds: ${PACKAGE_STY} ${PACKAGE_DOC} ${PACKAGE_SRC} + @grep -q '\* Checksum passed \*' ${PACKAGE}.log + ${RMDIR} tds + ${MKDIR} tds/ + ${MKDIR} tds/tex/ tds/tex/latex/ tds/tex/latex/${PACKAGE}/ + ${MKDIR} tds/doc/ tds/doc/latex/ tds/doc/latex/${PACKAGE}/ + ${MKDIR} tds/source/ tds/source/latex/ tds/source/latex/${PACKAGE}/ + test -n "${PACKAGE_SCR}" && ${MKDIR} tds/scripts/ tds/scripts/${PACKAGE}/ + ${CP} ${PACKAGE_STY} tds/tex/latex/${PACKAGE}/ + ${CP} ${PACKAGE_DOC} tds/doc/latex/${PACKAGE}/ + ${CP} ${PACKAGE_SRC} tds/source/latex/${PACKAGE}/ + test -n "${PACKAGE_SCR}" && ${CP} ${PACKAGE_SCR} tds/scripts/${PACKAGE}/ + @touch $@ + +tdszip: ${TDSZIPFILE} + +${TDSZIPFILE}: .tds + ${RM} ${TDSZIPFILE} + cd tds && zip -r ../${TDSZIPFILE} . + +############################################################################### + +install: .tds + test -d "${TEXMFDIR}" && ${CP} -a tds/* "${TEXMFDIR}/" && texhash ${TEXMFDIR} + +uninstall: + test -d "${TEXMFDIR}" && ${RM} -rv "${TEXMFDIR}/tex/latex/${PACKAGE}" \ + "${TEXMFDIR}/doc/latex/${PACKAGE}" "${TEXMFDIR}/source/latex/${PACKAGE}" \ + "${TEXMFDIR}/scripts/${PACKAGE}" && texhash ${TEXMFDIR} |