【发布时间】:2015-02-24 20:07:48
【问题描述】:
我正在尝试创建一个Homebrew formula for gtk-mac-integration。在 bindings/python/gtkosx_application 中运行 make 失败:
/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file '/usr/local/Cellar/gtk-mac-integration/2.0.7/share/pygobject/2.0/codegen/h2def.py': [Errno 2] No such file or directory
make[3]: *** [gtkosx_application.defs] Error 2
这是因为 Makefile 试图在错误的位置找到 h2def.py 文件:
gtkosx_application.defs: $(headers)
$(PYTHON) $(datadir)/pygobject/2.0/codegen/h2def.py $(headers) > $@
我很清楚为什么会失败:$(datadir) 指向要安装的包的共享目录 (gkt-mac-integration)。因为 Homebrew 将所有包都安装到自己的前缀(/usr/local/Cellar/...)中,所以 gtk-mac-integration 和 pygobject 不一样。
我知道可以使用
找出 pygobject 数据目录的位置pkg-config --variable=datadir pygobject-2.0
我不认为正确的解决方法是将 Makefile 中的 datadir 替换为上面的字符串?我应该如何调整configure.ac 和Makefile.am 以使其正常工作?
【问题讨论】:
标签: homebrew autoconf pkg-config