Skip to content

Commit

Permalink
Fixed leading/trailing spaces in options that confuse configure.
Browse files Browse the repository at this point in the history
git-svn-id: file:///mnt/fast/tau2git/svnroot/trunk/tau2@7183 a8e31b63-e6ca-409b-a01b-2eec1b506579
  • Loading branch information
amorris committed May 7, 2009
1 parent b252a3b commit 111fb29
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion upgradetau
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ foreach $config (@allConfigs) {

foreach $opt (@oldopts) {

# remove leading and trailing whitespace
$opt =~ s/^\s+//;
$opt =~ s/\s+$//;

# get the base option (e.g. -mpiinc for -mpiinc=/usr/local/...)
$base = $opt;
$base =~ s/=.*//g;
Expand All @@ -70,9 +74,13 @@ foreach $config (@allConfigs) {
} else {
# no match, add to $newopt
$newopt = $newopt . " " . $opt;

# remove leading and trailing whitespace
$newopt =~ s/^\s+//;
$newopt =~ s/\s+$//;
}
}

# flush the last option
if (!($newopt eq "")) {
if ($newopt =~ / /) {
Expand Down

0 comments on commit 111fb29

Please sign in to comment.