summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/kernel-build.mk6
-rw-r--r--include/package.mk2
-rw-r--r--include/scan.mk2
-rw-r--r--include/subdir.mk4
-rw-r--r--include/toplevel.mk30
-rw-r--r--include/verbose.mk12
6 files changed, 27 insertions, 29 deletions
diff --git a/include/kernel-build.mk b/include/kernel-build.mk
index 9335e1a0d..75c2bcf01 100644
--- a/include/kernel-build.mk
+++ b/include/kernel-build.mk
@@ -8,10 +8,6 @@ include $(INCLUDE_DIR)/host.mk
include $(INCLUDE_DIR)/prereq.mk
ifneq ($(DUMP),1)
- override MAKEFLAGS=
-endif
-
-ifneq ($(DUMP),1)
all: compile
endif
@@ -101,7 +97,7 @@ define BuildKernel
@$(MAKE) compile
image-prereq:
- $(SUBMAKE) -s -C image prereq TARGET_BUILD=
+ @$(NO_TRACE_MAKE) -s -C image prereq TARGET_BUILD=
prereq: image-prereq
diff --git a/include/package.mk b/include/package.mk
index 74ad47874..da8de5ccc 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -83,7 +83,7 @@ define Build/DefaultTargets
touch $$@
$(STAMP_INSTALLED): $(STAMP_BUILT)
- $(SUBMAKE) clean-staging
+ $(SUBMAKE) -j1 clean-staging
rm -rf $(TMP_DIR)/stage-$(PKG_NAME)
mkdir -p $(TMP_DIR)/stage-$(PKG_NAME)/host $(STAGING_DIR)/packages $(STAGING_DIR_HOST)/packages
$(call Build/InstallDev,$(TMP_DIR)/stage-$(PKG_NAME),$(TMP_DIR)/stage-$(PKG_NAME)/host)
diff --git a/include/scan.mk b/include/scan.mk
index c51c4c7ad..19350b612 100644
--- a/include/scan.mk
+++ b/include/scan.mk
@@ -50,7 +50,7 @@ $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk: $(FILELIST)
-include $(TMP_DIR)/info/.files-$(SCAN_TARGET).mk
$(TARGET_STAMP)::
- ( \
+ +( \
$(NO_TRACE_MAKE) $(FILELIST); \
MD5SUM=$$(cat $(FILELIST) | (md5sum || md5) | awk '{print $$1}'); \
[ -f "$@.$$MD5SUM" ] || { \
diff --git a/include/subdir.mk b/include/subdir.mk
index 3097ea418..e12799b47 100644
--- a/include/subdir.mk
+++ b/include/subdir.mk
@@ -28,8 +28,8 @@ define subdir
$(call warn,$(1),d,BD $(1)/$(bd))
$(foreach target,$(SUBTARGETS),
$(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(target): $(if $(QUILT),,$($(1)/$(bd)/$(target)) $(call $(1)//$(target),$(1)/$(bd))))
- +$$(MAKE) -j1 -C $(1)/$(bd) $(target) $(if $(findstring $(bd),$($(1)/builddirs-ignore-$(target))), || $(call MESSAGE, ERROR: $(1)/$(bd) failed to build.))
-
+ $(if $(findstring $(bd),$($(1)/builddirs-parallel)),$$(SUBMAKE),$$(_SINGLE)$$(SUBMAKE) -j1) \
+ -C $(1)/$(bd) $(target) $(if $(findstring $(bd),$($(1)/builddirs-ignore-$(target))), || $(call MESSAGE, ERROR: $(1)/$(bd) failed to build.))
$$(if $(call debug,$(1)/$(bd),v),,.SILENT: $(1)/$(bd)/$(target))
# legacy targets
diff --git a/include/toplevel.mk b/include/toplevel.mk
index 23d4b0056..6fd4a534b 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -35,8 +35,8 @@ prepare-mk: FORCE ;
prepare-tmpinfo: FORCE
mkdir -p tmp/info
- +$(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="packageinfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPS="$(TOPDIR)/include/package*.mk" SCAN_DEPTH=5 SCAN_EXTRA=""
- +$(NO_TRACE_MAKE) -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPS="profiles/*.mk $(TOPDIR)/include/kernel*.mk $(TOPDIR)/include/target.mk" SCAN_DEPTH=2 SCAN_EXTRA="" SCAN_MAKEOPTS="TARGET_BUILD=1"
+ $(_SINGLE)$(NO_TRACE_MAKE) -j1 -s -f include/scan.mk SCAN_TARGET="packageinfo" SCAN_DIR="package" SCAN_NAME="package" SCAN_DEPS="$(TOPDIR)/include/package*.mk" SCAN_DEPTH=5 SCAN_EXTRA=""
+ $(_SINGLE)$(NO_TRACE_MAKE) -j1 -s -f include/scan.mk SCAN_TARGET="targetinfo" SCAN_DIR="target/linux" SCAN_NAME="target" SCAN_DEPS="profiles/*.mk $(TOPDIR)/include/kernel*.mk $(TOPDIR)/include/target.mk" SCAN_DEPTH=2 SCAN_EXTRA="" SCAN_MAKEOPTS="TARGET_BUILD=1"
for type in package target; do \
f=tmp/.$${type}info; t=tmp/.config-$${type}.in; \
[ "$$t" -nt "$$f" ] || ./scripts/metadata.pl $${type}_config "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \
@@ -51,12 +51,12 @@ prepare-tmpinfo: FORCE
fi
scripts/config/mconf:
- @+$(MAKE) -C scripts/config all
+ @$(_SINGLE)$(SUBMAKE) -s -j1 -C scripts/config all
$(eval $(call rdep,scripts/config,scripts/config/mconf))
scripts/config/conf:
- @+$(MAKE) -C scripts/config conf
+ @$(_SINGLE)$(SUBMAKE) -s -j1 -C scripts/config conf
config: scripts/config/conf prepare-tmpinfo FORCE
$< Config.in
@@ -86,41 +86,41 @@ kernel_menuconfig: .config FORCE
tmp/.prereq-build: include/prereq-build.mk
mkdir -p tmp
rm -f tmp/.host.mk
- @+$(NO_TRACE_MAKE) -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \
+ @$(_SINGLE)$(NO_TRACE_MAKE) -j1 -s -f $(TOPDIR)/include/prereq-build.mk prereq 2>/dev/null || { \
echo "Prerequisite check failed. Use FORCE=1 to override."; \
false; \
}
touch $@
download: .config FORCE
- +$(MAKE) tools/download
- +$(MAKE) toolchain/download
- +$(MAKE) package/download
- +$(MAKE) target/download
+ @+$(SUBMAKE) tools/download
+ @+$(SUBMAKE) toolchain/download
+ @+$(SUBMAKE) package/download
+ @+$(SUBMAKE) target/download
clean dirclean: .config
- @$(MAKE) $@
+ @+$(SUBMAKE) $@
prereq:: .config
- @+$(SUBMAKE) -s tmp/.prereq-build $(PREP_MK)
+ @+$(MAKE) -s tmp/.prereq-build $(PREP_MK)
@$(NO_TRACE_MAKE) -s $@
%::
@+$(PREP_MK) $(NO_TRACE_MAKE) -s prereq
- @+$(MAKE) -r $@
+ @+$(SUBMAKE) -r $@
help:
cat README
docs docs/compile: FORCE
- $(MAKE) -C docs compile
+ @$(_SINGLE)$(SUBMAKE) -j1 -C docs compile
docs/clean: FORCE
- $(MAKE) -C docs clean
+ @$(_SINGLE)$(SUBMAKE) -j1 -C docs clean
distclean:
rm -rf tmp build_dir staging_dir dl .config* feeds package/feeds package/openwrt-packages bin
- $(MAKE) -C scripts/config clean
+ @$(_SINGLE)$(SUBMAKE) -j1 -C scripts/config clean
ifeq ($(findstring v,$(DEBUG)),)
.SILENT: symlinkclean clean dirclean distclean config-clean download help tmpinfo-clean .config scripts/config/mconf scripts/config/conf menuconfig tmp/.prereq-build tmp/.prereq-package prepare-tmpinfo
diff --git a/include/verbose.mk b/include/verbose.mk
index fed83d6fb..b414d2440 100644
--- a/include/verbose.mk
+++ b/include/verbose.mk
@@ -8,9 +8,7 @@
ifeq ($(NO_TRACE_MAKE),)
NO_TRACE_MAKE := $(MAKE) V=99
-SUBMAKE := $(MAKE)
export NO_TRACE_MAKE
-export SUBMAKE
endif
ifndef KBUILD_VERBOSE
@@ -27,7 +25,7 @@ endif
ifneq ($(KBUILD_VERBOSE),99)
define MESSAGE
- printf "$(_Y)%s$(_N)\n" "$(1)" >&3
+ printf "$(_Y)%s$(_N)\n" "$(1)" >&254
endef
ifeq ($(QUIET),1)
@@ -39,16 +37,20 @@ ifneq ($(KBUILD_VERBOSE),99)
_NULL:=$(if $(MAKECMDGOALS),$(shell \
$(call MESSAGE, make[$(MAKELEVEL)]$(if $(_DIR), -C $(_DIR)) $(MAKECMDGOALS)); \
))
+ SUBMAKE=$(MAKE)
else
ifeq ($(KBUILD_VERBOSE),0)
- MAKE:=>/dev/null 2>&1 $(MAKE)
+ SILENT:=>/dev/null 2>&1
+ else
+ SILENT:=
endif
export QUIET:=1
- MAKE:=cmd() { $(MAKE) -s $$* || { echo "make $$*: build failed. Please re-run make with V=99 to see what's going on"; false; } } 3>&1 4>&2; cmd
+ SUBMAKE=cmd() { $(SILENT) $(MAKE) -s $$* || { echo "make $$*: build failed. Please re-run make with V=99 to see what's going on"; false; } } 254>&1 255>&2; cmd
endif
.SILENT: $(MAKECMDGOALS)
else
+ SUBMAKE=$(MAKE)
define MESSAGE
printf "%s\n" "$(1)"
endef