This is the mail archive of the gcc-help@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: gcc switch for reading compiler options from a file


At 14.26 11/01/2002 (GMT -0800), Moran-Strilchuk, Mike wrote:
>I'm looking for the switch to use on the command line so that I can read the
>compiler options (and/or list of files) from a text file.  That is:
> >>gcc <switch> input_file.txt
>
>Can someone help me out with this?
>
>Thanks!
>-Mike

Hi,
I don't know if there is a suitable swithc - anyway you could use something 
like
cat input_file.txt | xargs gcc <other_switches>

Note that in this case <other_switches> will be read BEFORE the content of 
input_file.txt

Or (if using bash)
gcc <some_switches> $(cat input_file.txt) <other_switches>

fwyzard



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