Explorar el Código

[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>
tags/v1.20.1
Michael Brown hace 10 años
padre
commit
895d73f383
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. 8
    1
      src/Makefile.housekeeping

+ 8
- 1
src/Makefile.housekeeping Ver fichero

@@ -229,7 +229,7 @@ endif
229 229
 # Determine how many different BIN directories are mentioned in the
230 230
 # make goals.
231 231
 #
232
-BIN_GOALS	:= $(filter bin/% bin-%,$(MAKECMDGOALS))
232
+BIN_GOALS	:= $(filter bin bin/% bin-%,$(MAKECMDGOALS))
233 233
 BIN_GOALS_BINS	:= $(sort $(foreach BG,$(BIN_GOALS),\
234 234
 				    $(firstword $(subst /, ,$(BG)))))
235 235
 NUM_BINS	:= $(words $(BIN_GOALS_BINS))
@@ -1439,6 +1439,13 @@ hci/keymap/keymap_%.c :
1439 1439
 #
1440 1440
 # Clean-up
1441 1441
 #
1442
+
1443
+ifeq ($(NUM_BINS),0)
1444
+ALLBINS		:= bin{,-*}
1445
+CLEANUP		:= $(patsubst $(BIN)/%,$(ALLBINS)/%,$(CLEANUP))
1446
+VERYCLEANUP	:= $(patsubst $(BIN)/%,$(ALLBINS)/%,$(VERYCLEANUP))
1447
+endif
1448
+
1442 1449
 clean :
1443 1450
 	$(RM) $(CLEANUP)
1444 1451
 

Loading…
Cancelar
Guardar