소스 검색

[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 10 년 전
부모
커밋
895d73f383
1개의 변경된 파일8개의 추가작업 그리고 1개의 파일을 삭제
  1. 8
    1
      src/Makefile.housekeeping

+ 8
- 1
src/Makefile.housekeeping 파일 보기

@@ -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…
취소
저장