Re: [Anjuta-list] suggestion



Sorry to reply to my own mail. This URL might be helpful:

http://gcc.gnu.org/onlinedocs/gcc-3.0.1/cpp.html

- Biswa.

On Tuesday 11 September 2001 10:08 am, Biswapesh Chattopadhyay wrote:
> On Friday 07 September 2001 09:54 pm, Naba Kumar wrote:
> > On 08 Sep 2001 17:23:16 +0530, Biswapesh Chattopadhyay wrote:
> > > OK - I figured out a way to do this without touching the code. Do this:
> > > [...]
> >
> > Thanks. That's really nice. I had the idea of implementing this
> > dynamically, but somehow I could not figure out how to scan for the
> > included files in a given source file. If somebody could provide a code
> > segment that can parse a file for "local" includes, that would really be
> > very helpful.
>
> This works from command line (gives all include file names) :
> cpp <FileName> | grep "^#" | awk '{print $3}' | sed 's/"//g' | sort -u
>
> Alternatively, try this:
> cpp -H <FileName>  | grep "^\." | awk '{print $2}' | sort -u
>
<snip>




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