Re: Hierarchical builds not possible (TAR/RPM packaging)

Bill Deegan <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <CAEyG4CE_u1Go7VN8S0cLPwEgb+ktQcbghB-vJ7Kfs9GkT9FKAg@mail.gmail.com>
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 <[email protected]> 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
> [email protected]
> https://pairlist4.pair.net/mailman/listinfo/scons-users
>

_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.