]> gitweb.michael.orlitzky.com - mjotex.git/commitdiff
GNUmakefile.mjo: add a comment, and simplify the "clean" target
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 26 Feb 2026 01:33:09 +0000 (20:33 -0500)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 26 Feb 2026 01:33:09 +0000 (20:33 -0500)
GNUmakefile.mjo

index c284273d2efed7bbcbac6dfa42c0f0eea1e4b722..8578efa8329e55c982b708d4bf50a8a2f2e04fd9 100644 (file)
@@ -101,6 +101,14 @@ endif
 # 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
 
@@ -223,16 +231,11 @@ endif
 .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