Sharing private header files into ldb?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Sharing private header files into ldb?

Samba - samba-technical mailing list
G'Day,

Is there a good, already established method to share a file
(binsearch.h in this case) from lib/util into ldb, without making it a
public header we install and depend on?

I think we did something like this for ccan, replace et al as a bundled
library, but I'm just checking what the current experience/best
practice for essentially an internal copylib is before I dig further.

We have a lot of these already, like the whole build system, so I feel
this isn't novel

I need it to:
 - work for bundled and standalone builds from git
 - be present in ldb tarballs
 - be in only one spot in our git tree

Any clues most valued!

Thanks,

Andrew Bartlett
--
Andrew Bartlett
https://samba.org/~abartlet/
Authentication Developer, Samba Team         https://samba.org
Samba Development and Support, Catalyst IT  
https://catalyst.net.nz/services/samba





Reply | Threaded
Open this post in threaded view
|

Re: Sharing private header files into ldb?

Samba - samba-technical mailing list
Hi Andrew,

On Thu, 07 Sep 2017 12:12:51 +1200, Andrew Bartlett
<[hidden email]> wrote:

> Is there a good, already established method to share a file
> (binsearch.h in this case) from lib/util into ldb, without making it a
> public header we install and depend on?
>
> I think we did something like this for ccan, replace et al as a bundled
> library, but I'm just checking what the current experience/best
> practice for essentially an internal copylib is before I dig further.
>
> We have a lot of these already, like the whole build system, so I feel
> this isn't novel
>
> I need it to:
>  - work for bundled and standalone builds from git
>  - be present in ldb tarballs
>  - be in only one spot in our git tree
>
> Any clues most valued!

Check out the use of samba_dist.DIST_DIRS() near the top of
ctdb/wscript - I notice that lib/ldb/wscript has something similar.
I guess you should be able to accomplish something similar with
samba_dist.DIST_FILES() to get that one file bundled?

peace & happiness,
martin

Reply | Threaded
Open this post in threaded view
|

Re: Sharing private header files into ldb?

Samba - samba-technical mailing list
On Thu, 2017-09-07 at 21:30 +1000, Martin Schwenke via samba-technical
wrote:

> Hi Andrew,
>
> On Thu, 07 Sep 2017 12:12:51 +1200, Andrew Bartlett
> <[hidden email]> wrote:
>
> > Is there a good, already established method to share a file
> > (binsearch.h in this case) from lib/util into ldb, without making it a
> > public header we install and depend on?
> >
> > I think we did something like this for ccan, replace et al as a bundled
> > library, but I'm just checking what the current experience/best
> > practice for essentially an internal copylib is before I dig further.
> >
> > We have a lot of these already, like the whole build system, so I feel
> > this isn't novel
> >
> > I need it to:
> >  - work for bundled and standalone builds from git
> >  - be present in ldb tarballs
> >  - be in only one spot in our git tree
> >
> > Any clues most valued!
>
> Check out the use of samba_dist.DIST_DIRS() near the top of
> ctdb/wscript - I notice that lib/ldb/wscript has something similar.
> I guess you should be able to accomplish something similar with
> samba_dist.DIST_FILES() to get that one file bundled?

Thanks!

Andrew Bartlett
--
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba