From 5e0a19bdeee80766c9e20ab1f85487fbeaf64894 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Tue, 7 Feb 2012 09:27:07 +0000 Subject: [PATCH] Consistently set RPCGEN_CPP when running rpcgen, so the C preprocessor set via ${CPP} is used, instead of always using hardcoded /usr/bin/cpp. MFC after: 1 week --- include/rpc/Makefile | 2 +- include/rpcsvc/Makefile | 2 +- lib/libc/rpc/Makefile.inc | 2 +- lib/libc/yp/Makefile.inc | 2 +- lib/librpcsvc/Makefile | 2 +- lib/libypclnt/Makefile | 2 +- libexec/ypxfr/Makefile | 2 +- release/picobsd/tinyware/passwd/Makefile | 2 +- sys/conf/files | 6 +++--- sys/modules/kgssapi/Makefile | 6 +++--- sys/modules/kgssapi_krb5/Makefile | 2 +- usr.sbin/amd/Makefile.inc | 2 +- usr.sbin/bootparamd/bootparamd/Makefile | 6 +++--- usr.sbin/bootparamd/callbootd/Makefile | 6 +++--- usr.sbin/gssd/Makefile | 2 +- usr.sbin/keyserv/Makefile | 2 +- usr.sbin/rpc.lockd/Makefile | 2 +- usr.sbin/rpc.statd/Makefile | 2 +- usr.sbin/rpc.yppasswdd/Makefile | 2 +- usr.sbin/rpc.ypupdated/Makefile | 2 +- usr.sbin/rpc.ypxfrd/Makefile | 2 +- usr.sbin/yppush/Makefile | 2 +- usr.sbin/ypserv/Makefile | 2 +- 23 files changed, 31 insertions(+), 31 deletions(-) diff --git a/include/rpc/Makefile b/include/rpc/Makefile index 40d4c47b3a07..cf17ca2d4d62 100644 --- a/include/rpc/Makefile +++ b/include/rpc/Makefile @@ -3,7 +3,7 @@ .SUFFIXES: .x -RPCCOM = rpcgen -C +RPCCOM= RPCGEN_CPP=${CPP:Q} rpcgen -C HDRS= rpcb_prot.h diff --git a/include/rpcsvc/Makefile b/include/rpcsvc/Makefile index d7d093fe5eb7..66acc9d5a727 100644 --- a/include/rpcsvc/Makefile +++ b/include/rpcsvc/Makefile @@ -3,7 +3,7 @@ .SUFFIXES: .x -RPCCOM = rpcgen -C +RPCCOM= RPCGEN_CPP=${CPP:Q} rpcgen -C HDRS= key_prot.h klm_prot.h mount.h nfs_prot.h nlm_prot.h rex.h rnusers.h \ rquota.h rstat.h rwall.h sm_inter.h spray.h yppasswd.h yp.h \ diff --git a/lib/libc/rpc/Makefile.inc b/lib/libc/rpc/Makefile.inc index db0b8ad3e785..32e8f86b7169 100644 --- a/lib/libc/rpc/Makefile.inc +++ b/lib/libc/rpc/Makefile.inc @@ -34,7 +34,7 @@ CFLAGS+= -I${.CURDIR}/rpc CLEANFILES+= crypt_clnt.c crypt_xdr.c crypt.h RPCDIR= ${DESTDIR}/usr/include/rpcsvc -RPCGEN= rpcgen -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -C crypt_clnt.c: ${RPCDIR}/crypt.x crypt.h ${RPCGEN} -l -o ${.TARGET} ${RPCDIR}/crypt.x diff --git a/lib/libc/yp/Makefile.inc b/lib/libc/yp/Makefile.inc index 842e63eb08da..6faa9a54175d 100644 --- a/lib/libc/yp/Makefile.inc +++ b/lib/libc/yp/Makefile.inc @@ -10,7 +10,7 @@ CLEANFILES+= yp.h yp_xdr.c SYM_MAPS+= ${.CURDIR}/yp/Symbol.map RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x -RPCGEN= rpcgen -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -C yp_xdr.c: ${RPCSRC} ${RPCGEN} -c -o ${.TARGET} ${RPCSRC} diff --git a/lib/librpcsvc/Makefile b/lib/librpcsvc/Makefile index 8bb745882984..9c9e3ae04d53 100644 --- a/lib/librpcsvc/Makefile +++ b/lib/librpcsvc/Makefile @@ -18,7 +18,7 @@ SECRPCSRCS= secretkey.c xcrypt.c OTHERSRCS+= yp_passwd.c yp_update.c .endif -RPCCOM = rpcgen -C +RPCCOM= RPCGEN_CPP=${CPP:Q} rpcgen -C INCDIRS= -I${DESTDIR}/usr/include/rpcsvc diff --git a/lib/libypclnt/Makefile b/lib/libypclnt/Makefile index 5a3ecb42aa2c..2e302f124289 100644 --- a/lib/libypclnt/Makefile +++ b/lib/libypclnt/Makefile @@ -22,7 +22,7 @@ GENSRCS=yp.h \ yppasswd_private_clnt.c \ yppasswd_private_xdr.c -RPCGEN= rpcgen -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -C RPCSRC= ${.CURDIR}/../../include/rpcsvc/yp.x RPCSRC_PW= ${.CURDIR}/../../include/rpcsvc/yppasswd.x RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x diff --git a/libexec/ypxfr/Makefile b/libexec/ypxfr/Makefile index 91a42eff1776..476a296fa7f3 100644 --- a/libexec/ypxfr/Makefile +++ b/libexec/ypxfr/Makefile @@ -22,7 +22,7 @@ LDADD= -lrpcsvc CLEANFILES= ${GENSRCS} RPCDIR= ${.CURDIR}/../../include/rpcsvc -RPCGEN= rpcgen -I -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C ypxfr_clnt.c: ${RPCDIR}/yp.x rm -f ${.TARGET} diff --git a/release/picobsd/tinyware/passwd/Makefile b/release/picobsd/tinyware/passwd/Makefile index 5f6b8c45bd15..fa603083bcce 100644 --- a/release/picobsd/tinyware/passwd/Makefile +++ b/release/picobsd/tinyware/passwd/Makefile @@ -26,7 +26,7 @@ CFLAGS+= -DLOGIN_CAP -DCRYPT -I. -I${.CURDIR} \ CLEANFILES= ${GENSRCS} -RPCGEN= rpcgen -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -C RPCSRC= ${DESTDIR}/usr/include/rpcsvc/yp.x RPCSRC_PW= ${DESTDIR}/usr/include/rpcsvc/yppasswd.x RPCSRC_PRIV= ${.CURDIR}/../../usr.sbin/rpc.yppasswdd/yppasswd_private.x diff --git a/sys/conf/files b/sys/conf/files index 0378b60ee9ec..b43b4a46deb4 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -2499,17 +2499,17 @@ kern/vfs_vnops.c standard # gssd.h optional kgssapi \ dependency "$S/kgssapi/gssd.x" \ - compile-with "rpcgen -hM $S/kgssapi/gssd.x | grep -v pthread.h > gssd.h" \ + compile-with "RPCGEN_CPP='${CPP}' rpcgen -hM $S/kgssapi/gssd.x | grep -v pthread.h > gssd.h" \ no-obj no-implicit-rule before-depend local \ clean "gssd.h" gssd_xdr.c optional kgssapi \ dependency "$S/kgssapi/gssd.x gssd.h" \ - compile-with "rpcgen -c $S/kgssapi/gssd.x -o gssd_xdr.c" \ + compile-with "RPCGEN_CPP='${CPP}' rpcgen -c $S/kgssapi/gssd.x -o gssd_xdr.c" \ no-implicit-rule before-depend local \ clean "gssd_xdr.c" gssd_clnt.c optional kgssapi \ dependency "$S/kgssapi/gssd.x gssd.h" \ - compile-with "rpcgen -lM $S/kgssapi/gssd.x | grep -v string.h > gssd_clnt.c" \ + compile-with "RPCGEN_CPP='${CPP}' rpcgen -lM $S/kgssapi/gssd.x | grep -v string.h > gssd_clnt.c" \ no-implicit-rule before-depend local \ clean "gssd_clnt.c" kgssapi/gss_accept_sec_context.c optional kgssapi diff --git a/sys/modules/kgssapi/Makefile b/sys/modules/kgssapi/Makefile index 223ef246cdbb..691763336b1e 100644 --- a/sys/modules/kgssapi/Makefile +++ b/sys/modules/kgssapi/Makefile @@ -44,12 +44,12 @@ CLEANFILES= gssd.h gssd_xdr.c gssd_clnt.c S= ${.CURDIR}/../.. gssd.h: $S/kgssapi/gssd.x - rpcgen -hM $S/kgssapi/gssd.x | grep -v pthread.h > gssd.h + RPCGEN_CPP=${CPP:Q} rpcgen -hM $S/kgssapi/gssd.x | grep -v pthread.h > gssd.h gssd_xdr.c: $S/kgssapi/gssd.x - rpcgen -c $S/kgssapi/gssd.x -o gssd_xdr.c + RPCGEN_CPP=${CPP:Q} rpcgen -c $S/kgssapi/gssd.x -o gssd_xdr.c gssd_clnt.c: $S/kgssapi/gssd.x - rpcgen -lM $S/kgssapi/gssd.x | grep -v string.h > gssd_clnt.c + RPCGEN_CPP=${CPP:Q} rpcgen -lM $S/kgssapi/gssd.x | grep -v string.h > gssd_clnt.c .include diff --git a/sys/modules/kgssapi_krb5/Makefile b/sys/modules/kgssapi_krb5/Makefile index 9dbb946a2f9f..337402f64e63 100644 --- a/sys/modules/kgssapi_krb5/Makefile +++ b/sys/modules/kgssapi_krb5/Makefile @@ -18,6 +18,6 @@ CLEANFILES= gssd.h S= ${.CURDIR}/../.. gssd.h: $S/kgssapi/gssd.x - rpcgen -hM $S/kgssapi/gssd.x | grep -v pthread.h > gssd.h + RPCGEN_CPP=${CPP:Q} rpcgen -hM $S/kgssapi/gssd.x | grep -v pthread.h > gssd.h .include diff --git a/usr.sbin/amd/Makefile.inc b/usr.sbin/amd/Makefile.inc index 1965ff933e4c..cc616f1592f8 100644 --- a/usr.sbin/amd/Makefile.inc +++ b/usr.sbin/amd/Makefile.inc @@ -36,7 +36,7 @@ LIBAMUDIR= ${.CURDIR}/../libamu .endif LIBAMU= ${LIBAMUDIR}/libamu.a -RPCCOM= rpcgen +RPCCOM= RPCGEN_CPP=${CPP:Q} rpcgen MOUNT_X= ${DESTDIR}/usr/include/rpcsvc/mount.x NFS_PROT_X= ${DESTDIR}/usr/include/rpcsvc/nfs_prot.x diff --git a/usr.sbin/bootparamd/bootparamd/Makefile b/usr.sbin/bootparamd/bootparamd/Makefile index 5d2047b463cc..a5163a3873ab 100644 --- a/usr.sbin/bootparamd/bootparamd/Makefile +++ b/usr.sbin/bootparamd/bootparamd/Makefile @@ -18,12 +18,12 @@ CLEANFILES= ${GENSRCS} RPCSRC= ${DESTDIR}/usr/include/rpcsvc/bootparam_prot.x bootparam_prot_svc.c: ${RPCSRC} - rpcgen -C -m -o ${.TARGET} ${RPCSRC} + RPCGEN_CPP=${CPP:Q} rpcgen -C -m -o ${.TARGET} ${RPCSRC} bootparam_prot_xdr.c: ${RPCSRC} - rpcgen -C -c -o ${.TARGET} ${RPCSRC} + RPCGEN_CPP=${CPP:Q} rpcgen -C -c -o ${.TARGET} ${RPCSRC} bootparam_prot.h: ${RPCSRC} - rpcgen -C -h -o ${.TARGET} ${RPCSRC} + RPCGEN_CPP=${CPP:Q} rpcgen -C -h -o ${.TARGET} ${RPCSRC} .include diff --git a/usr.sbin/bootparamd/callbootd/Makefile b/usr.sbin/bootparamd/callbootd/Makefile index 5a08d608a4c8..0137407f818d 100644 --- a/usr.sbin/bootparamd/callbootd/Makefile +++ b/usr.sbin/bootparamd/callbootd/Makefile @@ -13,12 +13,12 @@ CLEANFILES= ${GENSRCS} RPCSRC= ${DESTDIR}/usr/include/rpcsvc/bootparam_prot.x bootparam_prot_clnt.c: ${RPCSRC} - rpcgen -C -l -o ${.TARGET} ${RPCSRC} + RPCGEN_CPP=${CPP:Q} rpcgen -C -l -o ${.TARGET} ${RPCSRC} bootparam_prot_xdr.c: ${RPCSRC} - rpcgen -C -c -o ${.TARGET} ${RPCSRC} + RPCGEN_CPP=${CPP:Q} rpcgen -C -c -o ${.TARGET} ${RPCSRC} bootparam_prot.h: ${RPCSRC} - rpcgen -C -h -o ${.TARGET} ${RPCSRC} + RPCGEN_CPP=${CPP:Q} rpcgen -C -h -o ${.TARGET} ${RPCSRC} .include diff --git a/usr.sbin/gssd/Makefile b/usr.sbin/gssd/Makefile index 45d8de4d43fe..3fab810f0165 100644 --- a/usr.sbin/gssd/Makefile +++ b/usr.sbin/gssd/Makefile @@ -13,7 +13,7 @@ LDADD= -lgssapi CLEANFILES= gssd_svc.c gssd.h RPCSRC= ${.CURDIR}/../../sys/kgssapi/gssd.x -RPCGEN= rpcgen -L -C -M +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C -M gssd_svc.c: ${RPCSRC} gssd.h ${RPCGEN} -m -o ${.TARGET} ${RPCSRC} diff --git a/usr.sbin/keyserv/Makefile b/usr.sbin/keyserv/Makefile index 37a416f8dfc5..4308b40f2020 100644 --- a/usr.sbin/keyserv/Makefile +++ b/usr.sbin/keyserv/Makefile @@ -15,7 +15,7 @@ RPCDIR= ${DESTDIR}/usr/include/rpcsvc CLEANFILES= crypt_svc.c crypt.h -RPCGEN= rpcgen -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -C crypt_svc.c: ${RPCDIR}/crypt.x ${RPCGEN} -m -o ${.TARGET} ${RPCDIR}/crypt.x diff --git a/usr.sbin/rpc.lockd/Makefile b/usr.sbin/rpc.lockd/Makefile index e2185c8ad7e7..139f4bc661c8 100644 --- a/usr.sbin/rpc.lockd/Makefile +++ b/usr.sbin/rpc.lockd/Makefile @@ -15,7 +15,7 @@ LDADD= -lrpcsvc -lutil CLEANFILES= nlm_prot_svc.c nlm_prot.h test RPCSRC= ${DESTDIR}/usr/include/rpcsvc/nlm_prot.x -RPCGEN= rpcgen -L -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C nlm_prot_svc.c: ${RPCSRC} ${RPCGEN} -m -o ${.TARGET} ${RPCSRC} diff --git a/usr.sbin/rpc.statd/Makefile b/usr.sbin/rpc.statd/Makefile index e69a9d6e2096..6fa2b1ed10da 100644 --- a/usr.sbin/rpc.statd/Makefile +++ b/usr.sbin/rpc.statd/Makefile @@ -13,7 +13,7 @@ LDADD= -lrpcsvc CLEANFILES= sm_inter_svc.c sm_inter.h RPCSRC= ${DESTDIR}/usr/include/rpcsvc/sm_inter.x -RPCGEN= rpcgen -L -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -L -C sm_inter_svc.c: ${RPCSRC} ${RPCGEN} -m -o ${.TARGET} ${RPCSRC} diff --git a/usr.sbin/rpc.yppasswdd/Makefile b/usr.sbin/rpc.yppasswdd/Makefile index b6a0a8c8630a..a9d3a75b333d 100644 --- a/usr.sbin/rpc.yppasswdd/Makefile +++ b/usr.sbin/rpc.yppasswdd/Makefile @@ -25,7 +25,7 @@ LDADD= -lrpcsvc -lcrypt -lutil CLEANFILES= ${GENSRCS} -RPCGEN= rpcgen -I -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C # We need to remove the 'static' keyword from _rpcsvcstate so that # yppasswdd_main.c can see it. diff --git a/usr.sbin/rpc.ypupdated/Makefile b/usr.sbin/rpc.ypupdated/Makefile index fecb83760dd1..ffef7d493108 100644 --- a/usr.sbin/rpc.ypupdated/Makefile +++ b/usr.sbin/rpc.ypupdated/Makefile @@ -19,7 +19,7 @@ LDADD= -lrpcsvc CLEANFILES= ypupdate_prot_svc.c ypupdate_prot.h RPCDIR= ${DESTDIR}/usr/include/rpcsvc -RPCGEN= rpcgen -I -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C # We need to remove the 'static' keyword from _rpcsvcstate so that # ypupdated_main.c can see it. diff --git a/usr.sbin/rpc.ypxfrd/Makefile b/usr.sbin/rpc.ypxfrd/Makefile index ee9e2425d1e9..05971b16bfd1 100644 --- a/usr.sbin/rpc.ypxfrd/Makefile +++ b/usr.sbin/rpc.ypxfrd/Makefile @@ -17,7 +17,7 @@ LDADD= -lrpcsvc CLEANFILES= ypxfrd_svc.c ypxfrd.h RPCDIR= ${.CURDIR}/../../include/rpcsvc -RPCGEN= rpcgen -I -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C # We need to remove the 'static' keyword from _rpcsvcstate so that # ypxfrd_main.c can see it. diff --git a/usr.sbin/yppush/Makefile b/usr.sbin/yppush/Makefile index 887a80b92d0a..510dc10f4ea8 100644 --- a/usr.sbin/yppush/Makefile +++ b/usr.sbin/yppush/Makefile @@ -14,7 +14,7 @@ CFLAGS+= -I. -I${.CURDIR}/../../libexec/ypxfr WARNS?= 2 -RPCGEN= rpcgen -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -C CLEANFILES= ${GENSRCS} diff --git a/usr.sbin/ypserv/Makefile b/usr.sbin/ypserv/Makefile index 73a6195db36e..cb24c43e71ee 100644 --- a/usr.sbin/ypserv/Makefile +++ b/usr.sbin/ypserv/Makefile @@ -17,7 +17,7 @@ LDADD= -lwrap CLEANFILES= yp_svc.c ypxfr_clnt.c yp.h -RPCGEN= rpcgen -I -C +RPCGEN= RPCGEN_CPP=${CPP:Q} rpcgen -I -C # We need to remove the 'static' keyword from _rpcsvcstate so that # yp_main.c can see it.