7888 installboot: print version info of the file
[unleashed.git] / include / rpcsvc / Makefile
blob92d3a3768b2c8d5058ec3287d18d5f8f1d65d14a
1 INCDIR= /usr/include/rpcsvc
2 INCS= bootparam.h \
3 daemon_utils.h \
4 dbm.h \
5 nis_db.h \
6 nislib.h \
7 svc_dg_priv.h \
8 yp_prot.h \
9 ypclnt.h \
10 yppasswd.h \
11 ypupd.h \
12 rpc_sztypes.h \
13 ../rpc/rpc_sztypes.x
15 # CAUTION: The rpc_sztypes.h above is *NOT* generated from the rpc_sztypes.x
16 # above. It's terrible really, there are three files that should get
17 # installed:
19 # /usr/include/rpc/rpc_sztypes.h - rpcgen'd from include/rpc/rpc_sztypes.x
20 # /usr/include/rpcsvc/rpc_sztypes.h - copy of include/rpcsvc/rpc_sztypes.h
21 # /usr/include/rpcsvc/rpc_sztypes.x - copy of include/rpc/rpc_sztypes.x
23 # Sadly, this is so convoluted that we also end up with:
25 # /usr/include/rpc/rpc_sztypes.x - copy of include/rpc/rpc_sztypes.x
27 # And we have to ignore it in packaging.
29 # the .x files
30 INCS+= bootparam_prot.x \
31 mount.x \
32 nfs4_prot.x \
33 nfs_acl.x \
34 nfs_prot.x \
35 nis.x \
36 nis_object.x \
37 rex.x \
38 rquota.x \
39 rstat.x \
40 rusers.x \
41 rwall.x \
42 spray.x \
43 ufs_prot.x \
44 yp.x \
45 autofs_prot.x
47 # headers generated from .x files
48 GENERATED_INCS= \
49 bootparam_prot.h \
50 mount.h \
51 nfs_prot.h \
52 nfs4_prot.h \
53 nis.h \
54 rex.h \
55 rquota.h \
56 rstat.h \
57 rusers.h \
58 rwall.h \
59 spray.h \
60 ufs_prot.h \
61 nfs_acl.h \
62 autofs_prot.h
64 INCS+= ${GENERATED_INCS}
65 CLEANFILES+= ${GENERATED_INCS}
67 RPCGEN?= /usr/bin/rpcgen
68 SED?= /usr/bin/sed
70 RPCGENFLAGS = -C -h
72 # rpcsvc rpcgen source (.x files)
74 # yp.x is an attempt at codifying what was hand coded in RPCL.
75 # Unfortunately it doesn't quite work. (The handcoded stuff isn't
76 # expressable in RPCL) this is due to the fact that YP was written
77 # before rpcgen existed. Hence, yp_prot.h cannot be derived from yp.x
79 # There is no `.h' for nis_object.x because it is included by nis.x and
80 # the resulting .h is nis.h.
82 .PHONY: all
84 all: ${GENERATED_INCS}
86 .SUFFIXES: .x
88 .x.h:
89 ${RPCGEN} $(RPCGENFLAGS) $< -o $@
91 nis.h: nis.x
92 $(RPCGEN) $(RPCGENFLAGS) nis.x |\
93 $(SED) -e '/EDIT_START/,$$ d' > $@
95 rwall.h: rwall.x
96 $(RPCGEN) $(RPCGENFLAGS) -M rwall.x -o $@
98 .include <prog.mk>
99 .include <inc.mk>