Hierarchical builds not possible (TAR/RPM packaging)

Werner Reisberger <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <[email protected]>
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
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.