Re: [PATCHv2] cld: use XDR for all messages

Jeff Garzik <[email protected]>
Newsgroups org.kernel.vger.hail-devel
Message-ID <[email protected]>
On 01/26/2010 04:22 PM, Colin McCabe wrote:
> Hi all,
>
> I'm currently reworking this patch to address the concerns mentioned
> here (mostly autotools-related). I'm also going to separate it into
> multiple patches.
>
> A few questions:
>
> I would really like cld_msg_rpc.h to show up in "include," for
> consistency with the other headers.
>
> Is it possible for cld_msg_rpc.x to live in lib/ and export the header
> into the include/ directory?
> I've been reading everything I can about automake, but I still haven't
> been able to figure out if this kind of cross-directory dependency
> between two directories at the same depth is possible.
>
> I really don't want to put cld_msg_rpc_xdr.c in include/. But so far I
> can't figure out how to have the header there, without the .c file...

Actually I poked at it this weekend, and was about to finish up.  So 
hold off for another day, if you would.

The answer is, there are two different build environments to consider 
for headers:  the in-tree build environment, and the installed-header 
build environment.  That is why including "lib/foo.h" does not work, 
particularly in nested headers.  You need to fiddle INCLUDES in 
Makefile.am to get the header path correct at build time, and then 
ensure that all headers are installed in the proper location (by 
default, $includedir) using include_HEADERS.  That way, cld_msg_rpc* 
remains in lib/ while the other headers remain in include/

Also, while splitting this up, I noticed that ping_open is no longer set 
to true.

	Jeff
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.