diff options
author | Michael Brown <mcb30@ipxe.org> | 2014-09-04 16:46:59 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2014-09-04 16:46:59 +0100 |
commit | 895d73f383f5af003ab2e5105e54c9a90b224e77 (patch) | |
tree | 8258f9500a8bf4032f31079c5b121c21e6188a8e | |
parent | 0ce3c9709578fa005ba931fc4198cb3b4b0b9d15 (diff) | |
download | ipxe-895d73f383f5af003ab2e5105e54c9a90b224e77.zip ipxe-895d73f383f5af003ab2e5105e54c9a90b224e77.tar.gz ipxe-895d73f383f5af003ab2e5105e54c9a90b224e77.tar.bz2 |
[build] Clean up all binary directories on "make [very]clean"
Allow a straightforward "make clean" or "make veryclean" to apply to
all binary directories (using the shell pattern "bin{,-*}").
Individual binary directories can be cleaned using e.g.
make bin clean
make bin-x86_64-efi clean
Reported-by: Robin Smidsrød <robin@smidsrod.no>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
-rw-r--r-- | src/Makefile.housekeeping | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/Makefile.housekeeping b/src/Makefile.housekeeping index b2c6959..c89b23b 100644 --- a/src/Makefile.housekeeping +++ b/src/Makefile.housekeeping @@ -229,7 +229,7 @@ endif # Determine how many different BIN directories are mentioned in the # make goals. # -BIN_GOALS := $(filter bin/% bin-%,$(MAKECMDGOALS)) +BIN_GOALS := $(filter bin bin/% bin-%,$(MAKECMDGOALS)) BIN_GOALS_BINS := $(sort $(foreach BG,$(BIN_GOALS),\ $(firstword $(subst /, ,$(BG))))) NUM_BINS := $(words $(BIN_GOALS_BINS)) @@ -1439,6 +1439,13 @@ hci/keymap/keymap_%.c : # # Clean-up # + +ifeq ($(NUM_BINS),0) +ALLBINS := bin{,-*} +CLEANUP := $(patsubst $(BIN)/%,$(ALLBINS)/%,$(CLEANUP)) +VERYCLEANUP := $(patsubst $(BIN)/%,$(ALLBINS)/%,$(VERYCLEANUP)) +endif + clean : $(RM) $(CLEANUP) |