Selaa lähdekoodia

Make doesn't like -j 0

Samuel Thibault 5 vuotta sitten
vanhempi
commit
a18d8786d7
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  1. 5 1
      mpi/Makefile.am

+ 5 - 1
mpi/Makefile.am

@@ -32,7 +32,11 @@ check-recursive:
 	NJOBS=`printf %s "$(MAKEFLAGS)" | sed -ne 's/.*-j \?\([0-9]\+\).*/\1/p'` ; \
 	JOBS="" ; \
 	if [ -n "$$NJOBS" ] ; then \
-		JOBS="-j$$(($$NJOBS / 4))" ; \
+		if [ "$$NJOBS" -ge 4 ] ; then \
+			JOBS="-j$$(($$NJOBS / 4))" ; \
+		else \
+			JOBS="-j1" ; \
+		fi ; \
 	fi ; \
 	for i in $(SUBDIRS) ; do \
 		$(MAKE) check -C $$i MAKEFLAGS="$(MAKEFLAGS) $$JOBS" || RET=1; \