]> git.decadent.org.uk Git - nfs-utils.git/blob - utils/idmapd/Makefile.am
Allow nfssvc_setfds to properly deal with AF_INET6.
[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         strlcat.c \
20         strlcpy.c \
21         \
22         cfg.h \
23         nfs_idmap.h \
24         queue.h
25
26 idmapd_LDADD = -levent -lnfsidmap ../../support/nfs/libnfs.a
27
28 MAINTAINERCLEANFILES = Makefile.in
29
30 #######################################################################
31 # The following allows the current practice of having
32 # daemons renamed during the install to include RPCPREFIX
33 # and the KPREFIX
34 # This could all be done much easier with program_transform_name
35 # ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ )
36 # but that also renames the man pages, which the current
37 # practice does not do.
38 install-exec-hook:
39         (cd $(DESTDIR)$(sbindir) && \
40           for p in $(sbin_PROGRAMS); do \
41             mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
42           done)
43 uninstall-hook:
44         (cd $(DESTDIR)$(sbindir) && \
45           for p in $(sbin_PROGRAMS); do \
46             rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
47           done)
48
49
50 # XXX This makes some assumptions about what automake does.
51 # XXX But there is no install-man-hook or install-man-local.
52 install-man: install-man5 install-man8 install-man-links
53 uninstall-man: uninstall-man5 uninstall-man8 uninstall-man-links
54
55 install-man-links:
56         (cd $(DESTDIR)$(man8dir) && \
57           for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
58             inst=`echo $$m | sed -e 's/man$$/8/'`; \
59             rm -f $(RPCPREFIX)$$inst ; \
60             $(LN_S) $$inst $(RPCPREFIX)$$inst ; \
61           done)
62
63 uninstall-man-links:
64         (cd $(DESTDIR)$(man8dir) && \
65           for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
66             inst=`echo $$m | sed -e 's/man$$/8/'`; \
67             rm -f $(RPCPREFIX)$$inst ; \
68           done)
69