mail scons --silent
总结一下 scons 的注意点。
1. target , source
scons 缺省认为是 [file,file] list.
如果是dir 需要 [Dir(dd),Dir(ee)) ] ,
这个 Dir(ddd) 的类型是 SCons.Node.FS.Dir ,可以用 str( ) 转为str
否则报 ,lookup file , dir ............错误
2. scons 的路径缺省是 variant dir ,比如'#build'
子目录下的 缺省路径是 variant dir / sub dir
os.path.join (parant,'/dir') 将产生 '/dir' ,这也许不是想要的结果
3。alias 不能被 Depends
4。--debug = pdb, explain ,stacktrace 可以帮助查错
5. Install , 与InstallAs 不能成功的原因,就是因为 路径拼错了
6。Tar 会连同 dir 打包 ,如果不需要 dir 需要自己写 Command 才可以
7。psedu Builder 比Builder 方便, 可以多传参数
8。避免硬编码, 以方便以后维护
9. compressed tar 不能 update
10. SconsEnvironment 位于 module ,Scons.Script.SconsScript ,而不是Scons。Environment
11. 轻易不要使用 shell command ,否则 目录关系会很烦
12. filegenerator is stupid than tar
so many call ,it's fool for a architect.
13. tar Flag should be set with Replace other than append
14. If you need operate os path. should env.Dir(path).abspath
15. env.Execute(Mkdir(paht)) can execute imediataly.
16. psedo builder combine other builders , os operation will executed during scan process ,It's path will be wrong ,since file in variant build path is not set up properly
总结一下 scons 的注意点。
1. target , source
scons 缺省认为是 [file,file] list.
如果是dir 需要 [Dir(dd),Dir(ee)) ] ,
这个 Dir(ddd) 的类型是 SCons.Node.FS.Dir ,可以用 str( ) 转为str
否则报 ,lookup file , dir ............错误
2. scons 的路径缺省是 variant dir ,比如'#build'
子目录下的 缺省路径是 variant dir / sub dir
os.path.join (parant,'/dir') 将产生 '/dir' ,这也许不是想要的结果
3。alias 不能被 Depends
4。--debug = pdb, explain ,stacktrace 可以帮助查错
5. Install , 与InstallAs 不能成功的原因,就是因为 路径拼错了
6。Tar 会连同 dir 打包 ,如果不需要 dir 需要自己写 Command 才可以
7。psedu Builder 比Builder 方便, 可以多传参数
8。避免硬编码, 以方便以后维护
9. compressed tar 不能 update
10. SconsEnvironment 位于 module ,Scons.Script.SconsScript ,而不是Scons。Environment
11. 轻易不要使用 shell command ,否则 目录关系会很烦
12. filegenerator is stupid than tar
so many call ,it's fool for a architect.
13. tar Flag should be set with Replace other than append
14. If you need operate os path. should env.Dir(path).abspath
15. env.Execute(Mkdir(paht)) can execute imediataly.
16. psedo builder combine other builders , os operation will executed during scan process ,It's path will be wrong ,since file in variant build path is not set up properly