2011-09-13 3 views
0

모든 추가 scons 빌드에 대한 액세스 권한을 갖기 위해 헤더 파일을 기본 include 디렉토리에 '설치'합니다.계층 적 헤더 설치 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