From f277cb582659a98e0d6e3f24a4aa5632b20ef2b0 Mon Sep 17 00:00:00 2001
From: tho <tho@wiback.org>
Date: Thu, 9 Jul 2009 09:56:44 +0000
Subject: [PATCH] Makefile: added nice variable

---
 Makefile | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index eeb0d80f4..acbd70845 100644
--- a/Makefile
+++ b/Makefile
@@ -3,6 +3,9 @@
 #----------------------------------------------------------------------
 CONCURRENCY_LEVEL ?= $(shell grep process /proc/cpuinfo | wc -l)
 
+ifdef nice
+  SCONS_ARGS += CXX='nice -n $(nice) g++'
+endif
 ifdef final
   SCONS_ARGS += "final="$(final)
 endif
@@ -40,10 +43,8 @@ all_docs all_tests all:
 #----------------------------------------------------------------------
 # remote compile targets
 #----------------------------------------------------------------------
-JOBS := 1
-
 all@% all_docs@% all_tests@% build@%:
-	ssh $* "cd `pwd` && $(MAKE) -j $(JOBS) $(firstword $(subst @, ,$@))"
+	ssh $* "cd `pwd` && $(MAKE) SCONS_ARGS=\"$(SCONS_ARGS)\" $(firstword $(subst @, ,$@))"
 
 	
 #----------------------------------------------------------------------
-- 
GitLab