diff options
Diffstat (limited to 'Master/texmf-dist/doc/latex/thuthesis/Makefile')
-rw-r--r-- | Master/texmf-dist/doc/latex/thuthesis/Makefile | 83 |
1 files changed, 47 insertions, 36 deletions
diff --git a/Master/texmf-dist/doc/latex/thuthesis/Makefile b/Master/texmf-dist/doc/latex/thuthesis/Makefile index a092544d2ac..f059320ed0b 100644 --- a/Master/texmf-dist/doc/latex/thuthesis/Makefile +++ b/Master/texmf-dist/doc/latex/thuthesis/Makefile @@ -1,22 +1,24 @@ # Makefile for ThuThesis -# Compiling method: xelatex/pdflatex/dvipdfmx -METHOD = xelatex +# Compiling method: latexmk/xelatex/pdflatex/dvipdfmx +METHOD = latexmk +# Set opts for latexmk if you use it +LATEXMKOPTS = -xelatex # Basename of thesis THESISMAIN = main # Basename of shuji SHUJIMAIN = shuji ifeq ($(MAKE),) - override MAKE = make + override MAKE = make endif ifeq ($(TEXI2DVI),) - override TEXI2DVI = texi2dvi + override TEXI2DVI = texi2dvi endif PACKAGE=thuthesis -SOURCES=$(PACKAGE).ins $(PACKAGE).dtx +SOURCES=$(PACKAGE).ins $(PACKAGE).dtx THESISCONTENTS=$(THESISMAIN).tex data/*.tex $(EPS) # NOTE: update this to reflect your local file types. EPS=$(wildcard figures/*.eps) @@ -27,11 +29,13 @@ CLSFILES=dtx-style.sty $(PACKAGE).cls $(PACKAGE).cfg # make deletion work on Windows ifdef SystemRoot RM = del /Q + SLASH = \\ else RM = rm -f + SLASH = / endif -.PHONY: all clean distclean dist thesis shuji doc cls +.PHONY: all clean distclean dist thesis viewthesis shuji viewshuji doc viewdoc cls FORCE_MAKE all: doc thesis shuji @@ -43,6 +47,9 @@ $(CLSFILES): $(SOURCES) ###### for doc +viewdoc: doc + open $(PACKAGE).pdf + doc: $(PACKAGE).pdf ifeq ($(METHOD),xelatex) @@ -63,6 +70,11 @@ $(PACKAGE).pdf: $(CLSFILES) pdflatex $(PACKAGE).dtx pdflatex $(PACKAGE).dtx +else ifeq ($(METHOD),latexmk) + +$(PACKAGE).pdf: $(CLSFILES) FORCE_MAKE + latexmk $(LATEXMKOPTS) $(PACKAGE).dtx + else $(PACKAGE).dvi: $(CLSFILES) @@ -80,6 +92,9 @@ endif ###### for thesis +viewthesis: thesis + open $(THESISMAIN).pdf + thesis: $(THESISMAIN).pdf ifeq ($(METHOD),xelatex) @@ -104,6 +119,11 @@ $(THESISMAIN).bbl: $(BIBFILE) -bibtex $(THESISMAIN) $(RM) $(THESISMAIN).pdf +else ifeq ($(METHOD),latexmk) + +$(THESISMAIN).pdf: $(CLSFILES) FORCE_MAKE + latexmk $(LATEXMKOPTS) $(THESISMAIN) + else $(THESISMAIN).pdf: $(THESISMAIN).dvi @@ -121,6 +141,10 @@ endif ###### for shuji + +viewshuji: shuji + open $(SHUJIMAIN).pdf + shuji: $(SHUJIMAIN).pdf ifeq ($(METHOD),xelatex) @@ -133,6 +157,11 @@ else ifeq ($(METHOD),pdflatex) $(SHUJIMAIN).pdf: $(CLSFILES) $(SHUJICONTENTS) pdflatex $(SHUJIMAIN).tex +else ifeq ($(METHOD),latexmk) + +$(SHUJIMAIN).pdf: $(CLSFILES) FORCE_MAKE + latexmk $(LATEXMKOPTS) $(SHUJIMAIN) + else $(SHUJIMAIN).dvi: $(CLSFILES) $(SHUJICONTENTS) @@ -144,39 +173,21 @@ $(SHUJIMAIN).pdf: $(SHUJIMAIN).dvi endif -clean: - -@$(RM) \ - *~ \ - *.aux \ - *.bak \ - *.bbl \ - *.blg \ - *.dvi \ - *.glo \ - *.gls \ - *.idx \ - *.ilg \ - *.ind \ - *.ist \ - *.log \ - *.out \ - *.ps \ - *.thm \ - *.toc \ - *.lof \ - *.lot \ - *.loe \ - data/*.aux \ - dtx-style.sty - -distclean: clean +clean: + latexmk -c $(PACKAGE).dtx $(THESISMAIN) $(SHUJIMAIN) + -@$(RM) $(PACKAGE).dvi $(THESISMAIN).dvi $(SHUJIMAIN).dvi + -@$(RM) *~ + +cleanall: clean + -@$(RM) $(PACKAGE).pdf $(THESISMAIN).pdf $(SHUJIMAIN).pdf + +distclean: cleanall -@$(RM) $(CLSFILES) - -@$(RM) $(PACKAGE).pdf $(THESISMAIN).pdf $(SHUJI).pdf -@$(RM) -r dist dist: - @if [ -z "$(VERSION)" ]; then \ - echo "Usage: make dist VERSION=<version#>"; \ + @if [ -z "$(version)" ]; then \ + echo "Usage: make dist version=[x.y.z | ctan]"; \ else \ - ./makedist.sh $(VERSION) UTF8; \ + gulp build --version=$(version); \ fi |