すべての .c ファイルをサブディレクトリにビルドしたいと考えています。私は次のようなことをするだろうと考えました:
src/foo/SConscript内容:
import glob;
here = Dir('.');
sourcefiles_raw = glob.glob(here.path+'/*.c');
print(sourcefiles_raw);
# print them for debugging
# ... then build them (in the process, making scons aware of dependencies)
src/SConscript内容:
SConscript(['foo/SConscript']);
SConstruct内容:
SConscript(['src/SConscript'],build_dir='build');
しかし、 scons がどのソースファイルを から にコピーする必要があるかを決定する前に、 がディレクトリで実行される[]ため、出力されます。glob.glob()build/foosrc/foobuild/foo
どうすればこの問題を解決できますか?