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
7
votes
1 answer

Autotools build fails due to subdir-objects option in AM_INIT_AUTOMAKE

I'm currently working on a C++ project which relies on recursive automake for building. I want to build a shared library and the Makefile.am in the src directory of the library looks like # ... # Library name lib_LTLIBRARIES =…
Marcel
  • 616
  • 1
  • 5
  • 15
7
votes
4 answers

Automake and standard shared libraries

How can I force automake to create a standard shared library, instead of a libtoolized one? Normally, I'd create the abc.so which is referenced with a full path and loaded into the main program. Is there a way to force AM to do the same? If I list…
viraptor
  • 33,322
  • 10
  • 107
  • 191
7
votes
1 answer

Not able to enable C++11 using autoconf

I am trying to enable c++11 for gcc 4.6; I am using autconf and I added following to my configure.ac file AC_PREREQ(2.61) AC_INIT(SOLARCORE, 1.0.0, BUG-REPORT-ADDRESS) AM_INIT_AUTOMAKE([1.10 no-define…
rkb
  • 10,933
  • 22
  • 76
  • 103
7
votes
1 answer

Automake ignore missing NEWS/AUTHORS/COPYING/etc. standard files

Automake requires that the following "standard" files exist in the source directory of my project: INSTALL NEWS README COPYING AUTHORS ChangeLog Obviously, none of these files are necessary for a program to build, but Automake refuses to run…
user35147863
  • 2,525
  • 2
  • 23
  • 25
7
votes
2 answers

Portably include GLib headers in autoconf/automake

I need to include the GLib headers for a project that is built with an autoconf-based system for portability. How can I safely import the GLib headers in a portable manner? I know about pkg-config, but that is not entirely portable (since some…
alternative
  • 12,703
  • 5
  • 41
  • 41
7
votes
3 answers

Using Autotools for a project with platform specific source code

I'm developing a project that is currently written in C but I plan to write some of the functions in ASM for at least two platforms (x86_64 and arm). So I might have some source…
Borbus
  • 593
  • 4
  • 10
7
votes
5 answers

JNI and Java: ant calling make or make calling ant?

I'm just about to make my first trip into the world of JNI (Java Native Interface) to provide file system change notifications from platform specific C/C++ code to Java. That is unless someone suggest some brilliant library for doing this that I've…
Free Wildebeest
  • 7,272
  • 8
  • 38
  • 42
7
votes
1 answer

LTLIBRARIES: mv *.Tpo *.Plo, but the former doesn't exist and the latter already does

I'm doing a pretty straight-forward conversion of an existing library (libtcod) to Autotools (for OS X happiness). Unfortunately, when I switch my Makefile.am's lib_LIBRARIES rule to lib_LTLIBRARIES, the build goes from successful to un. Excerpt…
Adam Blinkinsop
  • 191
  • 1
  • 6
7
votes
2 answers

make distcheck and tests that need input files

I recently converted my build system to automake/autoconf. In my project I have a few unit tests that need some input data files in the direcory from where they are run. When I run make distcheck and it tries the VPATH build, these tests fail…
Martin Wiebusch
  • 1,681
  • 2
  • 11
  • 15
6
votes
1 answer

How do I declare an optional target in automake?

In my Makefile.am file I have something like this: bin_PROGRAMS = foo bar foo_SOURCES = foo.cpp bar_SOURCES = bar.cpp I am interested in having bar only compiled when I do a make bar, not when I do a make all. But I want foo always compiled. How…
vy32
  • 28,461
  • 37
  • 122
  • 246
6
votes
1 answer

How do I use pkginclude_HEADERS and Automake to get a second include directory?

Much of this topic was covered in this thread on pkginclude_HEADERS I have an open source library and it has some includes with common names. I suspect the best solution is to have my umbrella include file in the pkginclude_HEADERS directory, then…
David H
  • 40,852
  • 12
  • 92
  • 138
6
votes
2 answers

With autoconf/automake, how do I specify include file paths?

Let's say I want to have the generate makefile pass some specific header paths to g++. What do I need to add to configure.ac or Makefile.am to specify this? (note - I do not want to pass it in the CPPFLAGS with ./configure. I want those paths baked…
marathon
  • 7,881
  • 17
  • 74
  • 137
6
votes
5 answers

Is there a way to tell automake not to interpret part of the automakefile?

Is there a way to tell automake not to interpret part of the Makefile.am? Specifically, I am trying to encode a Makefile conditional in a Makefile.am. As other people have noticed, this doesn't work because automake interprets the endif…
Ed McMan
  • 521
  • 2
  • 15
6
votes
1 answer

Configuration files and log files installation with automake

Let's say I have a project like that: (dev dir) - README - INSTALL / src - blah.cpp - blah.hpp / conf - blah_one.xml - blah_two.xml I made out a configure.ac and Makefile.am to install binaries under (/usr/local)/bin . configure.ac is…
ElementalStorm
  • 809
  • 12
  • 31
6
votes
1 answer

aclocal error: ' is already registered with AC_CONFIG_FILES; and/or $'\r': command not found

I was building a C automake project. Running "aclocal" is showing the following error. $ aclocal ' is already registered with AC_CONFIG_FILES./usr/src/ports/autoconf2.5/autoconf2.5-2.69-3.noarch/src/autoconf-2.69/lib/autoconf/status.m4:288:…
arslan
  • 2,034
  • 7
  • 34
  • 61