1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-21 05:00:16 +00:00

reverting my patch series adding -j -l support for make

svn path=/nixpkgs/branches/stdenv-updates/; revision=22336
This commit is contained in:
Marc Weber 2010-06-19 15:52:28 +00:00
parent f446814260
commit f3e7f0fdf0
24 changed files with 10 additions and 92 deletions

View file

@ -6,8 +6,6 @@ stdenv.mkDerivation {
url = http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-alpha9.8.src.tgz;
md5 = "7218e778b5970a86c958e597f952f193";
};
NO_PARALLEL_BUILD_buildPhase = 1;
patches = [./fix.patch];

View file

@ -74,6 +74,4 @@ stdenv.mkDerivation rec {
maintainers = [ stdenv.lib.maintainers.eelco ];
platforms = stdenv.lib.platforms.all;
};
NO_PARALLEL_BUILD_installPhase = 1;
}

View file

@ -14,6 +14,4 @@ stdenv.mkDerivation {
wrapProgram $out/bin/xml2po --prefix PYTHONPATH : $(toPythonPath $out) \
''${PYTHONPATH:+ --prefix PYTHONPATH : $PYTHONPATH} \
'';
NO_PARALLEL_BUILD_buildPhase = 1;
}

View file

@ -55,8 +55,6 @@ let
inherit zlib;
NUM_CORES = 1;
buildPhase = ''
set -x
mkdir -p ocaml/{swflib,extc,extlib-dev,xml-light} neko/libs

View file

@ -70,7 +70,4 @@ composableDerivation {} ( fixed : {
# TODO make them optional and make them work
patches = [ ./disable-modules.patch ];
NUM_CORES = 1;
})

View file

@ -7,7 +7,6 @@ stdenv.mkDerivation {
url = http://nixos.org/tarballs/ocaml-3.08.0.tar.gz;
md5 = "c6ef478362295c150101cdd2efcd38e0";
};
NUM_CORES = 1; # both fail: build and install
configureScript = ./configure-3.08.0;
dontAddPrefix = "True";
configureFlags = ["-no-tk" "-x11lib" x11];

View file

@ -7,7 +7,6 @@ stdenv.mkDerivation {
url = http://caml.inria.fr/pub/distrib/ocaml-3.09/ocaml-3.09.1.tar.gz;
md5 = "c73f4b093e27ba5bf13d62923f89befc";
};
NUM_CORES = 1; # both fail: build and install
configureScript = ./configure-3.09.1;
dontAddPrefix = "True";
configureFlags = ["-no-tk" "-x11lib" x11];

View file

