Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How would one setup autotools to build a project for separate architectures, concurrently, on multiple systems?

I've got a C++ project which uses automake and autoconf. I'm new to both of these.

My home directory is network mounted -- the same on every server we have -- and I want to compile and run the project (and its executable) concurrently on separate machines.

Our servers are frequently different architectures. My desktop is 32-bit, but the server is 64-bit, etc.

What options do I use in configure.ac and Makefile.am to compile the object files in separate directories named for the machine architectures? It's relatively simple to do this in a regular Makefile, but I don't know how to set autotools.

like image 930
Translunar Avatar asked Jan 22 '23 17:01

Translunar


1 Answers

If you don't do anything "wrong" or unusual in your configure.ac and Makefile.am setup, this is supported automatically:

mkdir /some/where/build
cd /some/where/build
/else/where/source/configure --options...
make
make install

Basically, you create the build directory anywhere you want (in your case probably on a non-network mount), and call configure from there. This will then build the code in the build directory you have created.

like image 154
Peter Eisentraut Avatar answered Apr 08 '23 17:04

Peter Eisentraut