X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=include%2Fsubdir.mk;h=f01cd55f30b12b52516a100f9cb4ffb33d36ab06;hb=f7d7a3a18b1f1d1fdcf5b05f4ab1af6b8fc2ce1e;hp=dde3e50b0bea12bee1744b0a469fde66c354635c;hpb=591780615b304fb4624e363135942e9ee8f6caa3;p=openwrt%2Fopenwrt.git diff --git a/include/subdir.mk b/include/subdir.mk index dde3e50b0b..f01cd55f30 100644 --- a/include/subdir.mk +++ b/include/subdir.mk @@ -23,7 +23,7 @@ define subtarget endef define ERROR - ($(call MESSAGE, $(2)); $(if $(BUILD_LOG), echo "$(2)" >> $(BUILD_LOG_DIR)/$(1)/error.txt)) + ($(call MESSAGE, $(2)); $(if $(BUILD_LOG), echo "$(2)" >> $(BUILD_LOG_DIR)/$(1)/error.txt;) $(if $(3),, exit 1;)) endef lastdir=$(word $(words $(subst /, ,$(1))),$(subst /, ,$(1))) @@ -43,7 +43,7 @@ log_make = \ $(if $(BUILD_LOG), \ set -o pipefail; \ mkdir -p $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4));) \ - env time -f "time: $(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2)\#%U\#%S\#%e" -- \ + $(SCRIPT_DIR)/time.pl "time: $(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2)" \ $$(SUBMAKE) $(subdir_make_opts) $(if $(3),$(3)-)$(2) \ $(if $(BUILD_LOG),SILENT= 2>&1 | tee $(BUILD_LOG_DIR)/$(1)$(if $(4),/$(4))/$(if $(3),$(3)-)$(2).txt) @@ -66,7 +66,7 @@ define subdir $(foreach btype,$(buildtypes-$(bd)), $(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(btype)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(btype)/$(target)) $(call $(1)//$(btype)/$(target),$(1)/$(bd)/$(btype)))) $(call log_make,$(1)/$(bd),$(target),$(btype),$(filter-out __default,$(variant))) \ - $(if $(findstring $(bd),$($(1)/builddirs-ignore-$(btype)-$(target))), || $(call ERROR,$(1), ERROR: $(1)/$(bd) [$(btype)] failed to build.)) + || $(call ERROR,$(2), ERROR: $(1)/$(bd) [$(btype)] failed to build.,$(findstring $(bd),$($(1)/builddirs-ignore-$(btype)-$(target)))) $(if $(call diralias,$(bd)),$(call warn_eval,$(1)/$(bd),l,T,$(1)/$(call diralias,$(bd))/$(btype)/$(target): $(1)/$(bd)/$(btype)/$(target))) ) $(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(target): $(if $(NO_DEPS)$(QUILT),,$($(1)/$(bd)/$(target)) $(call $(1)//$(target),$(1)/$(bd)))) @@ -74,7 +74,7 @@ define subdir $(if $(BUILD_LOG),@mkdir -p $(BUILD_LOG_DIR)/$(1)/$(bd)/$(filter-out __default,$(variant))) $(if $($(1)/autoremove),$(call rebuild_check,$(1)/$(bd),$(target),,$(filter-out __default,$(variant)))) $(call log_make,$(1)/$(bd),$(target),,$(filter-out __default,$(variant))) \ - $(if $(findstring $(bd),$($(1)/builddirs-ignore-$(target))), || $(call ERROR,$(1), ERROR: $(1)/$(bd) failed to build$(if $(filter-out __default,$(variant)), (build variant: $(variant))).)) + || $(call ERROR,$(1), ERROR: $(1)/$(bd) failed to build$(if $(filter-out __default,$(variant)), (build variant: $(variant))).,$(findstring $(bd),$($(1)/builddirs-ignore-$(target)))) ) $(if $(PREREQ_ONLY)$(DUMP_TARGET_DB),, # aliases