@ -9,8 +9,6 @@ stdenv.mkDerivation (rec {
sha256 = "1ihmx1civ78s7k2hfc05z1s9vbyx2qw7fg8lnbxnfd6zxkk8878d";
};
NUM_CORES = 1; # both fail: build and install
prefixKey = "-prefix ";
configureFlags = ["-no-tk" "-x11lib" x11];
buildFlags = "world bootstrap world.opt";

View file

@ -14,8 +14,6 @@ stdenv.mkDerivation (rec {
sha256 = "8c36a28106d4b683a15c547dfe4cb757a53fa9247579d1cc25bd06a22cc62e50";
};
NUM_CORES = 1; # both fail: build and install
prefixKey = "-prefix ";
configureFlags = ["-no-tk"] ++ optionals useX11 [ "-x11lib" x11 ];
buildFlags = "world" + optionalString useNativeCompilers " bootstrap world.opt";

View file

@ -8,8 +8,6 @@ in
stdenv.mkDerivation rec {
name = "${baseName}-${v}";
NO_PARALLEL_BUILD_buildPhase = 1;
buildInputs = [ flex bison glib pkgconfig python cairo ];
propagatedBuildInputs = [ libffi ];
configureFlags = "--enable-gcov";

View file

@ -19,8 +19,6 @@ stdenv.mkDerivation {
buildInputs = [nspr perl zlib];
NO_PARALLEL_BUILD_buildPhase = 1;
# Based on the build instructions at
# http://www.mozilla.org/projects/security/pki/nss/nss-3.11.4/nss-3.11.4-build.html

View file

@ -14,8 +14,6 @@ stdenv.mkDerivation (rec {
sha1 = "3f800ea9fa3da1c0f576d689be7dca3d55a4cb62";
};
NO_PARALLEL_BUILD_buildPhase = 1;
buildNativeInputs = [ perl ];
configureScript = "./config";

View file

@ -14,8 +14,6 @@ stdenv.mkDerivation ( rec {
sha256 = "008z1h09pa6dfxs4wgbqj5i1clw4v82b1waqvwanb1kb6wlbq6mh";
};
NO_PARALLEL_BUILD_buildPhase = 1;
buildNativeInputs = [ perl ];
configureScript = "./config";

View file

@ -11,7 +11,4 @@ stdenv.mkDerivation rec {
description = "The GNU Portable Threads";
homepage = http://www.gnu.org/software/pth;
};
NO_PARALLEL_BUILD_buildPhase = 1;
NO_PARALLEL_BUILD_installPhase = 1;
}

View file

@ -14,5 +14,4 @@ stdenv.mkDerivation {
'';
configureFlags = "--with-png=${libpng} --with-z=${zlib} --with-pcre=${pcre} --with-readline=${readline}";
buildInputs = [ncurses pcre libpng zlib readline];
NO_PARALLEL_BUILD_installPhase = 1;
}

View file

@ -17,5 +17,4 @@ stdenv.mkDerivation {
meta = {
description = "A fast lexical analyser generator";
};
NO_PARALLEL_BUILD_installPhase = 1;
}

View file

@ -16,5 +16,4 @@ stdenv.mkDerivation {
meta = {
description = "A fast lexical analyser generator";
};
NO_PARALLEL_BUILD_installPhase = 1;
}

View file

@ -16,5 +16,4 @@ stdenv.mkDerivation {
meta = {
description = "A fast lexical analyser generator";
};
NO_PARALLEL_BUILD_installPhase = 1;
}

View file

@ -9,5 +9,4 @@ stdenv.mkDerivation {
md5 = "bd8753d0b22e1f4ec87a553a73021adf";
};
buildInputs = [yacc];
NO_PARALLEL_BUILD_installPhase = 1;
}

View file

@ -73,25 +73,6 @@ addToSearchPath() {
addToSearchPathWithCustomDelimiter "${PATH_DELIMITER}" "$@"
}
cmd(){
echo "cmd: $@"
"$@"
}
runMake(){
local optout=NO_PARALLEL_BUILD_${curPhase}
[ -n "${!optout}" ] || \
local j="$makeFlagsParallelBuild"
cmd make ${makefile:+-f $makefile} "$@" $j
}
######################################################################
# parallel builds: opt-out
# - in a phase: set NO_PARALLEL_BUILD_${PHASE_NAME}
# - for this build: pass NUM_CORES=1 to the builder
if [ "$NUM_CORES" != 1 ]; then
makeFlagsParallelBuild="-j ${NIX_MAX_PARALLELIZATION:-1} ${NIX_TARGET_LOAD:+-l} $NIX_TARGET_LOAD"
fi
######################################################################
# Initialisation.
@ -620,7 +601,9 @@ buildPhase() {
return
fi
runMake $makeFlags "${makeFlagsArray[@]}" \
echo "make flags: $makeFlags ${makeFlagsArray[@]} $buildFlags ${buildFlagsArray[@]}"
make ${makefile:+-f $makefile} \
$makeFlags "${makeFlagsArray[@]}" \
$buildFlags "${buildFlagsArray[@]}"
runHook postBuild
@ -630,7 +613,9 @@ buildPhase() {
checkPhase() {
runHook preCheck
runMake $makeFlags "${makeFlagsArray[@]}" \
echo "check flags: $makeFlags ${makeFlagsArray[@]} $checkFlags ${checkFlagsArray[@]}"
make ${makefile:+-f $makefile} \
$makeFlags "${makeFlagsArray[@]}" \
$checkFlags "${checkFlagsArray[@]}" ${checkTarget:-check}
runHook postCheck
@ -678,7 +663,8 @@ installPhase() {
ensureDir "$prefix"
installTargets=${installTargets:-install}
runMake $installTargets \
echo "install flags: $installTargets $makeFlags ${makeFlagsArray[@]} $installFlags ${installFlagsArray[@]}"
make ${makefile:+-f $makefile} $installTargets \
$makeFlags "${makeFlagsArray[@]}" \
$installFlags "${installFlagsArray[@]}"
@ -754,7 +740,8 @@ fixupPhase() {
distPhase() {
runHook preDist
runMake $distFlags "${distFlagsArray[@]}" ${distTarget:-dist}
echo "dist flags: $distFlags ${distFlagsArray[@]}"
make ${makefile:+-f $makefile} $distFlags "${distFlagsArray[@]}" ${distTarget:-dist}
if test "$dontCopyDist" != 1; then
ensureDir "$out/tarballs"

View file

@ -17,6 +17,4 @@ stdenv.mkDerivation {
platforms = args.lib.platforms.linux;
};
NUM_CORES = 1;
}

View file

@ -1,31 +0,0 @@
commit b77e3721f19b4e5084125eb8dc7186117004dd4b
Author: Marc Weber <marco-oweber@gmx.de>
Date: Sun Jun 13 23:53:46 2010 +0200
generic/setup.sh: add -j (+1) -l (*2) options to make depending on $NUM_CORES
diff --git a/pkgs/stdenv/generic/setup.sh b/pkgs/stdenv/generic/setup.sh
index a9f4d4d..685c0ec 100644
--- a/pkgs/stdenv/generic/setup.sh
+++ b/pkgs/stdenv/generic/setup.sh
@@ -79,9 +79,19 @@ cmd(){
}
runMake(){
- cmd make ${makefile:+-f $makefile} "$@"
+ local optout=NO_PARALLEL_BUILD_${curPhase}
+ [ -n "${!optout}" ] || \
+ local j="$makeFlagsParallelBuild"
+ cmd make ${makefile:+-f $makefile} "$@" $j
}
+######################################################################
+# parallel builds: opt-out
+# - in a phase: set NO_PARALLEL_BUILD_${PHASE_NAME}
+# - for this build: pass NUM_CORES=1 to the builder
+if [ "$NUM_CORES" -gt 1 ]; then
+ makeFlagsParallelBuild="-j $(( $NUM_CORES + 1 )) -l $(( 2 * $NUM_CORES ))"
+fi
######################################################################
# Initialisation.

View file

@ -40,6 +40,4 @@ stdenv.mkDerivation rec {
homepage = http://nixos.org/;
license = "LGPLv2+";
};
patches = [ ./num-cores.patch ];
}

View file

@ -2858,7 +2858,6 @@ rec {
};
XMLSAX = buildPerlPackage {
NUM_CORES=1;
name = "XML-SAX-0.96";
src = fetchurl {
url = mirror://cpan/authors/id/G/GR/GRANTM/XML-SAX-0.96.tar.gz;