[Scons-users] Hierarchical builds not possible (TAR/RPM packaging)
Bill Deegan
bill at baddogconsulting.com
Tue Jan 4 17:02:38 EST 2022
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)
On Mon, Jan 3, 2022 at 11:52 PM Werner Reisberger <wr at pure.ch> wrote:
> The RPM packaging fails when I call it in a lower directory with
> Sconscript(...). The reason is, that the intermediate TAR file contains
> the directory where the SConstruct file is.
>
> I tried to make a tar file in a sub directory without the upper path but
> wasn't successful. The call
>
> SConscriptChdir(1)
> SConscript('build/SConscript')
>
> does not have any effect although the SCons man page says:
>
> By default, scons changes its working directory to the directory
> in which each subsidiary SConscript file lives.
>
> My setup:
>
> - => SConstruct file
> build/SConscript
> build/bin/a.sh
>
> Whatever I try the builded base.tar.gz contains
>
> build/bin/a.sh
>
> instead of
>
> bin/a.sh
>
> This behaviour breaks completly the building of RPM's in subdirectories
>
>
> My test can be retrieved here:
>
> https://github.com/wrbr/sconstest/tree/main/build
>
> I also see contradictory statements on the user page and on the man
> page. The user page says:
>
> >> ... unlike standard recursive use of Make, SCons stays in the
> >> top-level directory (where the SConstruct file lives)
>
> https://scons.org/doc/production/HTML/scons-user/ch14s02.html
>
> That's also what my tests are showing. However, according to the man
> page there should be a way to mimic the make behaviour with
> SConscriptChdir(1).
>
> Please explain.
>
> Thanks, Werner
> _______________________________________________
> 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/20220104/f458e0f5/attachment-0001.htm>
More information about the Scons-users
mailing list