All pastes #68230 Raw Edit

Something

public text v1 · immutable
#68230 ·published 2006-06-21 07:41 UTC
rendered paste body
ifdef 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