tests: Add "template" parser test to increase coverage
[vala-gnome.git] / Makefile.am
blobe5dc0cc971580c2b0de1770f0b8c575dca6d422e
1 ACLOCAL_AMFLAGS = --install -I m4 ${ACLOCAL_FLAGS}
3 NULL =
5 SUBDIRS = \
6         gee \
7         vala \
8         ccode \
9         codegen \
10         compiler \
11         vapi \
12         tests \
13         doc \
14         gobject-introspection \
15         vapigen \
16         libvaladoc \
17         valadoc \
18         $(NULL)
20 if ENABLE_UNVERSIONED
21 aclocaldir = $(datadir)/aclocal
22 aclocal_DATA = vala.m4
23 endif
25 pkgconfigdir = $(libdir)/pkgconfig
26 pkgconfig_DATA = libvala@PACKAGE_SUFFIX@.pc
28 libvala@PACKAGE_SUFFIX@.pc: libvala.pc
29         cp $< $@
31 .PHONY: bootstrap
32 bootstrap: all
33         find $(top_srcdir) -name "*.vala.stamp" | xargs rm -f
34         $(MAKE) $(AM_MAKEFLAGS) all VALAC=$(abs_top_builddir)/compiler/valac$(EXEEXT) V=$V
36 .PHONY: test
37 test:
38         cd tests && $(MAKE) $(AM_MAKEFLAGS) check
40 #if ENABLE_COVERAGE
41 .PHONY: coverage coverage-report
42 coverage:
43         find $(top_srcdir) -name "*.gcda" | xargs rm -f
44         $(MAKE) $(AM_MAKEFLAGS) bootstrap
45         $(MAKE) $(AM_MAKEFLAGS) test
47 coverage-report: coverage
48         lcov --directory $(top_srcdir) --capture --output-file $(top_builddir)/lcov.info
49         lcov --directory $(top_srcdir) --output-file $(top_builddir)/lcov.info --remove $(top_builddir)/lcov.info "*.c" "*.h" "*.vapi"
50         rm -rf $(top_builddir)/coverage
51         $(mkdir_p) $(top_builddir)/coverage
52         genhtml --title "@PACKAGE_STRING@" --output-directory $(top_builddir)/coverage $(top_builddir)/lcov.info
53 #endif
55 all: version.h
57 version.h: $(top_srcdir)/.version
58         echo '#define BUILD_VERSION "'`cat $(top_srcdir)/.version`'"' > $@-t && mv $@-t $@
60 BUILT_SOURCES = $(top_srcdir)/.version
61 $(top_srcdir)/.version: gen-version
62         @true
63 .PHONY: gen-version
64 gen-version:
65         @V=`$(top_srcdir)/build-aux/git-version-gen $(top_srcdir)/.tarball-version` &&                  \
66         if [ -e $(top_srcdir)/.version ] && [ "x`cat $(top_srcdir)/.version`" = "x$$V" ]; then          \
67           true;                                                                                         \
68         else                                                                                            \
69           echo "$$V" > $(top_srcdir)/.version;                                                          \
70         fi
71 dist-hook: gen-ChangeLog
72         echo $(VERSION) > $(distdir)/.tarball-version
74 gen_start_date = 2009-02-25
75 .PHONY: gen-ChangeLog
76 gen-ChangeLog:
77         if test -d .git; then                                           \
78           $(top_srcdir)/build-aux/gitlog-to-changelog                   \
79             --since=$(gen_start_date) > $(distdir)/cl-t;                \
80           rm -f $(distdir)/ChangeLog;                                   \
81           mv $(distdir)/cl-t $(distdir)/ChangeLog;                      \
82         fi
84 CLEANFILES = \
85         libvala@PACKAGE_SUFFIX@.pc \
86         $(NULL)
88 EXTRA_DIST = \
89         ChangeLog.pre-0-4 \
90         ChangeLog.pre-0-5-7 \
91         libvala.pc.in \
92         vala.m4 \
93         .version \
94         build-aux/git-version-gen \
95         build-aux/gitlog-to-changelog \
96         $(NULL)
98 DISTCLEANFILES = version.h