[Scons-users] Includes from sibling directory
Bill Deegan
bill at baddogconsulting.com
Sat Apr 1 16:17:47 EDT 2017
You could map the source include dir via a VariantDir() statement to be the
correct place relative to your variantdir for your sources?
On Sat, Apr 1, 2017 at 3:00 PM, Jean-Baptiste Lab <
jeanbaptiste.lab at gmail.com> wrote:
> Hi Gaurav,
>
> I'm afraid this is the intended behaviour as if I remember correctly,
> there are some ambiguities as to how relative paths are to be interpreted
> in the various C standards (are these paths relative to the source file's
> directory? Relative to the directory from where the compiler was invoked?
> Relative to the compiler installation directory, etc). I believe the SCons
> developers didn't want to risk choosing one interpretation over another and
> implemented the search algorithm to strictly look at files that are
> accessible in the directories listed in the CPPPATH variable.
> I may be wrong, but that's what I remember from back when I was SCons
> building C code (7 years ago, so things may have changed...).
>
> Hope this helps,
>
> JB
>
>
> On 1 April 2017 19:43:35 CEST, Gaurav Juvekar <gauravjuvekar at gmail.com>
> wrote:
>>
>> Hi,
>>
>> I didn't get any replies on about this question posted in January. Can anyone confirm if this is a bug. Should I raise it on the tigris bug tracker?
>> I'm re-attaching the test case.
>>
>>
>> On 2017-01-16 15:43, Gaurav Juvekar wrote:
>>
>>> Hi,
>>>
>>> Manually adding a
>>> env.Depends("a.o", "../include/a.h")
>>> in src/SConscript works.
>>>
>>> Is this a bug in the C file scanner?
>>>
>>> I am attaching a test case based on test/VariantDir/include-subdir.py
>>> Regards,
>>> Gaurav Juvekar
>>>
>>> On 01/11/2017 10:26 AM, Gaurav Juvekar wrote:
>>>
>>>> Hi,
>>>>
>>>> Does SCons properly set dependencies for header files in a sibling
>>>> directory in a variant build?
>>>>
>>>> I have a structure like
>>>> src/a.c
>>>> include/a.h
>>>> tests/test_a.c
>>>>
>>>> where a.c has #include "../include/a.h"
>>>>
>>>> The include dependency is not automatically tracked by SCons.
>>>>
>>>> I've set up the example at
>>>> https://github.com/gauravjuvekar/scons-includes-in-parent-dep-scan
>>>>
>>>> I know that it will work if I add the include directory to CPPPATH. Is
>>>> there a way to do it without changing CPPPATH?
>>>
>>>
>>>
>>
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20170401/cbd01d38/attachment-0001.html>
More information about the Scons-users
mailing list