Make distcheck pass
authorJohan Dahlin <johan@src.gnome.org>
Mon, 28 Apr 2008 03:05:29 +0000 (03:05 +0000)
committerJohan Dahlin <johan@src.gnome.org>
Mon, 28 Apr 2008 03:05:29 +0000 (03:05 +0000)
svn path=/trunk/; revision=245

tests/parser/Makefile.am

index 235e8e2..30a07f8 100644 (file)
@@ -4,12 +4,12 @@ testlib_LTLIBRARIES = libfoo.la libutility.la
 testlibdir = $(prefix)/unused
 install-testlibLTLIBRARIES: # prevent it from being installed
 
-libfoo_la_SOURCES = foo.c foo-object.h
+libfoo_la_SOURCES = $(srcdir)/foo.c $(srcdir)/foo-object.h
 libfoo_la_CFLAGS = $(GOBJECT_CFLAGS)
 libfoo_la_LDFLAGS = -module -avoid-version
 libfoo_la_LIBADD = $(GOBJECT_LIBS)
 
-libutility_la_SOURCES = utility.c utility.h
+libutility_la_SOURCES = $(srcdir)/utility.c $(srcdir)/utility.h
 libutility_la_CFLAGS = $(GOBJECT_CFLAGS)
 libutility_la_LDFLAGS = -module -avoid-version
 libutility_la_LIBADD = $(GOBJECT_LIBS)
@@ -31,7 +31,7 @@ utility.gir: libutility.la utility.h $(SCANNER)
 Foo.gir: libfoo.la foo-object.h $(SCANNER)
        @PYTHONPATH=$(top_builddir) $(SCANNER) -v \
        --include=$(top_srcdir)/gir/gobject-2.0.gir \
-       --include=$(srcdir)/utility.gir \
+       --include=$(builddir)/utility.gir \
        --library=libfoo.la \
        --namespace=Foo \
        --pkg gobject-2.0 \
@@ -42,11 +42,17 @@ check-%.gir: %.gir
        @diff -u -U 10 $(srcdir)/$*-expected.gir $*.gir && echo "* $*.gir"
 
 pre-check:
+       @if test "$(top_builddir)" != "$(top_srcdir)"; then \
+          cp $(top_srcdir)/giscanner/*.py $(top_builddir)/giscanner; \
+       fi
        @echo "Running parser checks..."
 
 check-local: pre-check check-utility.gir check-Foo.gir 
        @echo "======================="
        @echo "All parser tests passed"
        @echo "======================="
+       @if test "$(top_builddir)" != "$(top_srcdir)"; then \
+          rm -f $(top_builddir)/giscanner/*.py*; \
+       fi
 
 .PHONY: utility.gir Foo.gir