]> git.eshelyaron.com Git - emacs.git/commitdiff
Make maintainer-clean delete generated files, as per standards
authorGlenn Morris <rgm@gnu.org>
Sun, 4 Apr 2021 16:19:24 +0000 (09:19 -0700)
committerGlenn Morris <rgm@gnu.org>
Sun, 4 Apr 2021 16:19:24 +0000 (09:19 -0700)
These are generated files that were once kept in the repository.
When they were removed from the repository, as a half-way measure
they were only deleted by "extraclean", but this was never
necessary and was not a proper use of that rule.
* admin/charsets/Makefile.in (gen-clean): New phony target.
(maintainer-clean): Delete generated files.
* admin/grammars/Makefile.in (gen-clean): New phony target.
(maintainer-clean): Delete generated files.
* admin/unidata/Makefile.in (gen-clean): New phony target.
(maintainer-clean): Delete generated files.
* leim/Makefile.in (gen-clean): New phony target.
(maintainer-clean): Delete generated files.
* GNUmakefile: Doc fix.

GNUmakefile
Makefile.in
admin/charsets/Makefile.in
admin/grammars/Makefile.in
admin/unidata/Makefile.in
leim/Makefile.in

index 0e01b808a0fca34d2c823357f4214c548ca8ac05..5155487de28d140eeff946804b685f24c1727dcd 100644 (file)
@@ -50,8 +50,8 @@ help:
        @echo "make distclean        -- delete all build and configuration files,"
        @echo "                         leave only files included in source distribution"
        @echo "make maintainer-clean -- delete almost everything that can be regenerated"
-       @echo "make extraclean       -- like maintainer-clean, and also delete all generated"
-       @echo "                         files, backup files and autosave files"
+       @echo "make extraclean       -- like maintainer-clean, and also delete"
+       @echo "                         backup and autosave files"
        @echo "make bootstrap        -- delete all compiled files to force a new bootstrap"
        @echo "                         from a clean slate, then build in the normal way"
        @echo "make uninstall        -- remove files installed by 'make install'"
index f3ba50c55ed466b8e25ca3447989891542f46f67..638548370c3f0102ede0911e8190c567afdf19bd 100644 (file)
@@ -48,8 +48,6 @@
 #
 # make extraclean
 #      Still more severe - delete backup and autosave files, too.
-#      Also generated files that do not normally change and can be slow
-#      to rebuild (eg leim/ja-dic).
 #
 # make bootstrap
 #      Removes all the compiled files to force a new bootstrap from a
index 1fe029984b8a55a2a463bedb442b41f9987e8e6d..00424843bc4eff5cecbae883e1b66ddd06e46c5d 100644 (file)
@@ -297,17 +297,19 @@ ${charsetdir}/%.map: ${GLIBC_CHARMAPS}/%.gz ${mapconv} ${compact}
        ${AM_V_GEN}${run_mapconv} $< '/^<.*[    ]\/x/' GLIBC-1 ${compact} > $@
 
 
-.PHONY: clean bootstrap-clean distclean maintainer-clean extraclean
+.PHONY: clean bootstrap-clean distclean maintainer-clean extraclean gen-clean
 
 clean:
 
+## IMO this should also run gen-clean.
 bootstrap-clean: clean
 
 distclean: clean
        rm -f Makefile
 
-maintainer-clean: distclean
-
-## Do not remove these files, even in a bootstrap.  They rarely change.
-extraclean:
+gen-clean:
        rm -f ${CHARSETS} ${SED_SCRIPT} ${TRANS_TABLE} ${srcdir}/charsets.stamp
+
+maintainer-clean: gen-clean distclean
+
+extraclean: maintainer-clean
index aa09d9edf949306c6253f6d7b70dea85fea1375f..1573eb3bde968b0266b898c9123f2f718a3b891a 100644 (file)
@@ -51,7 +51,7 @@ BOVINE = \
 ## FIXME Should include this one too:
 ##     ${cedetdir}/semantic/grammar-wy.el
 ## but semantic/grammar.el (which is what we use to generate grammar-wy.el)
-## requires it!
+## requires it!  https://debbugs.gnu.org/16008
 WISENT = \
        ${wisentdir}/javat-wy.el \
        ${wisentdir}/js-wy.el \
