Questions tagged [automake]

Automake is a tool provided by GNU for the purpose of automating the generation of portable, configurable Makefiles.

Automake is a tool for automatically generating Makefile.ins from files called Makefile.am. Each Makefile.am is basically a series of make variable definitions, with rules being thrown in occasionally. The generated Makefile.ins are compliant with the GNU Makefile standards.

The GNU Makefile Standards Document (see Makefile Conventions) is long, complicated, and subject to change. The goal of Automake is to remove the burden of Makefile maintenance from the back of the individual GNU maintainer (and put it on the back of the Automake maintainers).

The typical Automake input file is simply a series of variable definitions. Each such file is processed to create a Makefile.in. There should generally be one Makefile.am per directory of a project.

Automake does constrain a project in certain ways; for instance, it assumes that the project uses Autoconf (see Introduction), and enforces certain restrictions on the configure.ac contents.

For more details, take a look into automake manual

1092 questions
8
votes
5 answers

How to point autoconf/automake to non-standard packages

I'm trying to build ZooKeeper on a RedHat Linux box. (Exactly what ZooKeeper is is probably not important :-) When I follow the package instructions, I get: $ autoreconf -if aclocal:configure.ac:33: warning: macro `AM_PATH_CPPUNIT' not found in…
Leonard
  • 13,269
  • 9
  • 45
  • 72
8
votes
2 answers

Tell automake to run a few commands on a program just before installing or just after linking

I would like use automake to process/modify the binaries before they are installed. For example, I would like to extract the symbols from the binary into a separate file and location (like this). Another example is to collect the md5sums of critical…
Shriram V
  • 1,500
  • 2
  • 11
  • 20
8
votes
1 answer

Install arbitrary data files in fixed location with Automake?

How can I tell Automake to install arbitrary data files in places I want? I have some files I need to put in specific places, e.g. "datafile1", in my project, needs to be copied to "/usr/MyProduct/flash_memory". "/usr/MyProduct/flash_memory" is an…
j4x
  • 3,595
  • 3
  • 33
  • 64
8
votes
2 answers

Autotools library and object file output control

My goal is to have all object files built in a .objs directory instead of the root of the Makefile, and to have the binaries (and libraries) copied into the project's bin/ directory. But I have been unable to find any resources to explain how to do…
John Bellone
  • 1,351
  • 1
  • 16
  • 29
7
votes
1 answer

Makefile.am create empty directory

Using autotools, I need to create an empty directory tree when typing make install, like: /etc/myprg/ |-- foo right now, I do this by specifying empty targets, like this: myprgdir = $(sysconfdir)/myprg/ myprgfoodir = $(sysconfdir)/myprg/foo and…
Cristiano
  • 856
  • 10
  • 24
7
votes
3 answers

autoconf error on ubuntu 11.04

i've been googling and installing libraries for a while, but I couldn't quite handle this problem with autoconf. i have downloaded a program that i want to compile, made a few changes, and need to run autogen.sh and ./configure and make install…
fizboz
  • 127
  • 2
  • 7
7
votes
1 answer

Autoconf subdirectories with subpackages depending on each other?

I've got a large project on my hand (master) that is split into several components (liba, b, c, d) to ease building and maintenance. When building the whole package, all of the subcomponents must be built in sequence, and some of these packages…
thiton
  • 35,651
  • 4
  • 70
  • 100
7
votes
3 answers

why automake fails to generate Makefile.in

Trying to use automake/autoconf (versions 1.10 and 2.61, respectively). Everything is working OK, except automake is not generating Makefile.in. There are some warnings generated, but I don't think they're significant. However, the last line makes…
wadesworld
  • 13,535
  • 14
  • 60
  • 93
7
votes
2 answers

Makefile conditional with automake/autoconf

can anybody tell me if there is a way to insert a conditional block to Makefile.am so that it will be passed further to a Makfile created by autotools? Here is an example: ifeq "$(SOMEVAR)" "" SOMEVAR="default_value" endif This seems to be a usual…
autoconfer
  • 73
  • 1
  • 3
7
votes
2 answers

How to disable tracking of a dependency in configure script

I am trying to build a library with a different build system, but files in the library require a config.h header file that is generated after running the configure scripts generated by autoconf. This is the sequence of steps I am following to try…
Curious
  • 20,870
  • 8
  • 61
  • 146
7
votes
3 answers

Adding a custom installation directory option to Autoconf-generated configure scripts

configure scripts always include something like the following in the help message: ... By default, `make install' will install all the files in `/usr/local/bin', `/usr/local/lib' etc. You can specify an installation prefix other than `/usr/local'…
Daniel Trebbien
  • 38,421
  • 18
  • 121
  • 193
7
votes
2 answers

automake version (am__api_version) hardcoded in configure script

I'm currently working on a Linux project using autotools. The code is submitted in SCM (Perforce) and we have the configure script, Makefile.am, Makefile.in - the usual autotools boilerplate. Recently, somebody has changed Makefile.am, but forgot to…
fencekicker
  • 732
  • 1
  • 8
  • 18
7
votes
1 answer

Unit tests using Automake

I am working in a project with other people in the team using GNU autotools. In the project we are using unit test for each non trivial C++ class. I found out that there is support for unit testing. For that I am using this structure: ./ +…
Vicente Bolea
  • 1,409
  • 16
  • 39
7
votes
1 answer

Library defined but no canonical name

I'm trying to build a project using autotools and getting this error: $ autoreconf --install automake: warnings are treated as errors src/Makefile.am:3: warning: variable 'librombrowser_a_LDFLAGS' is defined but no program or src/Makefile.am:3:…
Victor Aurélio
  • 2,355
  • 2
  • 24
  • 48
7
votes
1 answer

Why am I getting this aclocal error?

I'm trying to compile libbsd from source on Ubuntu 13.04. I'm using a toolchain to cross-compile, but automake is on the local machine. I have aclocal-1.13 in the PATH and everything, but I'm still getting this error. I've tried looking them up but…
s g
  • 5,289
  • 10
  • 49
  • 82