build: add SUBDIR_MAKE_DEBUG variable to make it easier to debug package makefiles
[openwrt/staging/thess.git] / include / subdir.mk
index d33b947fdf8eb64a0d44b13615c3336609a5fb4a..155f4935384f0f2f7ece9012b3a46267fa5a3700 100644 (file)
@@ -27,7 +27,7 @@ lastdir=$(word $(words $(subst /, ,$(1))),$(subst /, ,$(1)))
 diralias=$(if $(findstring $(1),$(call lastdir,$(1))),,$(call lastdir,$(1)))
 
 subdir_make_opts = \
-       -r -C $(1) \
+       $(if $(SUBDIR_MAKE_DEBUG),-d) -r -C $(1) \
                BUILD_SUBDIR="$(1)" \
                BUILD_VARIANT="$(4)" \
                ALL_VARIANTS="$(5)"