opts.sh: Work around a mysterious feature in cygwin's gawk where specifying the input...
authorRoger Sayle <roger@eyesopen.com>
Sat, 14 Jun 2003 15:05:41 +0000 (15:05 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Sat, 14 Jun 2003 15:05:41 +0000 (15:05 +0000)
* opts.sh: Work around a mysterious feature in cygwin's gawk
where specifying the input files explicitly has a different
behavior to piping them via stdin.

From-SVN: r67946

gcc/ChangeLog
gcc/opts.sh

index 9381b4069a0b4e2ee6f85e375d583786b4129356..fd2c2949e1f712e607199db46007294a0408f7b6 100644 (file)
@@ -1,3 +1,9 @@
+2003-06-14  Roger Sayle  <roger@eyesopen.com>
+
+       * opts.sh: Work around a mysterious feature in cygwin's gawk
+       where specifying the input files explicitly has a different
+       behavior to piping them via stdin.
+
 2003-06-14  Neil Booth  <neil@daikokuya.co.uk>
 
        * doc/sourcebuild.texi: Update.
index 9be2c5d7befb65f3a973bfc92758de1489178c97..4d59dc5b592f47b1e54b8ed62c2395458ddea712 100644 (file)
@@ -33,12 +33,12 @@ SORT=sort           # Could be /bin/sort or /usr/bin/sort
 C_FILE=$1; shift
 H_FILE=$1; shift
 
-cat "$@" | ${AWK} '
+${AWK} '
        BEGIN{ RS=""; FS="\n" }
        # Ignore comments and blank lines
        /^[ \t]*(;|$)/  { next }
        /^[^ \t]/       { gsub ("\n", "\034", $0); print }
-' | ${SORT} | ${AWK} '
+' "$@" | ${SORT} | ${AWK} '
     function switch_flags (langs,   flags)
     {
        langs = ":" langs ":"