summaryrefslogtreecommitdiff
path: root/Makefile.am
blob: b6d3fb8e3995ff75654669776224c8a67b540bd4 (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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122

NULL =
WEBHOST = anarchy.freedesktop.org
WEBBASE = /srv/p11-glue.freedesktop.org/www

AM_CPPFLAGS = \
	-I$(top_srcdir) \
	-I$(top_srcdir)/common \
	-DBINDIR=\"$(bindir)\" \
	-DBUILDDIR=\"$(abs_builddir)\" \
	-DDATA_DIR=\"$(datadir)\" \
	-DPRIVATEDIR=\"$(privatedir)\" \
	-DSRCDIR=\"$(abs_srcdir)\" \
	-DSYSCONFDIR=\"$(sysconfdir)\" \
	-DP11_KIT_FUTURE_UNSTABLE_API

bin_PROGRAMS =
private_PROGRAMS =
check_PROGRAMS = $(c_tests)
check_SCRIPTS = $(sh_tests)
check_LTLIBRARIES =

BUILT_SOURCES =

CLEANFILES =

EXTRA_DIST = HACKING

incdir = $(includedir)/p11-kit-1/p11-kit
inc_HEADERS =

lib_LTLIBRARIES =

noinst_LTLIBRARIES =
noinst_PROGRAMS =
noinst_SCRIPTS =

c_tests =
sh_tests =
TESTS = $(c_tests) $(sh_tests)

moduledir = $(p11_module_path)
module_LTLIBRARIES =

include common/Makefile.am
include p11-kit/Makefile.am

if WITH_TRUST_MODULE
include trust/Makefile.am
endif

SUBDIRS = . doc po

ACLOCAL_AMFLAGS = -I build/m4

DISTCHECK_CONFIGURE_FLAGS = \
	--enable-doc \
	--disable-coverage \
	--enable-strict \
	CFLAGS='-O2'

AM_TESTS_ENVIRONMENT = \
	abs_top_builddir="$(abs_top_builddir)"; \
	export abs_top_builddir;
AM_TESTS_FD_REDIRECT = 9>&2;

MEMCHECK_ENV = $(TEST_RUNNER) valgrind --error-exitcode=80 --quiet

LEAKCHECK_ENV = $(TEST_RUNNER) valgrind --error-exitcode=81 --quiet --leak-check=yes

HELLCHECK_ENV = $(TEST_RUNNER) valgrind --error-exitcode=82 --quiet --tool=helgrind

memcheck: all
	make $(AM_MAKEFLAGS) TESTS_ENVIRONMENT="$(MEMCHECK_ENV)" check-TESTS

leakcheck: all
	make $(AM_MAKEFLAGS) TESTS_ENVIRONMENT="$(LEAKCHECK_ENV)" check-TESTS

hellcheck: all
	make $(AM_MAKEFLAGS) TESTS_ENVIRONMENT="$(HELLCHECK_ENV)" check-TESTS

dist-hook:
	@if test -d "$(srcdir)/.git"; \
	then \
		echo Creating ChangeLog && \
		( cd "$(top_srcdir)" && \
		  echo '# Generate automatically. Do not edit.'; echo; \
		  $(top_srcdir)/missing --run git log --stat --date=short ) > ChangeLog.tmp \
		&& mv -f ChangeLog.tmp $(top_distdir)/ChangeLog \
		|| ( rm -f ChangeLog.tmp ; \
		     echo Failed to generate ChangeLog >&2 ); \
	else \
		echo A git clone is required to generate a ChangeLog >&2; \
	fi

if WITH_COVERAGE
coverage:
	mkdir -p build/coverage
	$(LCOV) --directory . --zerocounters
	$(MAKE) check
	$(LCOV) --directory . --capture --output-file build/coverage.info
	$(GENHTML) --output-directory build/coverage \
		--title "p11-kit $(PACKAGE_VERSION)" \
		build/coverage.info
	@echo "file://$(abs_top_builddir)/build/coverage/index.html"

upload-coverage: coverage
	rsync -Hvax build/coverage/./ $(WEBHOST):$(WEBBASE)/build/coverage/./
endif

if ENABLE_GTK_DOC
upload-doc: all
	rsync -Hvax --exclude doc --exclude build \
		doc/manual/html/./ $(WEBHOST):$(WEBBASE)/doc/p11-kit/./
endif

upload-release: $(DIST_ARCHIVES)
	gpg --detach-sign --local-user 'stef@thewalter.net' $<
	scp $< $<.sig $(WEBHOST):$(WEBBASE)/releases/

transifex:
	cd $(srcdir) && sh build/tx-update