This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc switch for reading compiler options from a file
- From: Andrea 'Fyre Wyzard' Bocci <fwyzard at inwind dot it>
- To: "Moran-Strilchuk, Mike" <mike dot moran-strilchuk at intel dot com>,gcc-help at gcc dot gnu dot org
- Date: Sat, 12 Jan 2002 00:41:02 +0100
- Subject: 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