scons 的注意点

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
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值