From 12d2fd6037a87241f0966427f5788eb939c37c53 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 1 Apr 2021 15:57:55 +0300 Subject: [PATCH] Fix 'extraclean' targets * GNUmakefile: Add description of 'extraclean'. * Makefile.in (extraclean_dirs): Add lwlib. * lwlib/Makefile.in (clean mostlyclean extraclean): Add 'extraclean' target. * lisp/Makefile.in (extraclean): Remove ${loaddefs}, not just ${LOADDEFS}. Delete all backup and autosave files. --- GNUmakefile | 2 ++ Makefile.in | 2 +- lisp/Makefile.in | 4 +++- lwlib/Makefile.in | 4 ++-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/GNUmakefile b/GNUmakefile index f27163840b7..c8d4832aab1 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -50,6 +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 all generated files," + @echo " backup files 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'" diff --git a/Makefile.in b/Makefile.in index 4fa7c9ed5f1..f3ba50c55ed 100644 --- a/Makefile.in +++ b/Makefile.in @@ -923,7 +923,7 @@ maintainer-clean: bootstrap-clean $(maintainer_clean_dirs:=_maintainer-clean) ### Note that we abuse this in some subdirectories (eg leim), ### to delete some generated files that are slow to rebuild. extraclean_dirs = ${NTDIR} lib-src src leim \ - admin/charsets admin/grammars admin/unidata lisp lib + admin/charsets admin/grammars admin/unidata lisp lib lwlib $(foreach dir,$(extraclean_dirs),$(eval $(call submake_template,$(dir),extraclean))) diff --git a/lisp/Makefile.in b/lisp/Makefile.in index 8ea28415585..d62c2cfbbed 100644 --- a/lisp/Makefile.in +++ b/lisp/Makefile.in @@ -449,8 +449,10 @@ maintainer-clean: distclean bootstrap-clean rm -f TAGS extraclean: bootstrap-clean distclean - -for file in $(LOADDEFS); do rm -f $${file}~; done + -for file in $(loaddefs); do rm -f $${file}~; done -rm -f $(lisp)/loaddefs.el~ + -find $(lisp) -name '*~' $(FIND_DELETE) + -find $(lisp) -name '#*' $(FIND_DELETE) .PHONY: check-declare diff --git a/lwlib/Makefile.in b/lwlib/Makefile.in index fb0ae0e1c21..ce77789db89 100644 --- a/lwlib/Makefile.in +++ b/lwlib/Makefile.in @@ -93,9 +93,9 @@ globals_h = ../src/globals.h $(globals_h): $(MAKE) -C ../src globals.h -.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean +.PHONY: mostlyclean clean distclean bootstrap-clean maintainer-clean extraclean -clean mostlyclean: +clean mostlyclean extraclean: rm -f ./*.o liblw.a \#* $(DEPDIR)/* distclean: clean -- 2.39.2