main.mk: factored out help targets

These are better off in their own lib/help.mk
This commit is contained in:
Michael Shigorin 2012-03-19 13:23:58 +02:00
parent 79bb3f8d6e
commit 5dba27d011
2 changed files with 13 additions and 12 deletions

12
lib/help.mk Normal file
View File

@ -0,0 +1,12 @@
# this makefile holds the most helpful bits for the toplevel one
help/distro:
@echo '** available distribution targets:'; \
echo $(DISTROS) | fmt -sw"$$((COLUMNS>>1))" | column -t
help/ve:
@echo '** available virtual environment targets:'; \
echo $(VES) | fmt -sw"$$((COLUMNS>>1))" | column -t
help: | help/distro help/space help/ve; @:
help/space:; @echo

13
main.mk
View File

@ -45,17 +45,6 @@ IMAGES := $(DISTROS) $(VES)
.PHONY: $(IMAGES) $(DISTRO_TARGETS) $(VE_TARGETS)
.PHONY: debug everything help space
distro/help:
@echo '** available distribution targets:'
@echo $(DISTROS) | fmt -sw"$$((COLUMNS>>1))" | column -t
ve/help:
@echo '** available virtual environment targets:'
@echo $(VES) | fmt -sw"$$((COLUMNS>>1))" | column -t
help: | distro/help space ve/help
space:; @echo
### duplicate but still needed
everything:
@n=1; sum=$(words $(DISTROS)); \
@ -75,7 +64,7 @@ $(IMAGES): debug \
build; @:
# convenience shortcut
$(DISTROS:distro/%=%): %: distro/%
$(DISTROS:distro/%=%): %: distro/%; @:
debug:
ifeq (2,$(DEBUG))