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