test_summary (configflags): Only use the first match.

* test_summary (configflags): Only use the first match.  Remove
excess space.  Use sub instead of gsub where possible.  Use `none'
if no configure flags were given.

From-SVN: r61483
This commit is contained in:
Alexandre Oliva 2003-01-19 14:34:12 +00:00 committed by Alexandre Oliva
parent a99820e6c8
commit d25fc1b572
2 changed files with 17 additions and 8 deletions

View File

@ -1,3 +1,9 @@
2003-01-19 Alexandre Oliva <aoliva@redhat.com>
* test_summary (configflags): Only use the first match. Remove
excess space. Use sub instead of gsub where possible. Use `none'
if no configure flags were given.
2003-01-10 Loren J. Rittle <ljrittle@acm.org> 2003-01-10 Loren J. Rittle <ljrittle@acm.org>
* test_summary (configflags): awk portability. * test_summary (configflags): awk portability.

View File

@ -88,25 +88,28 @@ if $forcemail || $anychange; then :; else mailto=nobody; fi &&
cat ./config.status $files | cat ./config.status $files |
$AWK ' $AWK '
BEGIN { BEGIN {
lang=""; lang=""; configflags = "";
address="gcc-testresults@gcc.gnu.org"; address="gcc-testresults@gcc.gnu.org";
version="gcc"; version="gcc";
print "cat <<'"'"'EOF'"'"' |"; print "cat <<'"'"'EOF'"'"' |";
'${prepend_logs+" system(\"cat $prepend_logs\"); "}' '${prepend_logs+" system(\"cat $prepend_logs\"); "}'
} }
$0 ~ /^[^ ]*\/configure / || $0 ~ /^# [^ ]*\/configure / { ($0 ~ /^[^ ]*\/configure / || $0 ~ /^# [^ ]*\/configure /) &&
configflags == "" {
configflags = $0 " "; configflags = $0 " ";
gsub(/^# /, "", configflags); sub(/^# /, "", configflags);
srcdir = configflags; srcdir = configflags;
gsub(/\/configure .*/, "", srcdir); sub(/\/configure .*/, "", srcdir);
printf "LAST_UPDATED: "; printf "LAST_UPDATED: ";
system("tail -1 " srcdir "/LAST_UPDATED"); system("tail -1 " srcdir "/LAST_UPDATED");
print ""; print "";
gsub(/^[^ ]*\/configure /, "configure flags: ", configflags); sub(/^[^ ]*\/configure */, " ", configflags);
gsub(/ --with-gcc-version-trigger=[^ ]* /, " ", configflags); sub(/ --with-gcc-version-trigger=[^ ]* /, " ", configflags);
gsub(/ --norecursion /, " ", configflags); sub(/ --norecursion /, " ", configflags);
gsub(/ $/, "", configflags); sub(/ $/, "", configflags);
sub(/^ *$/, " none", configflags);
configflags = "configure flags:" configflags;
} }
/^Running target / { print ""; print; } /^Running target / { print ""; print; }
/^Target / { if (host != "") next; else host = $3; } /^Target / { if (host != "") next; else host = $3; }