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