This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: --print-prog-name=include
On Jul 6, 2000, Ulrich Drepper <drepper@redhat.com> wrote:
> Alexandre Oliva <aoliva@redhat.com> writes:
>> > The current gcc cannot handle
>>
>> > gcc --print-prog-name=include
>>
>> Wouldn't you agree this was a mis-feature, since `include' isn't a
>> program name?
> Then tell me another way you can find out about the pathname.
gcc -print-file-name=include
However, since `include' isn't a file, maybe someone will have the
bright idea of ``fixing'' it similarly in the future, so how about:
gcc -v -E - < /dev/null 2>&1 > /dev/null | sed '1,/^#include <\.\.\.> search starts here:$/d' | sed 1q
Ugh! :-)
Or:
echo `gcc -print-search-dirs | sed -n 's/^install: //p'`include
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me