aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2008-08-16 16:59:47 +0000
committerFelix Fietkau <nbd@openwrt.org>2008-08-16 16:59:47 +0000
commita3a37d0bb1e9e66c12aa68d0c17dee48a4f7f29e (patch)
tree55e7cb676b6270c01af8c7fc05dc89c545a74109 /include
parenta15a10c85adbfe2a4d5ce0985cbe6ca9cc28f9b7 (diff)
downloadupstream-a3a37d0bb1e9e66c12aa68d0c17dee48a4f7f29e.tar.gz
upstream-a3a37d0bb1e9e66c12aa68d0c17dee48a4f7f29e.tar.bz2
upstream-a3a37d0bb1e9e66c12aa68d0c17dee48a4f7f29e.zip
rework parallel building to get rid of some warnings and add back support for parallelizing the kernel build fixes #3882
SVN-Revision: 12322
Diffstat (limited to 'include')
-rw-r--r--include/image.mk1
-rw-r--r--include/kernel-build.mk13
-rw-r--r--include/kernel-defaults.mk12
-rw-r--r--include/subdir.mk2
-rw-r--r--include/toplevel.mk20
5 files changed, 21 insertions, 27 deletions
diff --git a/include/image.mk b/include/image.mk
index efbc76db36..6eef6ba9ca 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -10,6 +10,7 @@ include $(INCLUDE_DIR)/prereq.mk
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/host.mk
+.NOTPARALLEL:
override MAKEFLAGS=
override MAKE:=$(SUBMAKE)
KDIR=$(KERNEL_BUILD_DIR)
diff --git a/include/kernel-build.mk b/include/kernel-build.mk
index b6d2cf5efb..4c6a32a429 100644
--- a/include/kernel-build.mk
+++ b/include/kernel-build.mk
@@ -80,25 +80,18 @@ define BuildKernel
[ -e "$(LINUX_CONFIG)" ] || touch "$(LINUX_CONFIG)"
$(LINUX_CONFCMD) > $(LINUX_DIR)/.config
touch $(LINUX_CONFIG)
- $(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKEOPTS) $$@
+ $(_SINGLE)$(MAKE) -C $(LINUX_DIR) $(KERNEL_MAKEOPTS) $$@
$(SCRIPT_DIR)/kconfig.pl '>' $(GENERIC_LINUX_CONFIG) $(LINUX_DIR)/.config > $(LINUX_CONFIG)
$(Kernel/Configure)
install: $(LINUX_DIR)/.image
- TARGET_BUILD="" $(MAKE) -C image compile install
+ +$(MAKE) -C image compile install TARGET_BUILD=
clean: FORCE
rm -rf $(KERNEL_BUILD_DIR)
- rebuild: FORCE
- @$(MAKE) mostlyclean
- @if [ -f $(LINUX_KERNEL) ]; then \
- $(MAKE) clean; \
- fi
- @$(MAKE) compile
-
image-prereq:
- @$(NO_TRACE_MAKE) -s -C image prereq TARGET_BUILD=
+ @+$(NO_TRACE_MAKE) -s -C image prereq TARGET_BUILD=
prereq: image-prereq
diff --git a/include/kernel-defaults.mk b/include/kernel-defaults.mk
index 7869562917..d5cf1202b3 100644
--- a/include/kernel-defaults.mk
+++ b/include/kernel-defaults.mk
@@ -69,11 +69,11 @@ endif
define Kernel/Configure/2.4
$(SED) "s,\-mcpu=,\-mtune=,g;" $(LINUX_DIR)/arch/mips/Makefile
- $(MAKE) $(KERNEL_MAKEOPTS) oldconfig include/linux/compile.h include/linux/version.h
- $(MAKE) $(KERNEL_MAKEOPTS) dep
+ $(_SINGLE)$(MAKE) $(KERNEL_MAKEOPTS) oldconfig include/linux/compile.h include/linux/version.h
+ $(_SINGLE)$(MAKE) $(KERNEL_MAKEOPTS) dep
endef
define Kernel/Configure/2.6
- -$(MAKE) $(KERNEL_MAKEOPTS) oldconfig prepare scripts
+ -$(_SINGLE)$(MAKE) $(KERNEL_MAKEOPTS) oldconfig prepare scripts
endef
define Kernel/Configure/Default
$(LINUX_CONFCMD) > $(LINUX_DIR)/.config.target
@@ -86,12 +86,12 @@ endef
define Kernel/CompileModules/Default
rm -f $(LINUX_DIR)/vmlinux $(LINUX_DIR)/System.map
- $(MAKE) $(KERNEL_MAKEOPTS) modules
+ +$(MAKE) $(KERNEL_MAKEOPTS) modules
endef
define Kernel/CompileImage/Default
$(if $(CONFIG_TARGET_ROOTFS_INITRAMFS),,rm -f $(TARGET_DIR)/init)
- $(MAKE) $(KERNEL_MAKEOPTS) $(KERNELNAME)
+ +$(MAKE) $(KERNEL_MAKEOPTS) $(KERNELNAME)
$(KERNEL_CROSS)objcopy -O binary -R .reginfo -R .note -R .comment -R .mdebug -S $(LINUX_DIR)/vmlinux $(LINUX_KERNEL)
$(KERNEL_CROSS)objcopy -R .reginfo -R .note -R .comment -R .mdebug -S $(LINUX_DIR)/vmlinux $(KERNEL_BUILD_DIR)/vmlinux.elf
endef
@@ -99,7 +99,7 @@ endef
define Kernel/Clean/Default
rm -f $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)/.configured
rm -f $(LINUX_KERNEL)
- $(MAKE) -C $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) clean
+ $(_SINGLE)$(MAKE) -C $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION) clean
endef
diff --git a/include/subdir.mk b/include/subdir.mk
index 31b867fb61..4fa1bdfd52 100644
--- a/include/subdir.mk
+++ b/include/subdir.mk
@@ -28,7 +28,7 @@ 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))))
- $(if $(findstring $(bd),$($(1)/builddirs-parallel)),$$(SUBMAKE),$$(SUBMAKE) -j1) \
+ +$(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))
diff --git a/include/toplevel.mk b/include/toplevel.mk
index 3d7593bf89..06b005568e 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -47,22 +47,22 @@ prepare-tmpinfo: FORCE
.config: ./scripts/config/conf prepare-tmpinfo $(if $(CONFIG_HAVE_DOT_CONFIG),,FORCE)
@+if [ \! -f .config ] || ! grep CONFIG_HAVE_DOT_CONFIG .config >/dev/null; then \
[ -e $(HOME)/.openwrt/defconfig ] && cp $(HOME)/.openwrt/defconfig .config; \
- $(NO_TRACE_MAKE) menuconfig $(PREP_MK); \
+ $(_SINGLE)$(NO_TRACE_MAKE) menuconfig $(PREP_MK); \
fi
scripts/config/mconf:
- @$(SUBMAKE) -s -j1 -C scripts/config all
+ @$(_SINGLE)$(SUBMAKE) -s -C scripts/config all
$(eval $(call rdep,scripts/config,scripts/config/mconf))
scripts/config/conf:
- @$(SUBMAKE) -s -j1 -C scripts/config conf
+ @$(_SINGLE)$(SUBMAKE) -s -C scripts/config conf
config: scripts/config/conf prepare-tmpinfo FORCE
$< Config.in
config-clean: FORCE
- $(NO_TRACE_MAKE) -C scripts/config clean
+ $(_SINGLE)$(NO_TRACE_MAKE) -C scripts/config clean
defconfig: scripts/config/conf prepare-tmpinfo FORCE
touch .config
@@ -78,10 +78,10 @@ menuconfig: scripts/config/mconf prepare-tmpinfo FORCE
$< Config.in
kernel_oldconfig: .config FORCE
- $(NO_TRACE_MAKE) -C target/linux oldconfig
+ $(_SINGLE)$(NO_TRACE_MAKE) -C target/linux oldconfig
kernel_menuconfig: .config FORCE
- $(NO_TRACE_MAKE) -C target/linux menuconfig
+ $(_SINGLE)$(NO_TRACE_MAKE) -C target/linux menuconfig
tmp/.prereq-build: include/prereq-build.mk
mkdir -p tmp
@@ -103,7 +103,7 @@ clean dirclean: .config
prereq:: .config
@+$(MAKE) -s tmp/.prereq-build $(PREP_MK)
- @$(NO_TRACE_MAKE) -s $@
+ @+$(NO_TRACE_MAKE) -s $@
%::
@+$(PREP_MK) $(NO_TRACE_MAKE) -s prereq
@@ -113,14 +113,14 @@ help:
cat README
docs docs/compile: FORCE
- @$(SUBMAKE) -j1 -C docs compile
+ @$(_SINGLE)$(SUBMAKE) -C docs compile
docs/clean: FORCE
- @$(SUBMAKE) -j1 -C docs clean
+ @$(_SINGLE)$(SUBMAKE) -C docs clean
distclean:
rm -rf tmp build_dir staging_dir dl .config* feeds package/feeds package/openwrt-packages bin
- @$(SUBMAKE) -j1 -C scripts/config clean
+ @$(_SINGLE)$(SUBMAKE) -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