initial frontend support
This commit is contained in:
parent
9eae9d7b15
commit
d1922af0dd
2
Makefile
2
Makefile
@ -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 $@
|
||||
|
@ -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 \
|
||||
|
16
lib/help.mk
16
lib/help.mk
@ -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:'; \
|
||||
|
Loading…
Reference in New Issue
Block a user