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