Asking gcc for the include directory location?

Dave Korn dave.korn@artimi.com
Thu Dec 7 14:30:00 GMT 2006


On 07 December 2006 14:24, Toralf Lund wrote:

>> 
>> mkdir -p LOOK_HERE_FOR_SYSTEM_DIR &&
>> gcc -v -E - </dev/null >/dev/null -isystem LOOK_HERE_FOR_SYSTEM_DIR |
>> grep -A1 LOOK_HERE_FOR_SYSTEM_DIR | tail -1

> So you're method might work at least in principle. The actual commands
> presented here don't quite work for me, but I suspect this is due to a
> minor issue with the grep options or I/O redirections. (I get the full
> output from gcc -v, not just a directory line.)



  Sorry, cut'n'pasto.  There should be a 2>&1 before the other two
redirections - here's the exact line from my command shell:


/artimi $ mkdir -p LOOK_HERE_FOR_SYSTEM_DIR &&  gcc -v -E - 2>&1 </dev/null
>/dev/null -isystem LOOK_HERE_FOR_SYSTEM_DIR | grep -A1
LOOK_HERE_FOR_SYSTEM_DIR | tail -1 
/usr/local/include
@_______. .
(       /"\
 ||--||(___)
 '"  '"'---'
/artimi $



    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list