gobject-introspection r456 - in trunk: . gir giscanner
- From: johan svn gnome org
- To: svn-commits-list gnome org
- Subject: gobject-introspection r456 - in trunk: . gir giscanner
- Date: Fri, 22 Aug 2008 19:46:04 +0000 (UTC)
Author: johan
Date: Fri Aug 22 19:46:03 2008
New Revision: 456
URL: http://svn.gnome.org/viewvc/gobject-introspection?rev=456&view=rev
Log:
2008-08-22 Johan Dahlin <johan gnome org>
* configure.ac:
* gir/Makefile.am:
* giscanner/Makefile.am:
* giscanner/config.py.in:
* giscanner/sourcescanner.py:
Use the generated glibconfig.h for all scanner invokations.
Rename it to glibconfig-scanner.h and install it.
Add a config.py which so far contains the include dir.
Added:
trunk/giscanner/config.py.in
Modified:
trunk/ChangeLog
trunk/configure.ac
trunk/gir/Makefile.am
trunk/giscanner/ (props changed)
trunk/giscanner/Makefile.am
trunk/giscanner/sourcescanner.py
Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac (original)
+++ trunk/configure.ac Fri Aug 22 19:46:03 2008
@@ -102,6 +102,7 @@
gir/Makefile
girepository/Makefile
giscanner/Makefile
+giscanner/config.py
m4/Makefile
tools/Makefile
tests/Makefile
Modified: trunk/gir/Makefile.am
==============================================================================
--- trunk/gir/Makefile.am (original)
+++ trunk/gir/Makefile.am Fri Aug 22 19:46:03 2008
@@ -1,17 +1,9 @@
-BUILT_SOURCES = glibconfig.h
+BUILT_SOURCES =
G_IR_SCANNER = $(top_srcdir)/tools/g-ir-scanner
G_IR_SCANNER_FILES = $(top_srcdir)/giscanner/*.py \
$(top_builddir)/giscanner/libgiscanner.la
-GLIBCONFIG=`pkg-config --variable=libdir glib-2.0`/glib-2.0/include/glibconfig.h
-glibconfig.h:
- cat $(GLIBCONFIG) \
- | sed s/__G_LIBCONFIG_H__/__G_LIBCONFIG_GI_COPY_H__/g \
- | sed s/define\ G_HAVE_ISO_VARARGS\ 1/define\ G_HAVE_ISO_VARARGS\ 0/g \
- | sed s/define\ G_HAVE_GNUC_VARARGS\ 1/define\ G_HAVE_GNUC_VARARGS\ 0/g \
- > $(top_builddir)/gir/$@
-
# glib
GLIB_INCLUDEDIR=`pkg-config --variable=includedir glib-2.0`/glib-2.0
GLIB_LIBDIR=`pkg-config --variable=libdir glib-2.0`
@@ -27,7 +19,7 @@
-DGETTEXT_PACKAGE=Dummy \
-D__G_I18N_LIB_H__ \
-D__G_LIBCONFIG_H__ \
- $(top_builddir)/gir/glibconfig.h \
+ $(top_builddir)/giscanner/glibconfig-scanner.h \
$(GLIB_INCLUDEDIR)/glib/*.h
BUILT_SOURCES += GLib.gir
Modified: trunk/giscanner/Makefile.am
==============================================================================
--- trunk/giscanner/Makefile.am (original)
+++ trunk/giscanner/Makefile.am Fri Aug 22 19:46:03 2008
@@ -1,9 +1,19 @@
## Process this file with automake to produce Makefile.in
INCLUDES = -I$(top_srcdir)/girepository
-BUILT_SOURCES = scannerparser.c scannerparser.h scannerlexer.c scannerlexer.h
-
-CLEANFILES = scannerparser.c scannerparser.h scannerlexer.c scannerlexer.h
+BUILT_SOURCES = \
+ glibconfig-scanner.h \
+ scannerparser.c \
+ scannerparser.h \
+ scannerlexer.c \
+ scannerlexer.h
+
+CLEANFILES = \
+ glibconfig-scanner.h \
+ scannerparser.c \
+ scannerparser.h \
+ scannerlexer.c \
+ scannerlexer.h
AM_YFLAGS = -d -t
# Why do I have to do this automake?
@@ -57,5 +67,15 @@
_giscanner.so: _giscanner.la
ln -sf .libs/_giscanner.so .
+GLIBCONFIG=`pkg-config --variable=libdir glib-2.0`/glib-2.0/include/glibconfig.h
+glibconfig-scanner.h:
+ cat $(GLIBCONFIG) \
+ | sed s/__G_LIBCONFIG_H__/__G_LIBCONFIG_SCANNER_H__/g \
+ | sed s/define\ G_HAVE_ISO_VARARGS\ 1/define\ G_HAVE_ISO_VARARGS\ 0/g \
+ | sed s/define\ G_HAVE_GNUC_VARARGS\ 1/define\ G_HAVE_GNUC_VARARGS\ 0/g \
+ > $(top_builddir)/giscanner/$@
+
+gidir = $(includedir)/gobject-introspection-1.0/
+gi_HEADERS = glibconfig-scanner.h
include $(top_srcdir)/gcov.mak
Added: trunk/giscanner/config.py.in
==============================================================================
--- (empty file)
+++ trunk/giscanner/config.py.in Fri Aug 22 19:46:03 2008
@@ -0,0 +1,23 @@
+# -*- Mode: Python -*-
+# GObject-Introspection - a framework for introspecting GObject libraries
+# Copyright (C) 2008 Johan Dahlin
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+
+INCLUDEDIR = "@includedir@/gobject-introspection-1.0"
+INCLUDEDIR = INCLUDEDIR.replace(
+ "${prefix}", "@prefix@")
Modified: trunk/giscanner/sourcescanner.py
==============================================================================
--- trunk/giscanner/sourcescanner.py (original)
+++ trunk/giscanner/sourcescanner.py Fri Aug 22 19:46:03 2008
@@ -23,6 +23,7 @@
import tempfile
from . import _giscanner
+from .config import INCLUDEDIR
(CSYMBOL_TYPE_INVALID,
CSYMBOL_TYPE_CONST,
@@ -229,6 +230,16 @@
'-D__GI_SCANNER__',
'-I.',
]
+
+ # Do not parse the normal glibconfig.h, use the
+ # one we provide instead
+ cpp_args.append('-D__G_LIBCONFIG_H__')
+ dirname = os.path.dirname(os.path.abspath(__file__))
+ includedir = os.path.join(dirname, '..', 'giscanner')
+ if not os.path.exists(includedir):
+ includedir = INCLUDEDIR
+ filenames.insert(0, os.path.join(includedir, 'glibconfig-scanner.h'))
+
cpp_args += self._cpp_options
proc = subprocess.Popen(cpp_args,
stdin=subprocess.PIPE,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]