[illumos-Developer] webrev #687: rpcgen should not generate absolute #includes

Gordon Ross gordon.w.ross at gmail.com
Thu May 12 13:32:14 PDT 2011


On Thu, May 12, 2011 at 1:33 PM, Gary Mills <mills at cc.umanitoba.ca> wrote:
[...]
>> (rpcgen does not need a search path, but one would like the
>> compiler to be able to find your headers when compiling the
>> generated code, without hacking your CPPFLAGS...)
>
> Maybe that's exactly what it needs?  You could specify the input file
> as `rpcsvc/idmap_prot.h' and the search path as
> `/tank/ws/nfslm1/usr/src/uts/common' or as `../../../uts/common'.
> Wouldn't that do it?

In theory, yes, but it creates its output files in the current directory,
so we want to run it, i.e. in $SRC/uts/common/idmap where the
idmap.x file is  in ../rpcsvc.  You end up with includes that look like
#include "../rpcsvc/idmap.x" (or even worse, the full path).

So I think the proposed extension is a useful feature.
I'm also OK with continuing to sed the generated files,
but the extension idea seems a little better to me.

Gordon



More information about the Developer mailing list