Makefile.am 2.34 KB
Newer Older
1 2
ACLOCAL_AMFLAGS = --install -I m4 ${ACLOCAL_FLAGS}

Jürg Billeter's avatar
Jürg Billeter committed
3 4 5
NULL =

SUBDIRS = \
6
	gee \
7
	vala \
8
	ccode \
9
	codegen \
10 11 12 13 14 15
	compiler \
	vapi \
	tests \
	doc \
	gobject-introspection \
	vapigen \
Rico Tzschichholz's avatar
Rico Tzschichholz committed
16 17
	libvaladoc \
	valadoc \
Jürg Billeter's avatar
Jürg Billeter committed
18
	$(NULL)
19

20
if ENABLE_UNVERSIONED
21
aclocaldir = $(datadir)/aclocal
22 23
aclocal_DATA = vala.m4
endif
24

25
pkgconfigdir = $(libdir)/pkgconfig
26
pkgconfig_DATA = libvala@PACKAGE_SUFFIX@.pc
27

28
libvala@PACKAGE_SUFFIX@.pc: libvala.pc
29
	cp $< $@
30

31 32 33
.PHONY: bootstrap
bootstrap: all
	find $(top_srcdir) -name "*.vala.stamp" | xargs rm -f
Arnel A. Borja's avatar
Arnel A. Borja committed
34
	$(MAKE) $(AM_MAKEFLAGS) all VALAC=$(abs_top_builddir)/compiler/valac$(EXEEXT) V=$V
35

36 37 38 39
.PHONY: test
test:
	cd tests && $(MAKE) $(AM_MAKEFLAGS) check

40 41 42 43 44 45 46 47 48 49
#if ENABLE_COVERAGE
.PHONY: coverage coverage-report
coverage:
	find $(top_srcdir) -name "*.gcda" | xargs rm -f
	$(MAKE) $(AM_MAKEFLAGS) bootstrap
	$(MAKE) $(AM_MAKEFLAGS) test

coverage-report: coverage
	lcov --directory $(top_srcdir) --capture --output-file $(top_builddir)/lcov.info
	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 52 53 54
	$(mkdir_p) $(top_builddir)/coverage
	genhtml --title "@PACKAGE_STRING@" --output-directory $(top_builddir)/coverage $(top_builddir)/lcov.info
#endif

55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
all: version.h

version.h: $(top_srcdir)/.version
	echo '#define BUILD_VERSION "'`cat $(top_srcdir)/.version`'"' > $@-t && mv $@-t $@

BUILT_SOURCES = $(top_srcdir)/.version
$(top_srcdir)/.version: gen-version
	@true
.PHONY: gen-version
gen-version:
	@V=`$(top_srcdir)/build-aux/git-version-gen $(top_srcdir)/.tarball-version` &&			\
	if [ -e $(top_srcdir)/.version ] && [ "x`cat $(top_srcdir)/.version`" = "x$$V" ]; then		\
	  true;												\
	else												\
	  echo "$$V" > $(top_srcdir)/.version;								\
	fi
71
dist-hook: gen-ChangeLog
72
	echo $(VERSION) > $(distdir)/.tarball-version
73 74 75 76 77

gen_start_date = 2009-02-25
.PHONY: gen-ChangeLog
gen-ChangeLog:
	if test -d .git; then						\
78
	  $(top_srcdir)/build-aux/gitlog-to-changelog			\
79 80 81 82 83
	    --since=$(gen_start_date) > $(distdir)/cl-t;		\
	  rm -f $(distdir)/ChangeLog;					\
	  mv $(distdir)/cl-t $(distdir)/ChangeLog;			\
	fi

84
CLEANFILES = \
85
	libvala@PACKAGE_SUFFIX@.pc \
86 87
	$(NULL)

88
EXTRA_DIST = \
Jürg Billeter's avatar
Jürg Billeter committed
89
	ChangeLog.pre-0-4 \
90
	ChangeLog.pre-0-5-7 \
Jürg Billeter's avatar
Jürg Billeter committed
91
	libvala.pc.in \
92
	vala.m4 \
93 94
	.version \
	build-aux/git-version-gen \
95
	build-aux/gitlog-to-changelog \
96
	$(NULL)
97

98
DISTCLEANFILES = version.h