initial frontend support

This commit is contained in:
Michael Shigorin 2012-05-12 16:22:15 +03:00
parent 9eae9d7b15
commit d1922af0dd
3 changed files with 16 additions and 4 deletions

View File

@ -23,7 +23,7 @@ endif
# recursive make considered useful for m-p
MAKE += -r --no-print-directory
DIRECT_TARGETS := clean distclean check help
DIRECT_TARGETS := clean distclean check help help/distro help/ve
.PHONY: $(DIRECT_TARGETS)
$(DIRECT_TARGETS):
@$(MAKE) -f main.mk $@

View File

@ -53,7 +53,7 @@ distclean: clean
# than BUILDDIR is -- usually it's unneeded afterwards so just zap it
postclean: build-image
@{ \
if [ "$(NUM_TARGETS)" -gt 1 -a -z "$(DEBUG)" ] || \
if [ "$(NUM_TARGETS)" -gt 1 -a -z "$(DEBUG)" -a -z "$(__frontend)" ] ||\
[ ! -L "$(SYMLINK)" -a "0$(DEBUG)" -lt 2 ]; then \
echo "$(TIME) cleaning up after build"; \
$(MAKE) -C "$(BUILDDIR)" distclean \

View File

@ -1,8 +1,20 @@
# this makefile holds the most helpful bits for the toplevel one
ifdef __frontend
define help_body
@for i in $(2); do echo $$i; done
endef
else
define help_body
@echo '** available $(1) targets:'; \
columnize $(2)
endef
endif
help = $(and $(2),$(help_body))
help/distro:
@echo '** available distribution targets:'; \
columnize $(sort $(DISTROS:distro/%=%))
$(call help,distribution,$(sort $(DISTROS:distro/%=%)))
help/ve:
@echo '** available virtual environment targets:'; \