1 ## Process this file with automake to produce Makefile.in
3 RPCGEN = $(top_builddir)/tools/rpcgen/rpcgen
5 GENFILES_XDR = rquota_xdr.c
8 BUILT_SOURCES = $(GENFILES_H)
10 GENFILES = $(GENFILES_XDR) $(GENFILES_H)
11 man8_MANS = rquotad.man
15 sbin_PROGRAMS = rquotad
17 EXTRA_DIST = rquota.x $(man8_MANS) NEW README.okir
19 rquotad_SOURCES = rquota_server.c rquota_svc.c rquota_xdr.c quotactl.c \
20 hasquota.c mntent.h rquota.h
21 rquotad_LDADD = ../../support/export/libexport.a \
22 ../../support/nfs/libnfs.a \
23 ../../support/misc/libmisc.a \
24 $(LIBBSD) $(LIBWRAP) $(LIBNSL)
25 rquotad_CPPFLAGS = $(AM_CPPFLAGS) $(CPPFLAGS) \
26 -I$(top_srcdir)/support/export
28 MAINTAINERCLEANFILES = Makefile.in
32 make -C $(top_srcdir)/tools/rpcgen all
34 $(GENFILES_XDR): %_xdr.c: %.x $(RPCGEN)
35 test -f $@ && rm -rf $@ || true
39 $(GENFILES_H): %.h: %.x $(RPCGEN)
40 test -f $@ && rm -rf $@ || true
43 #######################################################################
44 # The following allows the current practice of having
45 # daemons renamed during the install to include RPCPREFIX
47 # This could all be done much easier with program_transform_name
48 # ( program_transform_name = s/^/$(RPCPREFIX)$(KPREFIX)/ )
49 # but that also renames the man pages, which the current
50 # practice does not do.
52 (cd $(DESTDIR)$(sbindir) && \
53 for p in $(sbin_PROGRAMS); do \
54 mv -f $$p$(EXEEXT) $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
57 (cd $(DESTDIR)$(sbindir) && \
58 for p in $(sbin_PROGRAMS); do \
59 rm -f $(RPCPREFIX)$(KPREFIX)$$p$(EXEEXT) ;\
63 # XXX This makes some assumptions about what automake does.
64 # XXX But there is no install-man-hook or install-man-local.
65 install-man: install-man8 install-man-links
66 uninstall-man: uninstall-man8 uninstall-man-links
69 (cd $(DESTDIR)$(man8dir) && \
70 for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
71 inst=`echo $$m | sed -e 's/man$$/8/'`; \
72 rm -f $(RPCPREFIX)$$inst ; \
73 $(LN_S) $$inst $(RPCPREFIX)$$inst ; \
77 (cd $(DESTDIR)$(man8dir) && \
78 for m in $(man8_MANS) $(dist_man8_MANS) $(nodist_man8_MANS); do \
79 inst=`echo $$m | sed -e 's/man$$/8/'`; \
80 rm -f $(RPCPREFIX)$$inst ; \