From: Michael Orlitzky Date: Wed, 9 Mar 2016 00:25:20 +0000 (-0500) Subject: Combine some makefile variables and list all mjotex files therein. X-Git-Tag: posZ-submitted-laa~54 X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mjotex.git;a=commitdiff_plain;h=c8d8bbdccefb39cad8e8748cc2251179428bdf24 Combine some makefile variables and list all mjotex files therein. --- diff --git a/makefile b/makefile index 61dbbc4..af651c6 100644 --- a/makefile +++ b/makefile @@ -1,6 +1,5 @@ # -# Example makefile using some of mjotex (fonts, theorems) and a BibTeX -# references database. +# Example makefile using mjotex and a BibTeX references database. # # The latex compiler. @@ -15,12 +14,14 @@ BIBS = references.bib # A space-separated list of the mjotex files that you use. The path to # mjotex must be contain in your $TEXINPUTS environment variable. -MJOTEX = mjo-font.tex mjo-theorem.tex +MJOTEX = mjo-algorithm.tex mjo-common.tex mjo-cone.tex mjo-convex.tex +MJOTEX += mjo-font.tex mjo-linear_algebra.tex mjo-proof_by_cases.tex +MJOTEX += mjo-theorem.tex mjo-topology.tex # Use kpsewhich (from the kpathsea suite) to find the absolute paths -# of the bibtex/mjotex files listed in in $(BIBS)/$(MJOTEX). -BIBPATHS = $(shell kpsewhich $(BIBS)) -MJOTEXPATHS = $(shell kpsewhich $(MJOTEX)) +# of the bibtex/mjotex files listed in in $(BIBS)/$(MJOTEX). The SRCS +# variable should contain all (Bib)TeX source files for the document. +SRCS = $(PN).tex $(shell kpsewhich $(BIBS)) $(shell kpsewhich $(MJOTEX)) # The first target is the default, so put the PDF document first. @@ -39,7 +40,7 @@ MJOTEXPATHS = $(shell kpsewhich $(MJOTEX)) # The process is kind of like finding a fixpoint of `make` with # respect to the contents of the aux file. # -$(PN).pdf: $(PN).tex $(PN).aux $(PN).bbl $(MJOTEXPATHS) +$(PN).pdf: $(SRCS) $(PN).aux $(PN).bbl mv $(PN).aux $(PN).aux.bak $(LATEX) $< && $(LATEX) $< if cmp -s $(PN).aux $(PN).aux.bak; then \ @@ -48,7 +49,7 @@ $(PN).pdf: $(PN).tex $(PN).aux $(PN).bbl $(MJOTEXPATHS) $(MAKE) $@; \ fi; -$(PN).aux: $(PN).tex $(BIBPATHS) +$(PN).aux: $(SRCS) $(LATEX) $< $(PN).bbl: $(PN).aux @@ -71,4 +72,4 @@ clean: .PHONY: dist dist: $(PN).bbl mkdir -p dist - cp $(PN).tex $(PN).bbl $(BIBPATHS) $(MJOTEXPATHS) dist/ + cp $(SRCS) $(PN).bbl dist/