summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2007-07-30 21:14:08 +0000
committerFelix Fietkau <nbd@openwrt.org>2007-07-30 21:14:08 +0000
commitd7f2cb164209468046dc093a35d4f10c7350944b (patch)
treef5c562b565716be8d74e1660634d5dd8779ae81f /include
parenta7b635f07546eadbdd8c6dc0cfd623290622f026 (diff)
downloadmtk-20170518-d7f2cb164209468046dc093a35d4f10c7350944b.zip
mtk-20170518-d7f2cb164209468046dc093a35d4f10c7350944b.tar.gz
mtk-20170518-d7f2cb164209468046dc093a35d4f10c7350944b.tar.bz2
next round of cleanup, convert target/ - make -j works now ;)
SVN-Revision: 8242
Diffstat (limited to 'include')
-rw-r--r--include/host-build.mk3
-rw-r--r--include/kernel-build.mk6
-rw-r--r--include/package.mk3
-rw-r--r--include/prereq.mk3
-rw-r--r--include/subdir.mk13
-rw-r--r--include/target.mk8
-rw-r--r--include/toplevel.mk8
7 files changed, 29 insertions, 15 deletions
diff --git a/include/host-build.mk b/include/host-build.mk
index 2950ec7..d834465 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2007 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -12,6 +12,7 @@ include $(INCLUDE_DIR)/depends.mk
STAMP_PREPARED:=$(PKG_BUILD_DIR)/.prepared_$(shell find ${CURDIR} $(PKG_FILE_DEPEND) $(DEP_FINDPARAMS) | md5s)
STAMP_CONFIGURED:=$(PKG_BUILD_DIR)/.configured
STAMP_BUILT:=$(PKG_BUILD_DIR)/.built
+override MAKEFLAGS=
include $(INCLUDE_DIR)/quilt.mk
diff --git a/include/kernel-build.mk b/include/kernel-build.mk
index 7a02d55..24c538f 100644
--- a/include/kernel-build.mk
+++ b/include/kernel-build.mk
@@ -11,6 +11,8 @@ include $(INCLUDE_DIR)/host.mk
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/prereq.mk
+override MAKEFLAGS=
+
GENERIC_LINUX_CONFIG:=$(GENERIC_PLATFORM_DIR)/config-$(shell [ -f "$(GENERIC_PLATFORM_DIR)/config-$(KERNEL_PATCHVER)" ] && echo "$(KERNEL_PATCHVER)" || echo template )
LINUX_CONFIG_DIR ?= ./config$(shell [ -d "./config-$(KERNEL_PATCHVER)" ] && printf -- "-$(KERNEL_PATCHVER)" || true )
LINUX_CONFIG ?= $(LINUX_CONFIG_DIR)/default
@@ -172,6 +174,7 @@ oldconfig menuconfig: $(STAMP_PREPARED) FORCE
$(SCRIPT_DIR)/config.pl '>' $(GENERIC_LINUX_CONFIG) $(LINUX_DIR)/.config > $(LINUX_CONFIG)
install: $(LINUX_DIR)/.image
+ $(MAKE) -C image install
clean: FORCE
rm -f $(STAMP_DIR)/.linux-compile
@@ -184,4 +187,7 @@ rebuild: FORCE
fi
@$(MAKE) compile
+image-prereq:
+ $(MAKE) -C image prereq
+prereq: image-prereq
diff --git a/include/package.mk b/include/package.mk
index e322cb9..c68bd10 100644
--- a/include/package.mk
+++ b/include/package.mk
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2006,2007 OpenWrt.org
+# Copyright (C) 2006-2007 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -24,6 +24,7 @@ include $(INCLUDE_DIR)/package-defaults.mk
include $(INCLUDE_DIR)/package-dumpinfo.mk
include $(INCLUDE_DIR)/package-ipkg.mk
+override MAKEFLAGS=
export CONFIG_SITE:=$(INCLUDE_DIR)/site/$(REAL_GNU_TARGET_NAME)
ifeq ($(DUMP)$(filter prereq clean refresh update,$(MAKECMDGOALS)),)
diff --git a/include/prereq.mk b/include/prereq.mk
index 8a08be8..660f67c 100644
--- a/include/prereq.mk
+++ b/include/prereq.mk
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2006-2007 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
@@ -47,3 +47,4 @@ define RequireCommand
$$(eval $$(call Require,$(1),$(2)))
endef
+.NOTPARALLEL:
diff --git a/include/subdir.mk b/include/subdir.mk
index da37573..4348c7b 100644
--- a/include/subdir.mk
+++ b/include/subdir.mk
@@ -24,7 +24,8 @@ define subdir
$(call warn,$(1),d,BD $(1)/$(bd))
$(foreach target,$(SUBTARGETS),
$(call warn_eval,$(1)/$(bd),t,T,$(1)/$(bd)/$(target): $($(1)/$(bd)/$(target)) $(call $(1)//$(target),$(1)/$(bd)))
- @+$$(MAKE) -j1 -C $(1)/$(bd) $(target)
+ +$$(MAKE) -j1 -C $(1)/$(bd) $(target)
+ $$(if $(call debug,$(1)/$(bd),v),,.SILENT: $(1)/$(bd)/$(target))
# legacy targets
$(call warn_eval,$(1)/$(bd),l,T,$(1)/$(bd)-$(target): $(1)/$(bd)/$(target))
@@ -36,12 +37,18 @@ endef
# Parameters: <subdir> <name> <target>
define stampfile
$(1)/stamp-$(3):=$(STAGING_DIR)/stampfiles/.$(2)_$(3)
- $(call rdep,$(1),$$($(1)/stamp-$(3)),)
+ $(if __rdep_$(1),,
+ $(call rdep,$(1),$$($(1)/stamp-$(3)),)
+ __rdep_$(1):=1
+ )
$$($(1)/stamp-$(3)):
- @+$(MAKE) $(1)/$(3)
+ @+$(MAKE) $$($(1)/flags-$(3)) $(1)/$(3)
@mkdir -p $$$$(dirname $$($(1)/stamp-$(3)))
@touch $$($(1)/stamp-$(3))
+
+ $$(if $(call debug,$(1),v),,.SILENT: $$($(1)/stamp-$(3)))
+
.PRECIOUS: $$($(1)/stamp-$(3)) # work around a make bug
$(1)//clean:=$(1)/stamp-$(3)/clean
diff --git a/include/target.mk b/include/target.mk
index 1718a86..b0a178e 100644
--- a/include/target.mk
+++ b/include/target.mk
@@ -1,11 +1,10 @@
#
-# Copyright (C) 2006 OpenWrt.org
+# Copyright (C) 2007 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
-
define AddProfile
ifeq ($(CONFIG_LINUX_$(1)),y)
$(call Profile/$(1))
@@ -13,13 +12,10 @@ define AddProfile
endif
endef
-include $(TMP_DIR)/.target.mk
+-include $(TMP_DIR)/.target.mk
ifeq ($(IB),1)
$(TMP_DIR)/.target.mk: $(TOPDIR)/.target.mk
$(CP) $< $@
-else
-$(TMP_DIR)/.target.mk: $(TMP_DIR)/.targetinfo
- $(SCRIPT_DIR)/metadata.pl target_mk < $(TMP_DIR)/.targetinfo > $@
endif
diff --git a/include/toplevel.mk b/include/toplevel.mk
index 33b318a..af4b390 100644
--- a/include/toplevel.mk
+++ b/include/toplevel.mk
@@ -30,7 +30,7 @@ endif
SCAN_COOKIE?=$(shell echo $$$$)
export SCAN_COOKIE
-tmp/.packageinfo tmp/.targetinfo prepare-tmpinfo: 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=4 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" SCAN_DEPTH=2 SCAN_EXTRA=""
@@ -39,6 +39,8 @@ tmp/.packageinfo tmp/.targetinfo prepare-tmpinfo: FORCE
[ "$$t" -nt "$$f" ] || ./scripts/metadata.pl $${type}_config < "$$f" > "$$t" || { rm -f "$$t"; echo "Failed to build $$t"; false; break; }; \
done
./scripts/metadata.pl package_mk < tmp/.packageinfo > tmp/.packagedeps || { rm -f tmp/.packagedeps; false; }
+ ./scripts/metadata.pl target_mk < $(TMP_DIR)/.targetinfo > tmp/.target.mk
+ touch $(TOPDIR)/tmp/.build
.config: ./scripts/config/conf prepare-tmpinfo
@+if [ \! -f .config ]; then \
@@ -101,7 +103,7 @@ prereq:: .config
%::
@+$(PREP_MK) $(NO_TRACE_MAKE) -s prereq
- @+$(MAKE) $@
+ @+$(MAKE) -r $@
help:
cat README
@@ -117,7 +119,7 @@ symlinkclean:
rm -rf tmp
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 tmp/.prereq-target tmp/.packageinfo tmp/.targetinfo prepare-tmpinfo
+ .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 tmp/.prereq-target prepare-tmpinfo
endif
.PHONY: help FORCE
.NOTPARALLEL: