bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiler flags in CC test broken


From: Burton, Ross
Subject: Re: Compiler flags in CC test broken
Date: Tue, 21 Feb 2017 14:29:08 +0000

So I gave up trying to write a neat regex in sed and just used awk instead:

        cf_flags=`echo "$CC" | awk  'BEGIN{ORS=" ";RS=" "} /^-.+/ {print $1}'`
        CC=`echo "$CC " | awk  'BEGIN{ORS=" ";RS=" "} /^[^-].+/ {print $1}'`

Ross

On 21 February 2017 at 13:51, Burton, Ross <address@hidden> wrote:

On 21 February 2017 at 00:36, Burton, Ross <address@hidden> wrote:
Basically assuming that CC is a white space separated list of words, and all of them but the first are compiler options.

Of course this doesn't work if CC is "ccache gcc".

Ross 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]