#
-# 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.
# 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.
# 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 \
$(MAKE) $@; \
fi;
-$(PN).aux: $(PN).tex $(BIBPATHS)
+$(PN).aux: $(SRCS)
$(LATEX) $<
$(PN).bbl: $(PN).aux
.PHONY: dist
dist: $(PN).bbl
mkdir -p dist
- cp $(PN).tex $(PN).bbl $(BIBPATHS) $(MJOTEXPATHS) dist/
+ cp $(SRCS) $(PN).bbl dist/