configure.ac 为所有构建文件指定文件夹
configure.ac specify folder for all build files
我是 autotools 的新手,但我在 autotools 文档中找不到对应我的问题的章节。
是否有我可以在 configure.ac 脚本中指定的命令,它将所有构建文件(配置文件、Makefile 等)存储在一个文件夹中(例如 ./build)?或者我应该如何设置 autotools 以避免我的 repo 混乱?
我的步骤:
$autoreconf --install
$./configure
$make
任何教程或文章都会非常有用。
您不需要在 configure.ac
中做任何特殊的事情来启用 out-of-tree
建立。你只需要不要做错任何事。一个正确的自动工具包将在树内或树外构建。
假设您的 autotooled 包位于 ./foobar
并且您已经完成了 autotooling
正确以便:
cd foobar
./configure
make
make distcheck
一切顺利。那么同样:
mkdir foobar_build
cd foobar_build
../foobar/configure
make
make distcheck
也将以同样的方式工作,除了由
configure
脚本和 make
将在 ./foobar_build
而不是 ./foobar
.
您无法让 autoreconf
生成 它 创建的树外文件
(configure
脚本和朋友)因为这些将包含在
make dist
生成的分发 tarball(例如 foobar-1.0.tar.gz
)。这
autotooled 包的最终用户不需要拥有或理解 autotools:
他们应该能够:
- 克隆,或下载并提取
- 配置
- 制作
- 作为 root,进行安装
出于同样的原因,configure
脚本和朋友 应该
源代码控制存储库,至少在您发布的发布分支中
发布克隆。
我是 autotools 的新手,但我在 autotools 文档中找不到对应我的问题的章节。
是否有我可以在 configure.ac 脚本中指定的命令,它将所有构建文件(配置文件、Makefile 等)存储在一个文件夹中(例如 ./build)?或者我应该如何设置 autotools 以避免我的 repo 混乱? 我的步骤:
$autoreconf --install
$./configure
$make
任何教程或文章都会非常有用。
您不需要在 configure.ac
中做任何特殊的事情来启用 out-of-tree
建立。你只需要不要做错任何事。一个正确的自动工具包将在树内或树外构建。
假设您的 autotooled 包位于 ./foobar
并且您已经完成了 autotooling
正确以便:
cd foobar
./configure
make
make distcheck
一切顺利。那么同样:
mkdir foobar_build
cd foobar_build
../foobar/configure
make
make distcheck
也将以同样的方式工作,除了由
configure
脚本和 make
将在 ./foobar_build
而不是 ./foobar
.
您无法让 autoreconf
生成 它 创建的树外文件
(configure
脚本和朋友)因为这些将包含在
make dist
生成的分发 tarball(例如 foobar-1.0.tar.gz
)。这
autotooled 包的最终用户不需要拥有或理解 autotools:
他们应该能够:
- 克隆,或下载并提取
- 配置
- 制作
- 作为 root,进行安装
出于同样的原因,configure
脚本和朋友 应该
源代码控制存储库,至少在您发布的发布分支中
发布克隆。