From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Oleh Krehel Newsgroups: gmane.emacs.devel Subject: Re: CC Mode and GCC/CEDET integration for evaluating macros Date: Fri, 01 May 2015 20:52:46 +0200 Message-ID: <87zj5ogmf5.fsf@gmail.com> References: <87k2wsi62e.fsf@gmail.com> <20150501181135.GA6376@acm.fritz.box> <877fssi2cb.fsf@gmail.com> <83lhh8qgp6.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1430506750 17869 80.91.229.3 (1 May 2015 18:59:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 May 2015 18:59:10 +0000 (UTC) Cc: acm@muc.de, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 01 20:59:02 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YoG9L-0003GW-PY for ged-emacs-devel@m.gmane.org; Fri, 01 May 2015 20:58:59 +0200 Original-Received: from localhost ([::1]:55242 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoG9K-0003FF-WD for ged-emacs-devel@m.gmane.org; Fri, 01 May 2015 14:58:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoG99-0003F8-Eb for emacs-devel@gnu.org; Fri, 01 May 2015 14:58:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YoG96-0001Az-9Q for emacs-devel@gnu.org; Fri, 01 May 2015 14:58:47 -0400 Original-Received: from mail-wi0-x231.google.com ([2a00:1450:400c:c05::231]:38614) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YoG96-0001Ar-2b; Fri, 01 May 2015 14:58:44 -0400 Original-Received: by wiun10 with SMTP id n10so55812611wiu.1; Fri, 01 May 2015 11:58:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=RRQ67YB+dT6mSbTpU45gAeM8Fsf9DME3q2ms3Q2jNtQ=; b=PVn0J1p8VS84p9X13k+78R2lsCek5voIjxO51M706wc0jPvH/j6/lrtB4Gq57oDjPF Ip3smW5e8yJSq4T56OTKpIQBBzi3vxkDC2baupq6IYMGbmcAmo/j8LnRK84bMK11Ch4k 8yJLOEUTcI7ID2cNKmHl0KdAWC5waDz8pA7FDpkeXzOvHsHNeQvUGyMSek26x5awBXLO tTTJ85yutHc5BM7Q2OpIfRZTFv8gudhtfAezOIyNOFFNlRa4YchmmduKOTXsa4pAXmx2 R677WNrFDChdEXXT/KtkCUoa8soJajyOgl0QRswqvyC+S7tX3ycmtl+2QWoUPN8bZgS3 rNUQ== X-Received: by 10.194.172.130 with SMTP id bc2mr20689437wjc.85.1430506723294; Fri, 01 May 2015 11:58:43 -0700 (PDT) Original-Received: from firefly (dyn069045.nbw.tue.nl. [131.155.69.45]) by mx.google.com with ESMTPSA id qt2sm8703466wjc.7.2015.05.01.11.58.42 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 01 May 2015 11:58:42 -0700 (PDT) In-Reply-To: <83lhh8qgp6.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 01 May 2015 21:46:13 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:400c:c05::231 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:186098 Archived-At: Eli Zaretskii writes: >> From: Oleh Krehel >> Date: Fri, 01 May 2015 20:23:32 +0200 >> Cc: emacs-devel@gnu.org >> >> 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_cflags: 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 -I/usr/lib/x86_64-linux-gnu/glib-2. 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 -I/usr/include/dbus-1. 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. Oleh