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