[Scons-users] Hierarchical builds not possible (TAR/RPM packaging)
Werner Reisberger
wr at pure.ch
Wed Jan 5 04:00:51 EST 2022
Sorry, I used the wrong quotation for the user guide. The statement from
the user guide which is right in my point of view is:
>> Second, unlike standard recursive use of Make, SCons stays in the
>> top-level directory (where the SConstruct
>> file lives) and issues commands that use the path names from the
>> top-level directory to the target and
>> source files within the hierarchy.
The wrong statement from the man page is:
>> By default, scons changes its working directory to the directory in
>> which each subsidiary SConscript file lives.
--Werner
On 2022-01-05 09:39, Werner Reisberger wrote:
> On 2022-01-04 23:02, Bill Deegan wrote:
>> In general we advise against using chdir...
>>
>> Probably you'd be better served to do the following
>>
>> env = Environment(TARFLAGS = '-vc -z -Cbuild')
>>
>> env.Tar('base.tar.gz', [ 'etc/', 'bin/' ])
>>
>> And remove the
>>
>> env.SConscriptChdir(1)
>
> This fails too because when calling SCons this way it will change the
> source list to
>
> [ 'build/etc/', 'build/bin/' ]
>
> Therefore I am getting this error:
>
>>>> scons: Building targets ...
>>>> tar -vczCbuild -f build/base.tar.gz build/etc build/bin
>>>> tar: build/etc: Cannot stat: No such file or directory
>>>> tar: build/bin: Cannot stat: No such file or directory
>
> I can get rid of the "build/" in front by adding "--transform
> 's,^build/,,' to the tar flags but this seems to me like an ugly hack
> and is only working with gnu tar.
>
> BTW: You advise against using SConscriptChdir(1) but this isn't
> working anyway. I couldn't see any effect using this call with any
> parameters.
>
> I also think that the statement on the SCons man page (in the
> SConscriptChdir chapter) is wrong:
>
>>>> By default, scons changes its working directory to the directory in
>>>> which each subsidiary SConscript file lives.
>
> According to the tests I did the below quoted statement on the SCons
> user page is right.
>
> I regard man pages as reference for the usage of a tool. They should
> be as clear and error free as possible.
>
> --Werner
>
>
>> On Mon, Jan 3, 2022 at 11:52 PM Werner Reisberger <wr at pure.ch> wrote:
>
>
>>> By default, scons changes its working directory to the
>>> directory
>>> in which each subsidiary SConscript file lives.
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> https://pairlist4.pair.net/mailman/listinfo/scons-users
More information about the Scons-users
mailing list