Skip to content
Browse files

Allow NPROCS to be specified on command line at build time

make NPROCS=1 # to force a parallel build
  • Loading branch information...
1 parent e759f86 commit e8dc899c8330b17becb2ecb76bc0f55464c4ffa0 @strk strk committed Aug 16, 2012
Showing with 8 additions and 6 deletions.
  1. +8 −6 Makefile
View
14 Makefile
@@ -2,14 +2,16 @@
all: mapnik.node
-NPROCS:=1
OS:=$(shell uname -s)
-ifeq ($(OS),Linux)
- NPROCS:=$(shell grep -c ^processor /proc/cpuinfo)
-endif
-ifeq ($(OS),Darwin)
- NPROCS:=$(shell sysctl -n hw.ncpu)
+ifeq ($(NPROCS),)
+ NPROCS:=1
+ ifeq ($(OS),Linux)
+ NPROCS:=$(shell grep -c ^processor /proc/cpuinfo)
+ endif
+ ifeq ($(OS),Darwin)
+ NPROCS:=$(shell sysctl -n hw.ncpu)
+ endif
endif
gyp:

0 comments on commit e8dc899

Please sign in to comment.
Something went wrong with that request. Please try again.