2011-09-13 19 views
0

私は、すべての余分なsconsビルドがアクセスできるようにするために、私のヘッダファイルをメインのインクルードディレクトリに 'インストール'しています。階層的なヘッダインストールScons

headers = ''' this.h that.h other.h dir1/other.h dir2/other.h'''.split() 
include_path = Dir('cppunit', local_env['incinstall']) 
hdr_inst = local_env.Install(include_path, headers) 
env.Alias('install_cppunittest_headers', hdr_inst) 

sconsのような

何かが私のヘッダーのレイアウトを平坦化するようだと、複数のother.hの

Install file: "tools\CppUnitTest\src\cppunit\TestRunner.h" as "include\cppunit\TestRunner.h" 
scons: *** [include\cppunit\TestRunner.h] AssertionError : Installing source ['tools\\CppUnitTest\\src\\cppunit\\TestRunner.h', 'tools\\CppUnitTest\\src\\cppunit\\ui\\text\\TestRunner.h'] into target ['include\\cppunit\\TestRunner.h']: target and source lists must have same length. 

誰でも自分のフォルダ階層と私のヘッダをインストールするためのレシピを持っていますがあるとクラッシュします保存されていますか?

答えて

0

これを試してみてください:

headers = ''' this.h that.h other.h dir1/other.h dir2/other.h'''.split() 
include_path = Dir('cppunit', local_env['incinstall']) 
hdr_inst = [local_env.Install(include_path+'/'+h, h) for h in headers] 
env.Alias('install_cppunittest_headers', hdr_inst) 
+0

内蔵のグロブ()関数でこれを行うにはどのような方法がありますか?または、基本的に手動でヘッダを指定する必要はありませんか? –

+0

絶対にGlob()を使用できます。ただし、意図しないファイルを誤って挿入しないように、ソースを明示的にリストする方が良い方法です。 – bdbaddog

関連する問題