summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Huwald <jh@sotun.de>2012-03-06 10:29:33 (GMT)
committerJan Huwald <jh@sotun.de>2012-03-06 10:29:33 (GMT)
commite3973de8076dc75d6a6eaf85a901a39ca7607a9b (patch)
tree58824c61b0ec1efe41c069d3d8445751d4dd96ab
parent7d5f7d5782919ee03938da9f6d317d8dea91fbbc (diff)
Makefile: remove forced parallization of submakes
-rw-r--r--Makefile26
1 files changed, 6 insertions, 20 deletions
diff --git a/Makefile b/Makefile
index 1ed0627..62cee75 100644
--- a/Makefile
+++ b/Makefile
@@ -3,27 +3,13 @@ all: image/trunk/openwrt-ar71xx-tl-wr841 \
image/trunk/openwrt-ar71xx-tl-wr741 \
image/trunk/openwrt-atheros
-# parallelization
+# parallelization:
+# This Makefile reuses the same OpenWRT repo for multiple targets,
+# thus must process these targets serially. .NOTPARALLEL is _not_
+# inherited by sub-makes, and passing -jX to this Makefile results
+# in parallel builds for all submakes processes.
.NOTPARALLEL:
-NUMPROC := 1
-OS := $(shell uname)
-export NUMPROC
-
-ifeq ($(OS),Linux)
- NUMPROC := $(shell grep -c ^processor /proc/cpuinfo)
-else ifeq ($(OS),Darwin)
- NUMPROC := $(shell sysctl hw.ncpu | awk '{print $$2}')
-endif
-
-# Always use # of processory plus 1
-NUMPROC:=$$((${NUMPROC}+1))
-NUMPROC:=$(shell echo ${NUMPROC})
-
-ifeq ($(NUMPROC),0)
- NUMPROC = 1
-endif
-
# fetching and maintaing OpenWRT repositories
define init-repo
mkdir -p openwrt dl
@@ -69,7 +55,7 @@ image/%: config/$$(REPO)-$$(HW).config openwrt/$$(REPO)/.repo_access
files/common $(shell toolbin/extract_variants files/$(HW))
toolbin/name_firmware openwrt/$(REPO)
cd openwrt/$(REPO) && while true; do echo; done | make oldconfig >/dev/null
- cd openwrt/$(REPO) && $(MAKE) -j$(NUMPROC)
+ cd openwrt/$(REPO) && $(MAKE)
mkdir -p $(shell dirname $@)
rsync -a openwrt/$(REPO)/bin/$(PLATFORM)/ $@/
contact: Jan Huwald // Impressum