簡體   English   中英

為什么我在scons中的subdir定義不起作用?

[英]Why my defines of subdirs in scons does not work?

我開始使用scons添加一個新的子目錄及其SConscript。 但是我發現我的SConscript沒有被讀入根SConscript,我不知道為什么。 我會錯過什么嗎?

我的項目中的Scons文件如下所示:

project-root
 - SConstruct
 - Sconscript
 + supportlib
    - SConscript (returning library target)
    + src
       - ...
 + Program
    - SConsctipt (importing library target)
    + src
       - ...

root的SConscript如下所示:

subdirs = [..., AAAA]
SConscript(dirs = subdirs, exports='env')

在AAAA子目錄中,我有SConscript文件。 但是scons實際上不會在AAAA目錄中讀取此SConscript文件。 它的日志如下:

scons: Reading SConscript files ...
...
Enable AAAA:        True
...
scons: warning: Two different environments were specified for target dummy_register_server.o,
        but they appear to have the same action: $CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
File "/root/workspace/xorp.ct/xorp/site_scons/site_tools/autotest.py", line 85, in _UnitTest

scons: warning: Two different environments were specified for target /root/workspace/xorp.ct/xorp/obj/i686-pc-linux-gnu/rib/parser.o,
        but they appear to have the same action: $CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
File "/root/workspace/xorp.ct/xorp/site_scons/site_tools/autotest.py", line 85, in _UnitTest

scons: warning: Two different environments were specified for target dummy_register_server.o,
        but they appear to have the same action: $CXX -o $TARGET -c $CXXFLAGS $CCFLAGS $_CCCOMCOM $SOURCES
File "/root/workspace/xorp.ct/xorp/site_scons/site_tools/autotest.py", line 85, in _UnitTest

scons: warning: Two different environments were specified for target aspath.os,
        but they appear to have the same action: $SHCXX -o $TARGET -c $SHCXXFLAGS $SHCCFLAGS $_CCCOMCOM $SOURCES
File "/root/workspace/xorp.ct/xorp/bgp/SConscript", line 169, in <module>
...
scons: done reading SConscript files.
scons: Building targets ...
scons: every thing is up to date. ***# but there is no AAAA target report.***
scons: done building targets.

您的文件樹沒有顯示AAAA文件夾的位置,並且頂層SConstruct中AAAA的定義也不清楚(它是字符串還是其他名稱?)。 這樣就不可能猜測出什么問題了。 無論如何,我建議您以UserGuide( http://www.scons.org/doc/production/HTML/scons-user.html )的形式查看官方文檔,並按照說明進行基本設置在第一章。 14“層次結構”。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM