如何设置autotools在多个系统上同时为单独的体系结构构建项目?

Doc*_*awk 4 c++ concurrency automake autoconf autotools

我有一个使用automake和autoconf的C++项目.我是这两个人的新手.

我的主目录是网络安装的 - 我们拥有的每台服务器都是一样的 - 我想在不同的机器上同时编译和运行项目(及其可执行文件).

我们的服务器通常是不同的架构.我的桌面是32位,但服务器是64位等.

哪些选项我在使用configure.acMakefile.am编写命名为计算机体系结构不同的目录中的目标文件?在常规Makefile中执行此操作相对简单,但我不知道如何设置autotools.

Pet*_*aut 9

如果您在configure.ac和Makefile.am设置中没有执行任何"错误"或异常操作,则会自动支持:

mkdir /some/where/build
cd /some/where/build
/else/where/source/configure --options...
make
make install
Run Code Online (Sandbox Code Playgroud)

基本上,您可以在任何地方创建构建目录(在您的情况下可能在非网络安装上),并从那里调用configure.然后,这将在您创建的构建目录中构建代码.

  • 有关此内容的更多信息,请参阅Automake手册的"VPATH Builds"部分.http://sources.redhat.com/automake/automake.html#VPATH-Builds (4认同)