Makefile.am 5.29 KB
Newer Older
Stef Walter's avatar
Stef Walter committed
1 2
NULL =

Alexander Larsson's avatar
Alexander Larsson committed
3
SUBDIRS = \
4
	. \
5
	po
Alexander Larsson's avatar
Alexander Larsson committed
6

7
ACLOCAL_AMFLAGS = -I build/m4 ${ACLOCAL_FLAGS}
8

Stef Walter's avatar
Stef Walter committed
9
DISTCHECK_CONFIGURE_FLAGS = \
10
	--enable-doc \
11 12
	--enable-pam \
	--enable-ssh-agent \
Stef Walter's avatar
Stef Walter committed
13
	--disable-strict \
14
	--disable-coverage \
15
	--disable-silent-rules \
Stef Walter's avatar
Stef Walter committed
16 17 18
	--with-pkcs11-modules=$(abs_srcdir)/$(top_distdir)/_inst/lib \
	--with-pkcs11-config=$(abs_srcdir)/$(top_distdir)/_inst/etc/pkcs11 \
	$(NULL)
19

20
DISTCLEANFILES =
21

22 23 24
CHANGELOG_START = \
	efb922c92fae5929ecc8c702770ebb6c390d38a4

25
dist-hook:
26 27 28 29 30
	@if test -d "$(srcdir)/.git"; \
	then \
		echo Creating ChangeLog && \
		( cd "$(top_srcdir)" && \
		  echo '# Generate automatically. Do not edit.'; echo; \
31
		  git log $(CHANGELOG_START).. --stat --date=short ) > ChangeLog.tmp \
32 33 34 35 36 37
		&& 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
38

39
install-pam:
40
	@echo "WARNING: install-pam is no longer used, use the --with-pam-dir configure option instead"
41

42
if ENABLE_DOC
43
# include docs/Makefile.am
44 45 46 47 48 49 50 51 52 53

distcheck-hook:
	@true

else
distcheck-hook:
	@echo "*** doc must be enabled  (with --enable-doc) in order to make distcheck"
	@false
endif

Stef Walter's avatar
Stef Walter committed
54
upload-release: $(DIST_ARCHIVES)
Stef Walter's avatar
Stef Walter committed
55 56
	scp $(DIST_ARCHIVES) master.gnome.org:
	ssh master.gnome.org ftpadmin install $(DIST_ARCHIVES)
57 58 59 60 61 62 63

asn1-reparse:
	for a in $(ASN1_FILES); do \
		asn1Parser -o $$a.h $a \
		sed -i 's|#include.*|/* \0 */|' $$a.h \
	done

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
# Default executable tests
LOG_DRIVER = $(srcdir)/build/tap-driver
LOG_DRIVER_FLAGS = --format=tap
LOG_COMPILER = $(srcdir)/build/tap-gtester

VALGRIND_ARGS = --trace-children=no --quiet --error-exitcode=33 \
	--suppressions=valgrind-suppressions --gen-suppressions=all \
	--num-callers=16
VALGRIND_SUPPRESSIONS = \
	build/gcr.supp \
	build/gcrypt.supp \
	build/glib.supp \
	build/glibc.supp \
	build/p11-kit.supp \
	build/pthread.supp \
	build/unknown.supp

valgrind-suppressions: $(VALGRIND_SUPPRESSIONS)
	$(AM_V_GEN) cat $^ > $@

check-memory: valgrind-suppressions
	$(MAKE) LOG_FLAGS="-- libtool --mode=execute valgrind $(VALGRIND_ARGS)" \
		$(AM_MAKEFLAGS) check
recheck-memory: valgrind-suppressions
	$(MAKE) LOG_FLAGS="-- libtool --mode=execute valgrind $(VALGRIND_ARGS)" \
		$(AM_MAKEFLAGS) recheck
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 123 124 125 126 127 128 129

coverage:
	mkdir -p $(top_builddir)/build/coverage
	$(LCOV) --directory . --capture --output-file $(top_builddir)/build/coverage.info
	$(GENHTML) --output-directory $(top_builddir)/build/coverage $(top_builddir)/build/coverage.info
	$(LCOV) --directory . --zerocounters
	@echo "file://$(abs_top_builddir)/build/coverage/index.html"

clear-coverage:
	$(LCOV) --directory . --zerocounters

# Set the relevant capabilities on the daemon
if WITH_CAPS
install-caps:
	setcap cap_ipc_lock=ep $(DESTDIR)$(bindir)/gnome-keyring-daemon || true
else
install-caps:
	@true
endif

