stdenv: accept wider range of $configureScript options

Fixes #12632.

I think it's better to quote this variable in general, because it is
common and even documented to pass space-separated commands in there.
The greps should just fail in that case and `if` won't proceed
which seems fine for such cases, and it's certainly better than
passing additional unintended parameters to grep
(which was happening all the time before).
This commit is contained in:
Vladimír Čunát 2016-01-29 11:53:50 +01:00
parent 80270e2019
commit 89036ef76a

View File

@ -644,14 +644,14 @@ configurePhase() {
# Add --disable-dependency-tracking to speed up some builds. # Add --disable-dependency-tracking to speed up some builds.
if [ -z "$dontAddDisableDepTrack" ]; then if [ -z "$dontAddDisableDepTrack" ]; then
if grep -q dependency-tracking $configureScript; then if grep -q dependency-tracking "$configureScript"; then
configureFlags="--disable-dependency-tracking $configureFlags" configureFlags="--disable-dependency-tracking $configureFlags"
fi fi
fi fi
# By default, disable static builds. # By default, disable static builds.
if [ -z "$dontDisableStatic" ]; then if [ -z "$dontDisableStatic" ]; then
if grep -q enable-static $configureScript; then if grep -q enable-static "$configureScript"; then
configureFlags="--disable-static $configureFlags" configureFlags="--disable-static $configureFlags"
fi fi
fi fi