~ chicken-core (chicken-5) 4c56ee40b78a760bde74a56f0deb84f8824fb3aa
commit 4c56ee40b78a760bde74a56f0deb84f8824fb3aa
Author: Mario Domenech Goulart <mario@parenteses.org>
AuthorDate: Thu Jul 8 23:49:53 2021 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Fri Aug 6 22:18:09 2021 +0200
Make "make clean" also remove build configuration files
The fact that "make clean" doesn't remove build configuration files
(e.g., chicken-config.h) is a recurrent source of tricky-to-debug
installation issues, specially for newcomers.
This change:
* makes `clean' remove build configuration files.
* removes the `distclean' target (now `clean' does what `distclean'
used to do).
Ticket: #1755
Signed-off-by: felix <felix@call-with-current-continuation.org>
diff --git a/NEWS b/NEWS
index 91507e1d..06e8084a 100644
--- a/NEWS
+++ b/NEWS
@@ -78,6 +78,9 @@
still requires PLATFORM to be set, and it can still be provided
manually, but it is no longer required in the common case.
- Fix Linux to MingW cross-compilation (#1768, thanks to Théo Cavignac)
+ - The `clean' target for make now also removes build configuration files.
+ - The `distclean' target for make has been removed (now `clean' does what
+ `distclean' used to do).
- Tools
- Fixed a bug in chicken-install (#1744) that would cause
diff --git a/rules.make b/rules.make
index 83ab53cf..eba0dcde 100644
--- a/rules.make
+++ b/rules.make
@@ -952,7 +952,9 @@ html:
# cleaning up
-.PHONY: clean distclean spotless confclean testclean
+.PHONY: clean spotless confclean testclean
+
+BUILD_CONFIG_FILES = chicken-config.h chicken-defaults.h chicken-install.rc chicken-uninstall.rc
clean:
-$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)$(EXE) $(PROGRAM_PREFIX)csi$(PROGRAM_SUFFIX)$(EXE) $(PROGRAM_PREFIX)csc$(PROGRAM_SUFFIX)$(EXE) \
@@ -967,21 +969,19 @@ clean:
$(PRIMARY_LIBCHICKEN) \
lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX)$(A) \
$(IMPORT_LIBRARIES:=.import.so) $(LIBCHICKEN_IMPORT_LIBRARY) \
- $(foreach lib,$(DYNAMIC_IMPORT_LIBRARIES),chicken.$(lib).import.scm)
+ $(foreach lib,$(DYNAMIC_IMPORT_LIBRARIES),chicken.$(lib).import.scm) \
+ $(BUILD_CONFIG_FILES)
ifdef USES_SONAME
-$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) lib$(PROGRAM_PREFIX)chicken$(PROGRAM_SUFFIX).so.$(BINARYVERSION)
endif
confclean:
- -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) \
- chicken-config.h chicken-defaults.h chicken-install.rc chicken-uninstall.rc
+ -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(BUILD_CONFIG_FILES)
-spotless: distclean testclean
+spotless: clean testclean
-$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DISTFILES) \
buildid buildbranch
-distclean: clean confclean
-
testclean:
-$(REMOVE_COMMAND) $(REMOVE_COMMAND_RECURSIVE_OPTIONS) \
$(SRCDIR)tests$(SEP)*.dll \
Trap