X-Git-Url: http://gitweb.michael.orlitzky.com/?p=mjotex.git;a=blobdiff_plain;f=GNUmakefile;h=3669ac21f657341c85f88ff72335d90425fecaaa;hp=622570769ac4829021450afb8065815e2d7516d8;hb=HEAD;hpb=55b064149243566c61fe9d1374d85710fe7253c1 diff --git a/GNUmakefile b/GNUmakefile index 6225707..3669ac2 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -31,8 +31,8 @@ BIBS = local-references.bib # MJOTEX = mjo-algebra.tex mjo-algorithm.tex mjo-arrow.tex mjo-calculus.tex MJOTEX += mjo-common.tex mjo-complex.tex mjo-cone.tex mjo-convex.tex -MJOTEX += mjo-eja.tex mjo-font.tex mjo-linear_algebra.tex mjo-listing.tex -MJOTEX += mjo-proof_by_cases.tex mjo-set.tex mjo-theorem.tex +MJOTEX += mjo-eja.tex mjo-font.tex mjo-hurwitz.tex mjo-linear_algebra.tex +MJOTEX += mjo-listing.tex mjo-proof_by_cases.tex mjo-set.tex mjo-theorem.tex MJOTEX += mjo-theorem-star.tex mjo-topology.tex mjo.bst # Compile a list of raw source code listings (*.listing) and their @@ -88,26 +88,21 @@ endif # in a makefile? # # At the start of this target, we call $(LATEX) to compile $(PN).tex. -# The first step is to check for the existence of a "previous" -# file. If there isn't one, this is the first time that we've tried to -# build the PDF. In that case, take the PDF that we've just built and -# make *that* the previous file. Then start all over. If there is a -# previous file, then this is the second (or more) time that we've -# tried to build the PDF. We diff the PDF file that we've just built -# against the previous file; if they're the same, then we've succeeded -# and stop. Otherwise, we make the new PDF the previous file, and -# start all over. The end result is that we will loop until the -# newly-created PDF and the previous file are identical. +# Afterwards, we check for the existence of a "previous" file. If +# there isn't one, then this is the first time that we've built the +# PDF. In that case, we take the PDF that we've just built and make it +# the "previous" file before starting all over. If, on the other hand, +# there already *was* a "previous" file, then this is the second (or +# third...) time that we've built the PDF. We diff the newly-built PDF +# against the "previous" file; if they're the same, then we've +# succeeded and stop. Otherwise, we make the new PDF the "previous" +# one, and start all over. The end result is that we will loop until +# the newly-created PDF and the "previous" one are identical. # $(PN).pdf: $(SRCS) $(PN).bbl $(INDEX_DSTS) $(LATEX) $(PN).tex - if [ ! -f $@.previous ]; then \ - mv $@ $@.previous; \ - $(MAKE) $@; \ - fi; - - if cmp -s $@ $@.previous; then \ + if [ -f $@.previous ] && cmp -s $@ $@.previous; then \ rm $@.previous; \ else \ mv $@ $@.previous; \ @@ -159,7 +154,7 @@ $(PN).bbl: $(SRCS) | $(PN).aux ifdef BIBS bibtex $(PN).aux else - echo -n '' > $@ + printf '' > $@ endif # If the output PDF exists but the log file does not, then an attempt @@ -202,7 +197,7 @@ check-undefined: $(PN).log .PHONY: check-sage check-sage: $(SAGE_LISTING_DSTS) ifdef SAGE_LISTING_DSTS - sage -t --timeout=0 --memlimit=0 $^ + sage -t --timeout=0 $^ endif # Run a suite of checks.