Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37514783
en ru br
Репозитории ALT
S:4.4.0-alt2
5.1: 3.81-alt5
4.1: 3.81-alt2
4.0: 3.81-alt2
3.0: 3.81beta3-alt4
www.altlinux.org/Changes

Группа :: Разработка/Прочее
Пакет: make

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: make-3.82-cvs-14.patch
Скачать


2011-09-18  Paul Smith  <psmith@gnu.org>
	* main.c (main): If we're re-exec'ing and we're the master make,
	then restore the job_slots value so it goes back into MAKEFLAGS
	properly.  See Savannah bug #33873.
	* tests/scripts/features/parallelism: On re-exec make sure we preserve
	the value of MAKEFLAGS when necessary.  See Savannah bug #33873.
--- a/main.c
+++ b/main.c
@@ -2089,6 +2089,11 @@ main (int argc, char **argv, char **envp)
 
           ++restarts;
 
+          /* If we're re-exec'ing the first make, put back the number of
+             job slots so define_makefiles() will get it right.  */
+          if (master_job_slots)
+            job_slots = master_job_slots;
+
           /* Reset makeflags in case they were changed.  */
           {
             const char *pv = define_makeflags (1, 1);
@@ -2825,9 +2830,6 @@ define_makeflags (int all, int makefile)
 		       && (*(unsigned int *) cs->value_ptr ==
 			   *(unsigned int *) cs->noarg_value))
 		ADD_FLAG ("", 0); /* Optional value omitted; see below.  */
-	      else if (cs->c == 'j')
-		/* Special case for `-j'.  */
-		ADD_FLAG ("1", 1);
 	      else
 		{
 		  char *buf = alloca (30);
--- a/tests/scripts/features/parallelism
+++ b/tests/scripts/features/parallelism
@@ -167,6 +167,23 @@ inc.mk:
 
 rmfiles('inc.mk');
 
+# TEST #11: Make sure -jN from MAKEFLAGS is processed even when we re-exec
+# See Savannah bug #33873
+
+$extraENV{MAKEFLAGS} = '-j4';
+
+run_make_test(q!
+things = thing1 thing2
+all: $(things)
+$(things):; @echo '$@ start'; sleep 1; echo '$@ end'
+-include inc.mk
+inc.mk: ; @touch $@
+!,
+              '', "thing1 start\nthing2 start\nthing1 end\nthing2 end\n");
+
+delete $extraENV{MAKEFLAGS};
+rmfiles('inc.mk');
+
 if ($all_tests) {
     # Implicit files aren't properly recreated during parallel builds
     # Savannah bug #26864
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin