1## Process this file with automake to produce Makefile.in
2
3localedir = $(datadir)/locale
4AM_CPPFLAGS = \
5	-DADMINDIR=\"$(admindir)\" \
6	-DLOCALEDIR=\"$(localedir)\" \
7	-DLOGDIR=\"$(logdir)\" \
8	-DSYSCONFDIR=\"$(sysconfdir)\" \
9	-idirafter $(top_srcdir)/lib/compat \
10	-I$(top_builddir) \
11	-I$(top_srcdir)/lib
12
13CLEANFILES = \
14	org.dpkg.pkexec.update-alternatives.policy \
15	$(nil)
16
17EXTRA_DIST = \
18	README.alternatives \
19	update-alternatives.polkit.in \
20	$(test_scripts) \
21	$(nil)
22
23pkexecdir = $(datadir)/polkit-1/actions
24pkexec_DATA =
25
26bin_PROGRAMS =
27
28if BUILD_UPDATE_ALTERNATIVES
29pkexec_DATA += org.dpkg.pkexec.update-alternatives.policy
30bin_PROGRAMS += update-alternatives
31endif
32
33do_polkit_subst = $(SED) \
34	-e 's,[@]bindir[@],$(bindir),g' \
35	$(nil)
36
37org.dpkg.pkexec.update-alternatives.policy: update-alternatives.polkit.in Makefile
38	@test -d `dirname $@` || $(MKDIR_P) `dirname $@`
39	$(AM_V_GEN) GETTEXTDATADIR="$(top_srcdir)/po" \
40	  $(MSGFMT) --xml --template $< -d $(top_srcdir)/po -o - \
41	  | $(do_polkit_subst) >$@
42
43update_alternatives_SOURCES = \
44	update-alternatives.c
45
46update_alternatives_CPPFLAGS = \
47	-DALT_TMP_EXT=\".dpkg-tmp\" \
48	-DADMINDIR_ENVVAR=\"DPKG_ADMINDIR\" \
49	$(AM_CPPFLAGS)
50
51update_alternatives_LDADD = \
52	../lib/compat/libcompat.la \
53	$(LIBINTL) \
54	$(nil)
55
56sbin_PROGRAMS =
57
58if BUILD_START_STOP_DAEMON
59sbin_PROGRAMS += start-stop-daemon
60
61start_stop_daemon_SOURCES = \
62	start-stop-daemon.c
63
64start_stop_daemon_LDADD = \
65	../lib/compat/libcompat.la \
66	$(PS_LIBS) \
67	$(KVM_LIBS) \
68	$(nil)
69endif
70
71install-data-local:
72if BUILD_UPDATE_ALTERNATIVES
73	$(MKDIR_P) $(DESTDIR)$(sysconfdir)/alternatives
74	$(MKDIR_P) $(DESTDIR)$(admindir)/alternatives
75	$(INSTALL_DATA) $(srcdir)/README.alternatives $(DESTDIR)$(sysconfdir)/alternatives/README
76endif
77
78uninstall-local:
79	rm -f $(DESTDIR)$(sysconfdir)/alternatives/README
80
81TEST_ENV_VARS = DPKG_DATADIR=$(top_srcdir)/data
82
83test_tmpdir = t.tmp
84test_scripts = \
85	t/update_alternatives.t
86
87include $(top_srcdir)/check.am
88
89clean-local: check-clean
90