diff options
author | Jan Huwald <jh@sotun.de> | 2012-03-06 10:29:33 (GMT) |
---|---|---|
committer | Jan Huwald <jh@sotun.de> | 2012-03-06 10:29:33 (GMT) |
commit | e3973de8076dc75d6a6eaf85a901a39ca7607a9b (patch) | |
tree | 58824c61b0ec1efe41c069d3d8445751d4dd96ab | |
parent | 7d5f7d5782919ee03938da9f6d317d8dea91fbbc (diff) |
Makefile: remove forced parallization of submakes
-rw-r--r-- | Makefile | 26 |
1 files changed, 6 insertions, 20 deletions
@@ -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)/ $@/ |