Move .gir files to -good.gir, tweak build order.
authorColin Walters <walters@src.gnome.org>
Sun, 17 Aug 2008 15:06:49 +0000 (15:06 +0000)
committerColin Walters <walters@src.gnome.org>
Sun, 17 Aug 2008 15:06:49 +0000 (15:06 +0000)
* gir/glib-2.0.gir, gir/gobject-2.0.gir:
Rename to -good, always generate during build.
* gir/Makefile.am: Ensure .gir files dep on
all scanner sources.
* Makefile.am: Switch build order to ensure
the scanner is ready before we do gir/.
* tools/g-ir-scanner: Look for .git too.

svn path=/trunk/; revision=390

ChangeLog
Makefile.am
gir/Makefile.am
gir/glib-2.0-good.gir [moved from gir/glib-2.0.gir with 100% similarity]
gir/gobject-2.0-good.gir [moved from gir/gobject-2.0.gir with 100% similarity]
tools/g-ir-scanner

index 88b11db..5ae35f8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-08-17  Colin Walters  <walters@verbum.org>
+
+       * gir/glib-2.0.gir, gir/gobject-2.0.gir:
+       Rename to -good, always generate during build.
+       * gir/Makefile.am: Ensure .gir files dep on
+       all scanner sources.
+       * Makefile.am: Switch build order to ensure
+       the scanner is ready before we do gir/.
+       * tools/g-ir-scanner: Look for .git too.
+
 2008-08-17  Johan Dahlin  <johan@gnome.org>
 
        * girepository/gtypelib.c (validate_enum_blob):
index d382d24..d0f1262 100644 (file)
@@ -18,7 +18,7 @@ endif
 
 ACLOCAL_AMFLAGS = -I m4
 
-SUBDIRS = gir girepository giscanner tools tests
+SUBDIRS = girepository giscanner tools gir tests
 DIST_SUBDIRS = m4 $(SUBDIRS)
 
 man_MANS = docs/g-ir-scanner.1
index 415a74e..760a21e 100644 (file)
@@ -1,11 +1,13 @@
 BUILT_SOURCES = 
 
 G_IR_SCANNER = $(top_srcdir)/tools/g-ir-scanner
+G_IR_SCANNER_FILES = $(top_srcdir)/giscanner/*.py \
+       $(top_builddir)/giscanner/libgiscanner.la
 
 # glib
 GLIB_INCLUDEDIR=`pkg-config --variable=includedir glib-2.0`/glib-2.0
 GLIB_LIBDIR=`pkg-config --variable=libdir glib-2.0`
-glib-2.0.gir: $(G_IR_SCANNER)
+glib-2.0.gir: $(G_IR_SCANNER) $(G_IR_SCANNER_FILES)
        $(G_IR_SCANNER) -v --namespace GLib \
            --output $@ \
            --strip-prefix=g \
@@ -18,7 +20,7 @@ BUILT_SOURCES += glib-2.0.gir
 
 # gobject
 GOBJECT_LIBDIR=`pkg-config --variable=libdir gobject-2.0`
-gobject-2.0.gir: $(G_IR_SCANNER)
+gobject-2.0.gir: $(G_IR_SCANNER) $(G_IR_SCANNER_FILES)
        $(G_IR_SCANNER) -v --namespace GObject \
            --output $@ \
            --strip-prefix=g \
@@ -32,3 +34,5 @@ BUILT_SOURCES += gobject-2.0.gir
 
 girdir=$(datadir)/gir
 dist_gir_DATA = $(BUILT_SOURCES)
+
+EXTRA_DIST = glib-2.0-good.gir gobject-2.0-good.gir
similarity index 100%
rename from gir/glib-2.0.gir
rename to gir/glib-2.0-good.gir
similarity index 100%
rename from gir/gobject-2.0.gir
rename to gir/gobject-2.0-good.gir
index 4bce433..1792661 100755 (executable)
@@ -27,7 +27,8 @@ import sys
 # This only works on unix systems
 currentdir = os.path.dirname(os.path.abspath(sys.argv[0]))
 basedir = os.path.abspath(os.path.join(currentdir, '..'))
-if os.path.exists(os.path.join(basedir, '.svn')):
+if (os.path.exists(os.path.join(basedir, '.svn')) or
+    os.path.exists(os.path.join(basedir, '.git'))):
     path = basedir
 else:
     path = os.path.join(basedir, 'lib', 'python%d.%d' % sys.version_info[:2],