X-Git-Url: http://gitweb.michael.orlitzky.com/?a=blobdiff_plain;f=makefile;h=521281ab0a791a4348be6d8d0593a5b473384a3b;hb=829e670e2ee973909b6fcf36031fcf669cbdb922;hp=61dbbc412ed7572f614585e6117bed4d7fb119a9;hpb=3a61696a5cd3c1a8cbd69b89bcf47d3bbf47a8d1;p=mjotex.git diff --git a/makefile b/makefile index 61dbbc4..521281a 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,15 @@ 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-arrow.tex mjo-common.tex mjo-cone.tex +MJOTEX += mjo-convex.tex mjo-font.tex mjo-linear_algebra.tex mjo-misc.tex +MJOTEX += mjo-proof_by_cases.tex mjo-theorem.tex mjo-theorem-star.tex +MJOTEX += 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 +41,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 +50,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 +73,4 @@ clean: .PHONY: dist dist: $(PN).bbl mkdir -p dist - cp $(PN).tex $(PN).bbl $(BIBPATHS) $(MJOTEXPATHS) dist/ + cp $(SRCS) $(PN).bbl dist/