1 ## Process this file with automake to produce Makefile.in
3 man8_MANS = statd.man sm-notify.man
5 GENFILES_CLNT = sm_inter_clnt.c
6 GENFILES_SVC = sm_inter_svc.c
7 GENFILES_XDR = sm_inter_xdr.c
8 GENFILES_H = sm_inter.h
10 GENFILES = $(GENFILES_CLNT) $(GENFILES_SVC) $(GENFILES_XDR) $(GENFILES_H)
14 sbin_PROGRAMS = statd sm-notify
15 dist_sbin_SCRIPTS = start-statd
16 statd_SOURCES = callback.c notlist.c log.c misc.c monitor.c \
17 simu.c stat.c statd.c svc_run.c rmtcall.c \
18 sm_inter_clnt.c sm_inter_svc.c sm_inter_xdr.c log.h \
19 notlist.h statd.h system.h version.h sm_inter.h
20 sm_notify_SOURCES = sm-notify.c
22 BUILT_SOURCES = $(GENFILES)
23 statd_LDADD = ../../support/export/libexport.a \
24 ../../support/nfs/libnfs.a \
25 ../../support/misc/libmisc.a \
27 sm_notify_LDADD = $(LIBNSL)
29 EXTRA_DIST = sim_sm_inter.x sm_inter.x $(man8_MANS) COPYRIGHT simulate.c
32 RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen
34 make -C ../../tools/rpcgen all
36 RPCGEN = @RPCGEN_PATH@
39 $(GENFILES_CLNT): %_clnt.c: %.x $(RPCGEN)
40 test -f $@ && rm -rf $@ || true
43 $(GENFILES_SVC): %_svc.c: %.x $(RPCGEN)
44 test -f $@ && rm -rf $@ || true
47 $(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN)
48 test -f $@ && rm -rf $@ || true
51 $(GENFILES_H): %.h: %.x $(RPCGEN)
52 test -f $@ && rm -rf $@ || true
55 MAINTAINERCLEANFILES = Makefile.in
57 CLEANFILES = $(GENFILES)
59 #######################################################################
60 # The following allows the current practice of having
61 # daemons renamed during the install to include RPCPREFIX
63 # This could all be done much easier with program_transform_name
64 # ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ )
65 # but that also renames the man pages, which the current
66 # practice does not do.
68 (cd $(DESTDIR)$(sbindir) && \
69 for p in $(sbin_PROGRAMS); do \
70 [ $$p = sm-notify ] || mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
73 (cd $(DESTDIR)$(sbindir) && \
74 for p in $(sbin_PROGRAMS); do \
75 [ $$p = sm-notify ] || rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
79 # XXX This makes some assumptions about what automake does.
80 # XXX But there is no install-man-hook or install-man-local.
81 install-man: install-man8 install-man-links
82 uninstall-man: uninstall-man8 uninstall-man-links
85 (cd $(DESTDIR)$(man8dir) && \
86 for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
87 inst=`echo $$m | sed -e 's/man$$/8/'`; \
88 rm -f $(RPCPREFIX)$$inst ; \
89 $(LN_S) $$inst $(RPCPREFIX)$$inst ; \
93 (cd $(DESTDIR)$(man8dir) && \
94 for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
95 inst=`echo $$m | sed -e 's/man$$/8/'`; \
96 rm -f $(RPCPREFIX)$$inst ; \