summaryrefslogtreecommitdiff
path: root/gcc/opts.sh
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-01 18:24:08 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2003-06-01 18:24:08 +0000
commit1ab8a92425501c81153cb2a78dab40e537a97844 (patch)
tree1e7c6e2efd378397495290fea96cd8e90fdbb84b /gcc/opts.sh
parent4486e02873fa383e0399cfce597ed041847fcabd (diff)
downloadgcc-1ab8a92425501c81153cb2a78dab40e537a97844.tar.gz
* Makefile.in (c-options.c, c-options.h): Parallel make safe.
* c.opt: End in blank line. * opts.sh: Take AWK from environment if available; use C locale. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67305 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/opts.sh')
-rw-r--r--gcc/opts.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/opts.sh b/gcc/opts.sh
index 182f79667d2..9a4df53c696 100644
--- a/gcc/opts.sh
+++ b/gcc/opts.sh
@@ -19,7 +19,15 @@
#
# Usage: opts.sh outfile.c outfile.h file1.opt [file2.opt, ...]
-AWK=/usr/bin/awk
+# Always operate in the C locale.
+LANG=C
+LANGUAGE=C
+LC_ALL=C
+export LANG LANGUAGE LC_ALL
+
+# Set AWK if environment has not already set it.
+AWK=${AWK-awk}
+
SORT=sort # Could be /bin/sort or /usr/bin/sort
C_FILE=$1; shift
@@ -30,7 +38,7 @@ cat "$@" | ${AWK} '
# Ignore comments and blank lines
/^[ \t]*(;|$)/ { next }
/^[^ \t]/ { gsub ("\n", "\034", $0); print }
-' | LANG=C ${SORT} | ${AWK} '
+' | ${SORT} | ${AWK} '
function switch_flags (langs, flags)
{
langs = ":" langs ":"