From adeb08a96208ed55d09cf5d1126c0078890dfde3 Mon Sep 17 00:00:00 2001 From: witiko <witiko@gmail.com> Date: Tue, 14 Apr 2015 12:11:31 +0200 Subject: [PATCH] Added the `fithesis3.zip` make target to generate distributions. --- Makefile | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 805fcb5..e0e093d 100644 --- a/Makefile +++ b/Makefile @@ -1,16 +1,19 @@ .PHONY: all explode clean clean-all install SUBMAKEFILES=logo/mu logo/mu/color locale style style/mu -CLASSFILES=fithesis.cls fithesis[23].cls +CLASSFILES=fithesis.cls fithesis2.cls fithesis3.cls STYLEFILES=style/*.sty style/*/*.sty style/*/*.clo LOGOFILES=logo/*/*.eps logo/*/color/*.eps logo/*/*.pdf logo/*/color/*.pdf LOCALEFILES=locale/*.def locale/*/*.def locale/*/*/*.def DTXFILES=*.dtx locale/*.dtx style/*.dtx style/*/*.dtx RESOURCES=$(STYLEFILES) $(LOGOFILES) $(LOCALEFILES) +SOURCES=$(DTXFILES) Makefile AUXFILES=example.aux example.log example.out example.toc example.lot example.lof example.bib fithesis.aux fithesis.log fithesis.toc fithesis.ind fithesis.idx fithesis.out fithesis.ilg fithesis.gls fithesis.glo fithesis.hd MANUAL=fithesis.pdf +PDFSOURCES=fithesis.dtx example.tex PDFFILES=$(MANUAL) example.pdf -TEXLIVEFILES=$(CLASSFILES) $(RESOURCES) +DISTFILE=fithesis3.zip +TEXFILES=$(CLASSFILES) $(RESOURCES) TEXLIVEDIR=$(shell kpsewhich -var-value TEXMFLOCAL) # This pseudo-target creates the class files, typesets both @@ -22,7 +25,7 @@ all: # This pseudo-target creates the class files and typesets # both the example file and the technical documentation -explode: fithesis3.cls $(PDFFILES) +explode: fithesis3.cls $(PDFFILES) $(DISTFILE) # This target creates the class files. fithesis3.cls: fithesis.ins fithesis.dtx @@ -41,6 +44,10 @@ example.pdf: example.tex fithesis3.cls $(RESOURCES) pdflatex $< pdflatex $< +# This target generates a distribution file +$(DISTFILE): $(TEXFILES) $(SOURCES) $(PDFFILES) $(PDFSOURCES) + zip -r -v $@ $^ + # This pseudo-target installs the class files and # the technical documentation into the folder structure # of the TeXLive package, whose root directory is @@ -51,7 +58,7 @@ install: exit 1; \ fi mkdir --parents "$(to)/tex/latex/fithesis3" - cp --parents --verbose $(TEXLIVEFILES) "$(to)/tex/latex/fithesis3" + cp --parents --verbose $(TEXFILES) "$(to)/tex/latex/fithesis3" mkdir --parents "$(to)/doc/latex/fithesis3" cp $(MANUAL) "$(to)/doc/latex/fithesis3/manual.pdf" texhash @@ -62,5 +69,5 @@ clean: # This pseudo-target removes any makeable files. implode: clean - rm -f $(PDFFILES) $(CLASSFILES) + rm -f $(PDFFILES) $(CLASSFILES) $(DISTFILE) for dir in $(SUBMAKEFILES); do make implode -C "$$dir"; done -- GitLab