eclipse-cdt - 如何使 Eclipse CDT Autotools 使用关闭源目录 autogen.sh
问题描述
我正在尝试配置 Eclipse CDT 2019-12 来构建一个使用自动工具的旧项目。有一个 autogen.sh 脚本,但它不包含在包含 configure.ac 和其他源文件的目录中。查看Eclipse Autotools 用户指南,这可能是运行“重新配置项目”不使用 autogen.sh 的原因。但运行 autoreconf。
我重新定义了 Autotools > Configure Settings > autogen > Command 以使用相对路径,但这没有帮助。重新定义 Autotools > General > Tools Settings > autoreconf 会导致内部错误 (NullPointerException)。
我可以做些什么来帮助 Eclipse 找到并执行非源目录 autogen.sh?
解决方案
The directory containing configure.ac
, and therefore where the configure
script also resides and / or is created, is the root of the project's source tree by definition. In a well-formed Autotools project, there should not be any build system artifacts outside the source tree because the contents of the source tree define what gets packaged and distributed.
Moreover, it is my understanding and recollection that Eclipse relies on that in defining its logical view of an Autotools project. Eclipse goes to some trouble to try to prevent project building from accessing files outside the spaces specified in the project configuration. It does not particularly surprise me that it does not recognize an autogen.sh
file outside the source tree, no matter how you try to specify its location.
First off, it would be worthwhile examining the autogen script to determine whether it's actually doing anything needful that autoreconf
does not do, or if it may be intentionally omitting anything that autoreconf
does. It may be that letting Eclipse use autoreconf
instead of autogen.sh
will work just fine.
If in fact you need Eclipse to use autogen.sh
, then your best bet is probably to copy it into the source directory and update the copy appropriately for its new location.
推荐阅读
- javascript - 如何在点击 Braintree PayPal 结帐按钮时验证自定义表单?
- jsp - 使用 intellij IDEA 调试 JSP
- .net - 如何查询没有特定区域的 AWS 服务
- aws-lambda - Terraform 在针对 `localstack` 运行时卡在`刷新状态...`
- c# - 如果轨迹栏的输入是偶数,如何返回错误消息?
- javascript - 嵌套对象的解构数组别名
- angular - 如果预先选择了值(primeng multiselet),如何禁用其他字段?
- dji-sdk - DJI UX SDK 上的指南针航向
- php - 使用 PDO 在一个表中查找记录并将数据附加到另一个表中
- python - requests.content 正常工作,但在 app.route 烧瓶中使用时会保存损坏的 pdf 文件