Use AM_V_GEN more a more quiet build
[gnome.gobject-introspection] / tests / offsets / Makefile.am
1 include $(top_srcdir)/common.mk
2 include $(top_srcdir)/Makefile.introspection
3
4 BUILT_SOURCES =
5 CLEANFILES =
6 EXTRA_DIST =
7 INTROSPECTION_GIRS =
8
9 check_LTLIBRARIES =
10 check_PROGRAMS =
11
12 ############################################################
13
14 check_LTLIBRARIES += liboffsets.la
15
16 liboffsets_la_SOURCES = \
17         offsets.h       \
18         offsets.c
19 liboffsets_la_CPPFLAGS = $(GIREPO_CFLAGS)
20 # dummy rpath to get built dynamically (huh?)
21 liboffsets_la_LDFLAGS = -avoid-version -rpath $(libdir)
22
23 offsets-1.0.gir: liboffsets.la offsets.h
24 offsets_1_0_gir_INCLUDES = GObject-2.0
25 offsets_1_0_gir_LIBS = liboffsets.la
26 offsets_1_0_gir_PACKAGES = gobject-2.0
27 offsets_1_0_gir_FILES = $(srcdir)/offsets.h $(srcdir)/offsets.c
28 INTROSPECTION_GIRS += offsets-1.0.gir
29
30 CLEANFILES += offsets-1.0.gir offsets-1.0.typelib
31
32 ############################################################
33
34 check_PROGRAMS += gitestoffsets
35
36 nodist_gitestoffsets_SOURCES = gitestoffsets.c
37 gitestoffsets_CPPFLAGS = $(GIREPO_CFLAGS) -I$(top_srcdir)/girepository
38 gitestoffsets_LDADD = $(top_builddir)/girepository/libgirepository-1.0.la $(GIREPO_LIBS)
39
40 gitestoffsets.c: gen-gitestoffsets offsets.h
41         $(AM_V_GEN) $(PYTHON) $(srcdir)/gen-gitestoffsets $(srcdir)/offsets.h > $@ || ( rm -f $@ && false )
42
43 EXTRA_DIST += gen-gitestoffsets
44 BUILT_SOURCES += gitestoffsets.c
45 CLEANFILES += gitestoffsets.c
46
47 ############################################################
48
49 check-local: offsets-1.0.typelib
50         GI_TYPELIB_PATH=:$(top_builddir)/gir ./gitestoffsets$(EXEEXT) offsets.compiled offsets.introspected
51         diff -u offsets.compiled offsets.introspected
52
53 CLEANFILES += offsets.compiled offsets.introspected