Skip to content
Snippets Groups Projects
Commit 71489adc authored by Markus Blatt's avatar Markus Blatt
Browse files

[bugfix,dunecontrol] Corrects word detection during variable translation.

When deciding which variable to put before cmake as environment variables
our sed pattern did not check for the beginning of a word or line. Therefore
MPICC=bla would be converted to CC=bla.
With this commit we make sure that there is eihter a beginning of a line or
a whitespace before the variable.
parent c479902b
No related branches found
No related tags found
No related merge requests found
......@@ -676,11 +676,11 @@ run_default_configure () {
# such that they are honored by cmake.
flags="CXX CC CXXFLAGS CFLAGS CPPFLAGS LDFLAGS F77 FFLAGS FLIBS FC FCFLAGS FCLIBS LIBS"
for i in $flags; do
cflags=`echo "$PARAMS" | $GREP $i= | $SED -e "s/.*\($i=\"[^\"]*\"\).*/\1/" -e "s/.*\($i='[^']*'\).*/\1/"`
cflags=`echo "$PARAMS" | $GREP $i= | $SED -e "s/.*[$BLANK^]\($i=\"[^\"]*\"\).*/\1/" -e "s/.*[$BLANK^]\($i='[^']*'\).*/\1/"`
if test -n "$cflags" && test "$PARAMS" != "$cflags" ; then
PREPARAMS="$PREPARAMS $cflags"
else
cflags=`echo "$PARAMS" | $GREP $i= | $SED -e "s/.*\($i=[^$BLANK]*\).*/\1/"`
cflags=`echo "$PARAMS" | $GREP $i= | $SED -e "s/.*[$BLANK^]\($i=[^$BLANK]*\).*/\1/"`
if test -n "$cflags" && test "$PARAMS" != "$cflags" ; then
PREPARAMS="$PREPARAMS $cflags"
fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment