# over the old one. But if the two differ, then we repeat this process
# in a loop until the just-built PDF is identical to the one from the
# previous iteration.
+#
+# This is the one build product that we build outside of the "build"
+# directory, and it's not just for convenience. If one attempts to
+# keep $(BUILDDIR)/$(PN).pdf open in a PDF viewer during a rebuild
+# cycle, the display flickers every time that file is overwritten
+# with a new version, even if the new version is identical to the
+# old one.
+#
$(PN).pdf: $(SRCS) $(BUILDDIR)/$(PN).bbl $(INDEX_DSTS)
$(LATEX) $(PN).tex
.PHONY: check
check: check-boxes check-chktex check-undefined check-sage
-# Clean up leftover junk. This only looks overcomplicated because
-# the *.{foo,bar} syntax supported by Bash is not POSIX, and Make
-# will execute these commands using /bin/sh (which should be POSIX).
-JUNK_EXTENSIONS = aux bbl bcf blg glo ilg ist listing lof log nav out pdf
-JUNK_EXTENSIONS += snm spl toc xml
+# Clean up build artifacts.
.PHONY: clean
clean:
- for ext in $(JUNK_EXTENSIONS); do rm -f *.$$ext; done;
- rm -rf dist/ $(BUILDDIR)/
- rm -f $(SAGE_LISTING_DSTS) $(INDEX_SRCS) $(INDEX_DSTS)
+ rm -rf dist $(BUILDDIR)
+ rm -f $(PN).pdf $(SAGE_LISTING_DSTS) $(INDEX_SRCS) $(INDEX_DSTS)
# If this document will be published, the publisher isn't going to
# have your BibTeX database or your mjotex files. So, you need to