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 statd_SOURCES = callback.c notlist.c log.c misc.c monitor.c \
16 simu.c stat.c statd.c svc_run.c rmtcall.c \
17 sm_inter_clnt.c sm_inter_svc.c sm_inter_xdr.c log.h \
18 notlist.h statd.h system.h version.h sm_inter.h
19 sm_notify_SOURCES = sm-notify.c
21 BUILT_SOURCES = $(GENFILES)
22 statd_LDADD = ../../support/export/libexport.a \
23 ../../support/nfs/libnfs.a \
24 ../../support/misc/libmisc.a \
26 sm_notify_LDADD = $(LIBNSL)
28 EXTRA_DIST = sim_sm_inter.x sm_inter.x $(man8_MANS) COPYRIGHT simulate.c
31 RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen
33 make -C ../../tools/rpcgen all
35 RPCGEN = @RPCGEN_PATH@
38 $(GENFILES_CLNT): %_clnt.c: %.x $(RPCGEN)
39 test -f $@ && rm -rf $@ || true
42 $(GENFILES_SVC): %_svc.c: %.x $(RPCGEN)
43 test -f $@ && rm -rf $@ || true
46 $(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN)
47 test -f $@ && rm -rf $@ || true
50 $(GENFILES_H): %.h: %.x $(RPCGEN)
51 test -f $@ && rm -rf $@ || true
54 MAINTAINERCLEANFILES = Makefile.in
56 CLEANFILES = $(GENFILES)
58 #######################################################################
59 # The following allows the current practice of having
60 # daemons renamed during the install to include RPCPREFIX
62 # This could all be done much easier with program_transform_name
63 # ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ )
64 # but that also renames the man pages, which the current
65 # practice does not do.
67 (cd $(DESTDIR)$(sbindir) && \
68 for p in $(sbin_PROGRAMS); do \
69 [ $$p = sm-notify ] || mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
72 (cd $(DESTDIR)$(sbindir) && \
73 for p in $(sbin_PROGRAMS); do \
74 [ $$p = sm-notify ] || rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
78 # XXX This makes some assumptions about what automake does.
79 # XXX But there is no install-man-hook or install-man-local.
80 install-man: install-man8 install-man-links
81 uninstall-man: uninstall-man8 uninstall-man-links
84 (cd $(DESTDIR)$(man8dir) && \
85 for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
86 inst=`echo $$m | sed -e 's/man$$/8/'`; \
87 rm -f $(RPCPREFIX)$$inst ; \
88 $(LN_S) $$inst $(RPCPREFIX)$$inst ; \
92 (cd $(DESTDIR)$(man8dir) && \
93 for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
94 inst=`echo $$m | sed -e 's/man$$/8/'`; \
95 rm -f $(RPCPREFIX)$$inst ; \