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