Makefile.am 2.45 KB
Newer Older
1
ACLOCAL_AMFLAGS = -I m4
Jürg Billeter's avatar
Jürg Billeter committed
2 3
NULL =

4 5 6 7 8 9 10
if ENABLE_VAPIGEN
VAPIGEN_SUBDIRS = \
	gobject-introspection \
	vapigen \
	$(NULL)
endif

Jürg Billeter's avatar
Jürg Billeter committed
11
SUBDIRS = \
12
	gee \
13 14
	ccode \
	vala \
15
	codegen \
16 17
	compiler \
	vapi \
18
	tests \
19
	doc \
Jürg Billeter's avatar
Jürg Billeter committed
20
	$(VAPIGEN_SUBDIRS) \
21 22 23
	$(NULL)

DIST_SUBDIRS = \
24
	gee \
25 26
	ccode \
	vala \
27
	codegen \
28 29 30 31 32 33
	compiler \
	vapi \
	tests \
	doc \
	gobject-introspection \
	vapigen \
Jürg Billeter's avatar
Jürg Billeter committed
34
	$(NULL)
35

36 37 38
aclocaldir = $(datadir)/aclocal
dist_aclocal_DATA = vala.m4

39
pkgconfigdir = $(libdir)/pkgconfig
40 41 42 43
pkgconfig_DATA = vala@PACKAGE_SUFFIX@.pc

vala@PACKAGE_SUFFIX@.pc: vala.pc
	cp $< $@
44

45 46 47
.PHONY: bootstrap
bootstrap: all
	find $(top_srcdir) -name "*.vala.stamp" | xargs rm -f
48
	$(MAKE) $(AM_MAKEFLAGS) all VALAC=$(abs_top_builddir)/compiler/valac V=$V
49

50 51 52 53
.PHONY: test
test:
	cd tests && $(MAKE) $(AM_MAKEFLAGS) check

54 55 56 57 58 59 60 61 62 63
#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"
64
	rm -rf $(top_builddir)/coverage
65 66 67 68
	$(mkdir_p) $(top_builddir)/coverage
	genhtml --title "@PACKAGE_STRING@" --output-directory $(top_builddir)/coverage $(top_builddir)/lcov.info
#endif

69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84
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
85
dist-hook: gen-ChangeLog
86
	echo $(VERSION) > $(distdir)/.tarball-version
87 88 89 90 91

gen_start_date = 2009-02-25
.PHONY: gen-ChangeLog
gen-ChangeLog:
	if test -d .git; then						\
92
	  $(top_srcdir)/build-aux/gitlog-to-changelog			\
93 94 95 96 97
	    --since=$(gen_start_date) > $(distdir)/cl-t;		\
	  rm -f $(distdir)/ChangeLog;					\
	  mv $(distdir)/cl-t $(distdir)/ChangeLog;			\
	fi

98 99 100 101
CLEANFILES = \
	vala@PACKAGE_SUFFIX@.pc
	$(NULL)

102
EXTRA_DIST = \
Jürg Billeter's avatar
Jürg Billeter committed
103
	ChangeLog.pre-0-4 \
104
	ChangeLog.pre-0-5-7 \
105
	MAINTAINERS \
106
	vala.pc.in \
107 108
	.version \
	build-aux/git-version-gen \
109
	build-aux/gitlog-to-changelog \
110
	$(NULL)
111

112
DISTCLEANFILES = version.h