summaryrefslogtreecommitdiffstats
path: root/usr.bin/rpcgen/rpcgen.1
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2012-02-06 12:03:21 +0000
committerdim <dim@FreeBSD.org>2012-02-06 12:03:21 +0000
commit7568a91a59edeae64a910d200f4ad39f3e8465f4 (patch)
treed313ffd95ae7248e9ac56d0715567b638a7f9883 /usr.bin/rpcgen/rpcgen.1
parent4085286c720e692f2c2f7a6cfcc614513dcf65db (diff)
downloadFreeBSD-src-7568a91a59edeae64a910d200f4ad39f3e8465f4.zip
FreeBSD-src-7568a91a59edeae64a910d200f4ad39f3e8465f4.tar.gz
Let rpcgen(1) support an environment variable RPCGEN_CPP to find the C
preprocessor to run. Previously, it always ran /usr/bin/cpp, unless you used the -Y option, and even then you could not set the basename. It also attempted to run /usr/ccs/lib/cpp for SVR4 compatibility, but this is obsolete, and has been removed. Note that setting RPCGEN_CPP to a command with arguments is supported, though the command line parsing is simplistic. However, setting it to e.g. "gcc46 -E" or "clang -E" will lead to problems, because both gcc and clang in -E mode will consider files with unknown extensions (such as .x) as object files, and attempt to link them. This could be worked around by also adding "-x c", but it is much safer to set RPCGEN_CPP to e.g. "cpp46" or "clang-cpp" instead. MFC after: 1 week
Diffstat (limited to 'usr.bin/rpcgen/rpcgen.1')
-rw-r--r--usr.bin/rpcgen/rpcgen.15
1 files changed, 5 insertions, 0 deletions
diff --git a/usr.bin/rpcgen/rpcgen.1 b/usr.bin/rpcgen/rpcgen.1
index 2a4a25e..1389adf 100644
--- a/usr.bin/rpcgen/rpcgen.1
+++ b/usr.bin/rpcgen/rpcgen.1
@@ -490,6 +490,11 @@ Give the name of the directory where
.Nm
will start looking for the C-preprocessor.
.El
+.Sh ENVIRONMENT
+If the
+.Ev RPCGEN_CPP
+environment variable is set, its value is used as the command line of the
+C preprocessor to be run on the input file.
.Sh EXAMPLES
The following example:
.Dl example% rpcgen -T prot.x
OpenPOWER on IntegriCloud