summaryrefslogtreecommitdiffstats
path: root/package
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-05-31 20:58:13 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2006-05-31 20:58:13 +0000
commita74795a1055303f96e614b616ad54f5ccc0c0c6f (patch)
tree5c317405366587b58f8b5d5ba25d43fbb861a565 /package
parent15e2cd7849749bc0ca547c39f4b62ff098292079 (diff)
add support for parallel build of packages (tested with -j8)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/buildroot-ng/openwrt@3874 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-rw-r--r--package/Makefile18
1 files changed, 11 insertions, 7 deletions
diff --git a/package/Makefile b/package/Makefile
index 12ea942a6..7548e069a 100644
--- a/package/Makefile
+++ b/package/Makefile
@@ -10,18 +10,18 @@ $(STAMP_DIR) $(TARGET_DIR):
mkdir -p $@
%-prepare: $(STAMP_DIR) $(TARGET_DIR)
- $(MAKE) -C $(patsubst %-prepare,%,$@) prepare
+ $(MAKE) -C $(patsubst %-prepare,%,$@) prepare MAKEFLAGS="$(BUILD_MAKEFLAGS)"
%-compile: $(STAMP_DIR) $(TARGET_DIR)
@echo "-> make $@"
- $(MAKE) -C $(patsubst %-compile,%,$@) compile
+ $(MAKE) -C $(patsubst %-compile,%,$@) compile MAKEFLAGS="$(BUILD_MAKEFLAGS)"
%-install: $(STAMP_DIR) $(TARGET_DIR)
@echo "-> make $@"
- $(MAKE) -C $(patsubst %-install,%,$@) install
+ $(MAKE) -C $(patsubst %-install,%,$@) install MAKEFLAGS="$(BUILD_MAKEFLAGS)"
%-clean: $(STAMP_DIR) $(TARGET_DIR)
- $(MAKE) -C $(patsubst %-clean,%,$@) clean
+ $(MAKE) -C $(patsubst %-clean,%,$@) clean MAKEFLAGS="$(BUILD_MAKEFLAGS)"
$(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo
@@ -29,7 +29,11 @@ $(TOPDIR)/.pkgdeps: $(TOPDIR)/.pkginfo
all: compile
clean: $(patsubst %,%-clean,$(package-) $(package-y) $(package-m))
-compile: $(COMPILE_PACKAGES)
-install: base-files-install $(INSTALL_PACKAGES)
-
+compile-targets: $(COMPILE_PACKAGES)
+compile:
+ $(MAKE) -j$(CONFIG_JLEVEL) compile-targets
+install-targets: base-files-install $(INSTALL_PACKAGES)
+install:
+ rm -rf $(BUILD_DIR)/root
+ $(MAKE) install-targets