blob: 93c7d32483db92c45cd47138eda4db6b5fb58b59 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
# We need to build a shared library, which can be dlopened
# it does not work with noinst_LTLIBRARIES
testlib_LTLIBRARIES = libfoo.la libutility.la
testlibdir = $(prefix)/unused
install-testlibLTLIBRARIES: # prevent it from being installed
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 = $(srcdir)/utility.c $(srcdir)/utility.h
libutility_la_CFLAGS = $(GOBJECT_CFLAGS)
libutility_la_LDFLAGS = -module -avoid-version
libutility_la_LIBADD = $(GOBJECT_LIBS)
CLEANFILES = utility.gir Foo.gir
EXTRA_DIST = utility-expected.gir Foo-expected.gir
SCANNER = $(top_srcdir)/tools/g-ir-scanner
utility.gir: libutility.la utility.h $(SCANNER)
@$(SCANNER) -v \
--include=$(top_srcdir)/gir/gobject-2.0.gir \
--library=libutility.la \
--namespace=utility \
--pkg gobject-2.0 \
$(libutility_la_SOURCES) \
--output $@
Foo.gir: libfoo.la foo-object.h $(SCANNER)
@$(SCANNER) -v \
--include=$(top_srcdir)/gir/gobject-2.0.gir \
--include=$(top_builddir)/tests/parser/utility.gir \
--library=libfoo.la \
--namespace=Foo \
--pkg gobject-2.0 \
$(libfoo_la_SOURCES) \
--output $@
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
|