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