SHELL := /bin/sh MAKEFLAGS += -rR MAKEFLAGS += --no-print-directory .PHONY: all all: x15 docs VERSION = 0.1 export VERSION COMMA := , ifndef V V := 0 endif # Use callable variables so that commands can be split into multiple # lines, but produce a single line when echoed. This makes copying # commands easy. It also makes them somewhat self-describing. ifeq ($(V),0) Q := @ # $(call xbuild_action_print,,) define xbuild_action_print @printf " %-7s %s\n" $(1) $(2) @ endef else ifneq ($(V),1) $(error invalid value for V) endif export Q # $(call xbuild_action_mkdir,) define xbuild_action_mkdir $(Q)mkdir -p $(dir $(1)) endef # $(call xbuild_action,,) define xbuild_action $(call xbuild_action_mkdir,$(2)) $(call xbuild_action_print,$(1),$(2)) endef define xbuild_kconfig_invoke $(Q)$(MAKE) -f $(SRCDIR)/$(KCONFIG_PATH)/Makefile $@ endef define xbuild_gen_autoconf_h $(call xbuild_action,GEN,$@)cat $< \ | sed -e 's/^\([^#]\)/#define \1/g' \ -e 's/=/ /' \ | grep '^#define' > $@ endef # $(call xbuild_check_cc_option,