# but we can't include that file in this context
empty:=
space:= $(empty) $(empty)
- _SINGLE=MAKEFLAGS=$(space)
+ _SINGLE=export MAKEFLAGS=$(space);
override OPENWRT_BUILD=1
export OPENWRT_BUILD
clean: FORCE
rm -rf $(BUILD_DIR) $(BIN_DIR)
- $(SUBMAKE) target/linux/clean
+ $(_SINGLE)$(SUBMAKE) target/linux/clean
dirclean: clean
rm -rf $(STAGING_DIR) $(STAGING_DIR_HOST) $(STAGING_DIR_TOOLCHAIN) $(TOOLCHAIN_DIR) $(BUILD_DIR_HOST)
tmp/.prereq_packages: .config
unset ERROR; \
for package in $(sort $(prereq-y) $(prereq-m)); do \
- $(NO_TRACE_MAKE) -s -r -C package/$$package prereq || ERROR=1; \
+ $(_SINGLE)$(NO_TRACE_MAKE) -s -r -C package/$$package prereq || ERROR=1; \
done; \
if [ -n "$$ERROR" ]; then \
echo "Package prerequisite check failed."; \
prepare: .config $(tools/stamp-install) $(toolchain/stamp-install)
world: prepare $(target/stamp-compile) $(package/stamp-cleanup) $(package/stamp-compile) $(package/stamp-install) $(package/stamp-rootfs-prepare) $(target/stamp-install) FORCE
- $(SUBMAKE) package/index
+ $(_SINGLE)$(SUBMAKE) package/index
# update all feeds, re-create index files, install symlinks
package/symlinks:
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/host.mk
+.NOTPARALLEL:
override MAKEFLAGS=
override MAKE:=$(SUBMAKE)
KDIR=$(KERNEL_BUILD_DIR)
[ -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
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
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
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
$(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))
.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
$< 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
prereq:: .config
@+$(MAKE) -s tmp/.prereq-build $(PREP_MK)
- @$(NO_TRACE_MAKE) -s $@
+ @+$(NO_TRACE_MAKE) -s $@
%::
@+$(PREP_MK) $(NO_TRACE_MAKE) -s prereq
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
confvar=$(call merge,$(foreach v,$(1),$(if $($(v)),y,n)))
strip_last=$(patsubst %.$(lastword $(subst .,$(space),$(1))),%,$(1))
-_SINGLE=MAKEFLAGS=$(space)
+_SINGLE=export MAKEFLAGS=$(space);
ARCH:=$(call qstrip,$(shell echo $(CONFIG_ARCH) | sed -e 's/i[3-9]86/i386/'))
BOARD:=$(call qstrip,$(CONFIG_TARGET_BOARD))
TARGET_OPTIMIZATION:=$(call qstrip,$(CONFIG_TARGET_OPTIMIZATION))
export TARGET_BUILD=1
prereq clean download prepare compile install menuconfig oldconfig update refresh: FORCE
- @$(NO_TRACE_MAKE) -C $(BOARD) $@
+ @+$(NO_TRACE_MAKE) -C $(BOARD) $@