Something
public text v1 · immutableifdef V
ifeq ("$(origin V)", "command line")
KBUILD_VERBOSE = $(V)
endif
endif
ifndef KBUILD_VERBOSE
KBUILD_VERBOSE = 0
endif
ifeq ($(MAKELEVEL),0)
TRACE:=3>&1
endif
ifeq ($(MAKELEVEL),$(KBUILD_VERBOSE))
TRACE:=3>/dev/null
endif
define make
@{ \
echo "--> $(1)" >&3; \
$(MAKE) --no-print-dir $(1); \
} $(TRACE)
endef
#simple test
ifeq ($(MAKELEVEL),9)
all:
@echo "done"
else
all:
$(call make,all)
endif