# Install a link from gnome-keyring > gnome-keyring-@GKR_MAJOR@ to maintain compatibility
install-exec-hook: install-caps
	@test -e "$(DESTDIR)$(bindir)/gnome-keyring" || (cd $(DESTDIR)$(bindir) && $(LN_S) gnome-keyring-@GKR_MAJOR@ gnome-keyring)

V_SED = $(V_SED_$(V))
V_SED_ = $(V_SED_$(AM_DEFAULT_VERBOSITY))
V_SED_0 = @echo "  SED   " $@;

SED_SUBST = sed \
	-e 's,[@]datadir[@],$(datadir),g' \
	-e 's,[@]libexecdir[@],$(libexecdir),g' \
	-e 's,[@]libdir[@],$(libdir),g' \
	-e 's,[@]includedir[@],$(includedir),g' \
	-e 's,[@]datarootdir[@],$(datarootdir),g' \
	-e 's,[@]sysconfdir[@],$(sysconfdir),g' \
	-e 's,[@]bindir[@],$(bindir),g' \
	-e 's,[@]exec_prefix[@],$(exec_prefix),g' \
	-e 's,[@]prefix[@],$(prefix),g' \
	-e 's,[@]abs_srcdir[@],$(abs_srcdir),g' \
	-e 's,[@]srcdir[@],$(srcdir),g' \
130 131
	-e 's,[@]builddir[@],$(builddir),g' \
	-e 's,[@]abs_builddir[@],$(abs_builddir),g' \
132 133 134 135
	-e 's,[@]PACKAGE[@],$(PACKAGE),g' \
	-e 's,[@]VERSION[@],$(VERSION),g' \
	$(NULL)

136
SUFFIXES = .desktop .desktop.in .desktop.in.in .service .service.in
137 138 139 140

.service.in.service:
	$(V_SED) ( $(SED_SUBST) $< > $@.tmp ) && mv $@.tmp $@

141
.desktop.in.desktop:
142 143
	$(V_SED) ( $(SED_SUBST) $< > $@.tmp ) && mv $@.tmp $@

Cosimo Cecchi's avatar
Cosimo Cecchi committed
144
all-local:
145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160
	$(MKDIR_P) $(builddir)/daemon
	$(MKDIR_P) $(builddir)/schema

AM_CPPFLAGS = \
	-DPREFIX=\""$(prefix)"\" \
	-DBINDIR=\""$(bindir)"\" \
	-DLIBEXECDIR=\""$(libexecdir)"\" \
	-DGNOMELOCALEDIR=\""$(datadir)/locale"\" \
	-DSRCDIR="\"@abs_srcdir@\"" \
	-DBUILDDIR="\"@abs_builddir@\"" \
	-I$(top_srcdir) \
	-I$(top_builddir) \
	-I$(top_srcdir)/pkcs11 \
	$(GLIB_CFLAGS)

bin_PROGRAMS =
Cosimo Cecchi's avatar
Cosimo Cecchi committed
161
BUILT_SOURCES =
162
check_PROGRAMS =
163 164 165
noinst_DATA =
noinst_LIBRARIES =
noinst_LTLIBRARIES =
166 167
noinst_PROGRAMS = $(check_PROGRAMS)
TESTS =
168 169 170 171 172 173

ASN1_FILES =

moduledir = $(pkcs11standalonedir)
module_LTLIBRARIES =

174 175 176 177 178
CLEANFILES = \
	$(BUILT_SOURCES) \
	*.gcno \
	*.gcda

179 180 181 182 183 184 185 186
EXTRA_DIST = \
	ChangeLog.old \
	HACKING \
	$(ASN1_FILES) \
	build/tap-driver \
	build/tap-gtester \
	$(VALGRIND_SUPPRESSIONS) \
	$(NULL)
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204

include egg/Makefile.am
include daemon/Makefile.am
include daemon/control/Makefile.am
include daemon/dbus/Makefile.am
include daemon/login/Makefile.am
include daemon/ssh-agent/Makefile.am
include pkcs11/Makefile.am
include pkcs11/gkm/Makefile.am
include pkcs11/gnome2-store/Makefile.am
include pkcs11/rpc-layer/Makefile.am
include pkcs11/secret-store/Makefile.am
include pkcs11/ssh-store/Makefile.am
include pkcs11/wrap-layer/Makefile.am
include pkcs11/xdg-store/Makefile.am
include schema/Makefile.am
include tool/Makefile.am

205 206 207 208
if ENABLE_DOC
include docs/Makefile.am
endif

209
if WITH_PAM
210
include pam/Makefile.am
211
endif