]> git.decadent.org.uk Git - nfs-utils.git/blob - utils/idmapd/Makefile.am
Merge branch 'sid'
[nfs-utils.git] / utils / idmapd / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2
3 man8_MANS       = idmapd.man
4
5 RPCPREFIX       = rpc.
6 KPREFIX         = @kprefix@
7 sbin_PROGRAMS   = idmapd
8
9 EXTRA_DIST = \
10         $(man8_MANS) \
11         idmapd.conf
12
13 idmapd_SOURCES = \
14         idmapd.c \
15         \
16         nfs_idmap.h \
17         queue.h
18
19 idmapd_LDADD = $(LIBEVENT) $(LIBNFSIDMAP) ../../support/nfs/libnfs.a
20
21 MAINTAINERCLEANFILES = Makefile.in
22
23 #######################################################################
24 # The following allows the current practice of having
25 # daemons renamed during the install to include RPCPREFIX
26 # and the KPREFIX
27 # This could all be done much easier with program_transform_name
28 # ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ )
29 # but that also renames the man pages, which the current
30 # practice does not do.
31 install-exec-hook:
32         (cd $(DESTDIR)$(sbindir) && \
33           for p in $(sbin_PROGRAMS); do \
34             mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
35           done)
36 uninstall-hook:
37         (cd $(DESTDIR)$(sbindir) && \
38           for p in $(sbin_PROGRAMS); do \
39             rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
40           done)
41
42
43 # XXX This makes some assumptions about what automake does.
44 # XXX But there is no install-man-hook or install-man-local.
45 install-man: install-man8 install-man-links
46 uninstall-man: uninstall-man8 uninstall-man-links
47
48 install-man-links:
49         (cd $(DESTDIR)$(man8dir) && \
50           for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
51             inst=`echo $$m | sed -e 's/man$$/8/'`; \
52             rm -f $(RPCPREFIX)$$inst ; \
53             $(LN_S) $$inst $(RPCPREFIX)$$inst ; \
54           done)
55
56 uninstall-man-links:
57         (cd $(DESTDIR)$(man8dir) && \
58           for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
59             inst=`echo $$m | sed -e 's/man$$/8/'`; \
60             rm -f $(RPCPREFIX)$$inst ; \
61           done)
62