only accept JOBS via make setting and default to 1 - closes #2430

This commit is contained in:
Dane Springmeyer 2014-09-23 11:24:54 -07:00
parent ebb6678a61
commit 97dcd2fd59
3 changed files with 7 additions and 10 deletions

View file

@ -9,6 +9,13 @@ To configure and build Mapnik do:
$ make
```
To trigger parallel compilation you can pass a JOBS value to make:
```bash
$ JOBS=4 make
```
To use a Python interpreter that is not named `python` for your build, do
something like the following instead:

View file

@ -5,12 +5,6 @@ PYTHON = python
ifeq ($(JOBS),)
JOBS:=1
ifeq ($(OS),Linux)
JOBS:=$(shell grep -c ^processor /proc/cpuinfo)
endif
ifeq ($(OS),Darwin)
JOBS:=$(shell sysctl -n hw.ncpu)
endif
endif
all: mapnik

View file

@ -396,7 +396,6 @@ opts.AddVariables(
ListVariable('BINDINGS','Language bindings to build','all',['python']),
EnumVariable('THREADING','Set threading support','multi', ['multi','single']),
EnumVariable('XMLPARSER','Set xml parser','libxml2', ['libxml2','ptree']),
('JOBS', 'Set the number of parallel compilations', "1", lambda key, value, env: int(value), int),
BoolVariable('DEMO', 'Compile demo c++ application', 'True'),
BoolVariable('PGSQL2SQLITE', 'Compile and install a utility to convert postgres tables to sqlite', 'False'),
BoolVariable('SHAPEINDEX', 'Compile and install a utility to generate shapefile indexes in the custom format (.index) Mapnik supports', 'True'),
@ -1910,9 +1909,6 @@ if not HELP_REQUESTED:
SetOption('implicit_cache', 1)
SetOption('max_drift', 1)
if env['JOBS'] > 1:
SetOption("num_jobs", env['JOBS'])
# Build agg first, doesn't need anything special
if env['RUNTIME_LINK'] == 'shared':
SConscript('deps/agg/build.py')