@@ -68,6 +68,8 @@ bovine: ${BOVINE}
 
 wisent: ${WISENT}
 
+## TODO add dependencies on semantic/{bovine,wisent}/grammar.el
+
 ## c-by.el, make-by.el.
 ${bovinedir}/%-by.el: ${srcdir}/%.by
        $(AM_V_GEN)[ ! -f "$@" ] || chmod +w "$@"
@@ -96,19 +98,20 @@ ${cedetdir}/srecode/srt-wy.el: ${srcdir}/srecode-template.wy
        $(AM_V_at)${make_wisent} -o "$@" $<
 
 
-.PHONY: distclean bootstrap-clean maintainer-clean extraclean
+.PHONY: distclean bootstrap-clean maintainer-clean extraclean gen-clean
 
 distclean:
        rm -f Makefile
 
-## Perhaps this should do what extraclean (qv) does.
+## IMO this should run gen-clean.
 bootstrap-clean:
 
-maintainer-clean: distclean
-
-## We do not normally delete the generated files, even in bootstrap.
-## Creating them does not take long, so we could easily change this.
-extraclean:
+gen-clean:
        rm -f ${ALL}
 
+maintainer-clean: gen-clean distclean
+
+extraclean: maintainer-clean
+
+
 # Makefile.in ends here
index 183569fb9b69a939e8e5fa3c556569374dd7f594..b7a927d191965dd6115dc7877cc45f49d88a9748 100644 (file)
@@ -85,26 +85,26 @@ ${unidir}/charscript.el: ${srcdir}/Blocks.txt ${blocks}
        $(AM_V_GEN)$(AWK) -f ${blocks} < $< > $@
 
 
-.PHONY: clean bootstrap-clean distclean maintainer-clean extraclean
+.PHONY: clean bootstrap-clean distclean maintainer-clean extraclean gen-clean
 
 clean:
        rm -f ${srcdir}/*.elc unidata.txt
 
+## IMO this should also run gen-clean.
 bootstrap-clean: clean
 
 distclean: clean
        rm -f Makefile
 
-maintainer-clean: distclean
-
-## Do not remove these files, even in a bootstrap, because they rarely
-## change and it slows down bootstrap (a tiny bit).
-## Cf leim/ja-dic (which is much slower).
-
 ## macuvs.h is a generated file, but it's also checked in because
 ## macOS builds would need to do a headless bootstrap without it,
 ## which is currently awkward.  To avoid changing checked-in files
 ## from a make target, we don't delete it here.
-extraclean: distclean
+gen-clean:
        rm -f ${unidir}/charscript.el*
        rm -f ${unifiles} ${unidir}/charprop.el
+## ref: https://lists.gnu.org/r/emacs-devel/2013-11/msg01029.html
+
+maintainer-clean: gen-clean distclean
+
+extraclean: maintainer-clean
index c2f9cf5ab5f09f1546dd836b0bd79550b068002c..2646abcfff9a625d6ddf7d0aa321348e65866c4b 100644 (file)
@@ -137,19 +137,23 @@ ${srcdir}/../lisp/language/pinyin.el: ${srcdir}/MISC-DIC/pinyin.map
        $(AM_V_GEN)${RUN_EMACS} -l titdic-cnv -f pinyin-convert $< $@
 
 
-.PHONY: bootstrap-clean distclean maintainer-clean extraclean
+.PHONY: bootstrap-clean distclean maintainer-clean extraclean gen-clean
 
+## Perhaps this should run gen-clean.
 bootstrap-clean:
        rm -f ${TIT_MISC} ${leimdir}/leim-list.el
 
 distclean:
        rm -f Makefile
 
-maintainer-clean: distclean bootstrap-clean
+maintainer-clean: gen-clean distclean
 
-## We do not delete ja-dic, even in a bootstrap, because it rarely
-## changes and is slow to regenerate.
-extraclean: bootstrap-clean
+## ja-dic rarely changes and is slow to regenerate, and tends to be a
+## bottleneck in parallel builds.
+gen-clean:
+       rm -f ${TIT_MISC} ${leimdir}/leim-list.el
        rm -rf ${leimdir}/ja-dic
 
+extraclean: maintainer-clean
+
 ### Makefile.in ends here