# This script parses the output of a gcc bootstrap when using warning
# flags and determines various statistics.
#
-# usage: warn_summary [-llf] [-s stage] [-nosub|-ch|-cp|-f|-java|-intl|-fixinc]
+# usage: warn_summary [-llf] [-s stage] [-nosub|-ch|-cp|-f|-java|-ada|-intl|-fixinc]
# [-pass|-wpass] [file(s)]
#
# -llf
-# Filter out long lines from the bootstap output before any other
+# Filter out long lines from the bootstrap output before any other
# action. This is useful for systems with broken awks/greps which choke
# on long lines. It is not done by default as it sometimes slows things
# down.
#
# -nosub
# Only show warnings from the gcc top level directory.
-# -ch|-cp|-f|-java|-intl|-fixinc
+# -ch|-cp|-f|-java|-ada|-intl|-fixinc
# Only show warnings from the specified language subdirectory.
# These override each other so only the last one passed takes effect.
#
$AWK "/^Bootstrapping the compiler|^Building the C and C\+\+ compiler/{t=1} ; /stage$stageN/{t=0} ; {if(t==1)print}"
else
stageNminus1=`expr $stageN - 1`
- $AWK "/stage$stageNminus1/{t=1} ; /stage$stageN/{t=0} ; {if(t==1)print}"
+ $AWK "/stage${stageNminus1}\//{t=1} ; /stage$stageN/{t=0} ; {if(t==1)print}"
fi
fi
}
# Start the main section.
-usage="usage: `basename $0` [-llf] [-s stage] [-nosub|-ch|-cp|-f|-java|-intl|-fixinc] [-pass|-wpass] [file(s)]"
+usage="usage: `basename $0` [-llf] [-s stage] [-nosub|-ch|-cp|-f|-java|-ada|-intl|-fixinc] [-pass|-wpass] [file(s)]"
stageN=3
tmpfile=/tmp/tmp-warn.$$
-s) if test -z "$2"; then echo $usage 1>&2; exit 1; fi
stageN="$2"; shift 2 ;;
-s*) stageN="`expr $1 : '-s\(.*\)'`" ; shift ;;
- -nosub|-ch|-cp|-f|-java|-intl|-fixinc) filter="`expr $1 : '-\(.*\)'`" ; shift ;;
+ -nosub|-ch|-cp|-f|-java|-ada|-intl|-fixinc) filter="`expr $1 : '-\(.*\)'`" ; shift ;;
-pass) pass=1 ; shift ;;
-wpass) pass=w ; shift ;;
-*) echo $usage 1>&2 ; exit 1 ;;