[Top][All Lists]

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

Re: CC Mode and GCC/CEDET integration for evaluating macros

From: Oleh Krehel
Subject: Re: CC Mode and GCC/CEDET integration for evaluating macros
Date: Fri, 01 May 2015 20:52:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>> From: Oleh Krehel <address@hidden>
>> Date: Fri, 01 May 2015 20:23:32 +0200
>> Cc: address@hidden
>> I tried c-macro-expand and it works well for macros defined within the
>> current file, and even for the standard stuff like __TIMESTAMP__.  But
>> it doesn't work, for instance for HAVE_PWD_H in editfns.c.  Do you know
>> if it could work? Is it just a matter of passing some include path to
>> the preprocessor call?
> You need to pass it the same -I flags as used during the Emacs build,
> see src/Makefile.

Thanks for the suggestion. I tried it and it didn't work. I've edited
src/Makefile.in to add:

        echo "$(ALL_CFLAGS)"

Here are the flags that I obtained and passed to `c-macro-expand':

-Demacs  -I. -I. -I../lib -I../lib   -pthread -I/usr/include/gtk-3.0 
-I/usr/include/atk-1.0 -I/usr/inclu
de/at-spi2-atk/2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ 
-I/usr/include/cairo -I/usr/inc
lude/gdk-pixbuf-2.0 -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/
harfbuzz -I/usr/include/freetype2 -I/usr/include/pixman-1 
-I/usr/include/libpng12   -I/usr/include/freet
ype2     -pthread -I/usr/include/librsvg-2.0 -I/usr/include/glib-2.0 
0/include -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo 
-I/usr/include/libpng12 -I/usr/include/pixm
an-1 -I/usr/include/freetype2    -I/usr/include/libpng12 -I/usr/include/libxml2 
0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include      -pthread 
-I/usr/include/glib-2.0 -I/usr/lib/x86_64-l
inux-gnu/glib-2.0/include   -pthread -I/usr/include/gconf/2 
-I/usr/include/dbus-1.0 -I/usr/lib/x86_64-li
nux-gnu/dbus-1.0/include -I/usr/include/glib-2.0 
-I/usr/lib/x86_64-linux-gnu/glib-2.0/include   -I/usr/i
nclude/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include   
-I/usr/include/freetype2   -I/usr/include
/freetype2   -I/usr/include/freetype2

Is there a working / better way to get these flags. I wouldn't want to
reconfigure just to get the flags.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]