help.mk 535 Bytes
Newer Older
1 2
# this makefile holds the most helpful bits for the toplevel one

3
define help_body
4
if [ -t 1 ]; then \
5
	echo '** available $(1) targets:'; \
6 7 8 9
	columnize $(2); \
else \
	printf '%s\n' $(2); \
fi
10 11 12 13
endef

help = $(and $(2),$(help_body))

14
help/distro:
15
	@$(call help,distribution,$(sort $(DISTROS:distro/%=%)))
16 17

help/ve:
18 19
	@[ -n "$(SPACE)" ] && echo; \
	$(call help,virtual environment,$(sort $(VES)))
20

21 22 23 24 25 26
help/vm:
	@[ -n "$(SPACE)" ] && echo; \
	$(call help,virtual machine,$(sort $(VMS)))

help: SPACE = 1
help: help/distro help/ve help/vm; @: