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.
This commit is contained in:
Eli Zaretskii 2021-04-01 15:57:55 +03:00
parent 4582c96828
commit 12d2fd6037
4 changed files with 8 additions and 4 deletions

View file

@ -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'"

View file

@ -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)))

View file

@ -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

View file

@ -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