Makefile.am 5.44 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 \
Stef Walter's avatar
Stef Walter committed
11
	--disable-strict \
12
	--disable-coverage \
Stef Walter's avatar
Stef Walter committed
13
	--disable-update-mime \
14
	--disable-silent-rules \
Stef Walter's avatar
Stef Walter committed
15 16 17
	--with-pkcs11-modules=$(abs_srcdir)/$(top_distdir)/_inst/lib \
	--with-pkcs11-config=$(abs_srcdir)/$(top_distdir)/_inst/etc/pkcs11 \
	$(NULL)
18

19 20 21 22
DISTCLEANFILES = \
	intltool-extract \
	intltool-merge \
	intltool-update
23

24 25 26
CHANGELOG_START = \
	efb922c92fae5929ecc8c702770ebb6c390d38a4

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

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

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

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
56
upload-release: $(DIST_ARCHIVES)
Stef Walter's avatar
Stef Walter committed
57 58
	scp $(DIST_ARCHIVES) master.gnome.org:
	ssh master.gnome.org ftpadmin install $(DIST_ARCHIVES)
59 60 61 62 63 64 65

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

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
# 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
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 130 131

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' \
132 133
	-e 's,[@]builddir[@],$(builddir),g' \
	-e 's,[@]abs_builddir[@],$(abs_builddir),g' \
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164
	-e 's,[@]PACKAGE[@],$(PACKAGE),g' \
	-e 's,[@]VERSION[@],$(VERSION),g' \
	$(NULL)

SUFFIXES = .desktop.in .desktop.in.in .service .service.in

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

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

@INTLTOOL_DESKTOP_RULE@

prep-builddir:
	$(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 =
165
check_PROGRAMS =
166 167 168
noinst_DATA =
noinst_LIBRARIES =
noinst_LTLIBRARIES =
169 170
noinst_PROGRAMS = $(check_PROGRAMS)
TESTS =
171 172 173 174 175 176 177

ASN1_FILES =
BUILT_SOURCES = prep-builddir

moduledir = $(pkcs11standalonedir)
module_LTLIBRARIES =

178 179 180 181 182
CLEANFILES = \
	$(BUILT_SOURCES) \
	*.gcno \
	*.gcda

183 184 185 186 187 188 189 190 191 192 193
EXTRA_DIST = \
	intltool-extract.in \
	intltool-merge.in \
	intltool-update.in \
	ChangeLog.old \
	HACKING \
	$(ASN1_FILES) \
	build/tap-driver \
	build/tap-gtester \
	$(VALGRIND_SUPPRESSIONS) \
	$(NULL)
194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215

include egg/Makefile.am
include daemon/Makefile.am
include daemon/control/Makefile.am
include daemon/dbus/Makefile.am
include daemon/gpg-agent/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

#ifdef WITH_PAM
include pam/Makefile.am
#endif