summaryrefslogtreecommitdiff
path: root/openwrt/package/Makefile
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-07-29 11:30:06 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-07-29 11:30:06 +0000
commit45e7d063935cba4eb4567b9aa95279e72d35d2a2 (patch)
treeacec42829c655449ac0828180523cb64ee6fea1f /openwrt/package/Makefile
parent55fd1cd74eca0b641fa93f965ef6c72057b7fb8f (diff)
downloadmtk-20170518-45e7d063935cba4eb4567b9aa95279e72d35d2a2.zip
mtk-20170518-45e7d063935cba4eb4567b9aa95279e72d35d2a2.tar.gz
mtk-20170518-45e7d063935cba4eb4567b9aa95279e72d35d2a2.tar.bz2
add support for per-package prereq checks, run global prereq checks before (menu-)config
SVN-Revision: 4318
Diffstat (limited to 'openwrt/package/Makefile')
-rw-r--r--openwrt/package/Makefile9
1 files changed, 7 insertions, 2 deletions
diff --git a/openwrt/package/Makefile b/openwrt/package/Makefile
index 7a3af2e..629ce88 100644
--- a/openwrt/package/Makefile
+++ b/openwrt/package/Makefile
@@ -10,13 +10,17 @@ include $(TOPDIR)/rules.mk
include $(TOPDIR)/.config
include $(TOPDIR)/.pkgdeps
-SOURCE_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m))
+PREREQ_PACKAGES:=$(patsubst %,%-prereq,$(package-y) $(package-m))
+DOWNLOAD_PACKAGES:=$(patsubst %,%-download,$(package-y) $(package-m))
COMPILE_PACKAGES:=$(patsubst %,%-compile,$(package-y) $(package-m))
INSTALL_PACKAGES:=$(patsubst %,%-install,$(package-y))
$(STAMP_DIR) $(TARGET_DIR):
mkdir -p $@
+%-prereq: $(STAMP_DIR) $(TARGET_DIR)
+ $(MAKE) -C $(patsubst %-prereq,%,$@) prereq MAKEFLAGS="$(BUILD_MAKEFLAGS)"
+
%-download: $(STAMP_DIR) $(TARGET_DIR)
$(MAKE) -C $(patsubst %-download,%,$@) download MAKEFLAGS="$(BUILD_MAKEFLAGS)"
@@ -41,7 +45,8 @@ $(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo
all: compile
clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
-download: $(SOURCE_PACKAGES)
+prereq: $(PREREQ_PACKAGES)
+download: $(DOWNLOAD_PACKAGES)
compile-targets: $(COMPILE_PACKAGES)
compile:
$(MAKE) -j$(CONFIG_JLEVEL) compile-targets