sdk: emit proper tag references for base URLs
[librecmc/librecmc.git] / include / subdir.mk
index e76a01e18ab885466b45734831c3c737c4c823d0..6db4eaa7813a11147f7888eecea33a580e0cba1c 100644 (file)
@@ -52,7 +52,7 @@ rebuild_check = \
                $(if $(BUILD_LOG),mkdir -p $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4));) \
                $$(NO_TRACE_MAKE) $(if $(BUILD_LOG),-d) -q $(subdir_make_opts) .$(if $(3),$(3)-)$(2) \
                        > $(if $(BUILD_LOG),$(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4))/check-$(if $(3),$(3)-)$(2).txt,/dev/null) 2>&1 || \
-                       $$(SUBMAKE) $(subdir_make_opts) clean >/dev/null 2>/dev/null
+                       $$(SUBMAKE) $(subdir_make_opts) clean-build >/dev/null 2>/dev/null
 
 endif
 
@@ -61,7 +61,7 @@ define subdir
   $(call warn,$(1),d,D $(1))
   $(foreach bd,$($(1)/builddirs),
     $(call warn,$(1),d,BD $(1)/$(bd))
-    $(foreach target,$(SUBTARGETS),
+    $(foreach target,$(SUBTARGETS) $($(1)/subtargets),
       $(foreach btype,$(buildtypes-$(bd)),
         $(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(btype)/$(target): $(if $(QUILT),,$($(1)/$(bd)/$(btype)/$(target)) $(call $(1)//$(btype)/$(target),$(1)/$(bd)/$(btype))))
                  $(call log_make,$(1)/$(bd),$(target),$(btype),$(filter-out __default,$(variant))) \
@@ -81,7 +81,7 @@ define subdir
          )
        )
   )
-  $(foreach target,$(SUBTARGETS),$(call subtarget,$(1),$(target)))
+  $(foreach target,$(SUBTARGETS) $($(1)/subtargets),$(call subtarget,$(1),$(target)))
 endef
 
 ifndef DUMP_TARGET_DB