From: Michael Orlitzky Date: Thu, 26 Feb 2026 01:33:09 +0000 (-0500) Subject: GNUmakefile.mjo: add a comment, and simplify the "clean" target X-Git-Url: https://gitweb.michael.orlitzky.com/?a=commitdiff_plain;h=ccf84935e836b2e055f0d36e90e6147eec6fe420;p=mjotex.git GNUmakefile.mjo: add a comment, and simplify the "clean" target --- diff --git a/GNUmakefile.mjo b/GNUmakefile.mjo index c284273..8578efa 100644 --- a/GNUmakefile.mjo +++ b/GNUmakefile.mjo @@ -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