我希望许多 gyp 脚本有一个共同的目标。所以我决定把它移到一个单独的包含文件中。产生错误的最简单的测试用例:
foo.gyp
{
'includes' : [
'bar.gypi',
],
}
酒吧.gypi
{
'targets': [
{
'target_name' : 'phony',
'type' : 'none',
'actions' : [
{
'action_name' : '_phony_',
'inputs' : ['',],
'outputs' : ['',],
'action' : ['_phony_',],
'message' : '_phony_',
},
],
},
],
}
产生错误:
IndexError: string index out of range while reading include of foo.gyp while try to load foo.gyp
一些观察:
如果我从目标中删除
actions
,一切都会很好地解析如果我
targets
(通过动作)移动到foo.gyp
,一切都会很好地解析
难道我做错了什么?