libbsd include path issue

Christian Mauderer list at c-mauderer.de
Mon Jul 24 17:09:33 UTC 2017



Am 24.07.2017 um 09:11 schrieb Christian Mauderer:
> 
> 
> Am 24.07.2017 um 08:59 schrieb Chris Johns:
>> On 24/07/2017 00:20, Christian Mauderer wrote:
>>> Am 23.07.2017 um 15:57 schrieb Gedare Bloom:
>>>> On Sun, Jul 23, 2017 at 8:38 AM, Christian Mauderer <list at c-mauderer.de> wrote:
>>>>> The problem here is that the opensslv.h is in the directory
>>>>> freebsd/crypto/openssl/crypto. It seems that some makefile magic would
>>>>> install it to openssl/opensslv.h for the normal non-libbsd case (most
>>>>> likely the "link" rule in freebsd/crypto/openssl/crypto/Makefile).
>>>>>
>>>> ah, I see. Then I can't think of any better solution than to make a
>>>> rule something like you did that will copy the header file into an
>>>> appropriate location of the build tree. The other alternative would be
>>>> to create a softlink include/openssl in the source tree, effectively
>>>> doing what the freebsd makefile would do during a build.
>>>
>>> I have shortly thought about that too. I think I've seen some functions
>>> in waf that might could create that softlink. But I had two problems
>>> with that:
>>>
>>> 1. Like I said, I have seen some functions that _might_ could create a
>>> link but I'm not sure what would be the best and correctest way. Any hints?
>>
>> Could a waf 'subst' target be made to work?
>>
>> https://github.com/waf-project/waf/tree/master/demos/subst
> 
> I'll take a look at that. But you know that I'm still learning about waf
> so it will need some time.

Hm. It seems for me that the subst would substitute some text in a
source file with some other text and generate a target from it. So that
most likely could be a nice replacement for the network-config.h (which
is just above my new rule and uses some sed magic) but it seems a little
overkill for just copying files.

Maybe I also haven't found the right documentation for that to find the
best function for it. The waf_generator.py generates the libbsd_waf.py.
In that file, the build(bld) function is defined and we use the bld
object to add some build rules (like my shell command to copy a file).
But who calls the build() function and what type has the bld-object. Is
there some API documentation for that object?

> 
>>
>>> 2. I have no idea how well that would work on a Windows build host. I
>>> know that at least msys2 doesn't support soft links out of the box. They
>>> are replaced by a copy. Any experience regarding that?
>>
>> I would avoid a symlink.
>>
>> Either of these solutions are not great but I also cannot see another way
>> without effecting the upstream.
> 
> OK. Affecting upstream could be a little difficult in that case. Openssl
> is most likely used in many places and they would most likely not be
> happy about a change in the code organization.
> 
> Regards
> 
> Christian
> 



More information about the devel mailing list