This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA/C] Break out C options into a separate file


"Joseph S. Myers" <jsm28@cam.ac.uk> writes:

> On Sun, 1 Jun 2003, Andreas Tobler wrote:
>
>> Just for the record, my ppc linux box has sort under /bin. So a 
>> bootstrap fails here unless I symlink around.
>> 
>> 
>> Would it be possible to check for awk/sort and take the corresponding one?
>
> In general, this sort of thing should be taken from the PATH rather than
> hardcoding directories.  In the case of awk, there's a standard autoconf
> test to determine the preferred awk.

The right thing to do is what po/exgettext does:

# Set AWK if environment has not already set it.
AWK=${AWK-awk}

That will pick up the $(AWK) variable from the Makefile, which in turn
is set by the configure script to whichever of mawk, gawk, or nawk you
have.

For sort, don't use a variable at all.

I note that opts.sh has a localized override of LANG on the sort
invocation.  It would be a good idea to copy this bit from
po/exgettext instead:

# Always operate in the C locale.
LANG=C
LANGUAGE=C
LC_ALL=C
export LANG LANGUAGE LC_ALL

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]