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
5
votes
3 answers

automake tests which need command-line arguments

In automake you can add tests using the TESTS variable but these need to be self-contained tests. I need a way to call a standard test driver providing arguments. Is there any way to do this, or to call a standard makefile target during testing? For…
edA-qa mort-ora-y
  • 30,295
  • 39
  • 137
  • 267
5
votes
1 answer

Expected project/directory structure for Automake?

I'm developing a static C library, and had been using a bare-bones Makefile. We're now having to support offsite installs and whatnot, and the time has come to move to a more robust build standard. I really want that to be autotools -- I love the…
shanef22
  • 323
  • 1
  • 5
5
votes
2 answers

Automake and files with the same name

I've a C++ autoconf managed project that I'm adapting to compile on FreeBSD hosts. The original system was Linux so I made one AM_CONDITIONAL to distinguish the host I'm building and separate the code into system specific…
Renato Aquino
  • 784
  • 1
  • 5
  • 15
5
votes
2 answers

Automake Libtool 'No rule to make target'

I've been trying to build to GLTools library that accompanies The OpenGL SuperBible into a libtool library with automake. I've set up autoconf and automake but when it comes to actually build the library I get: $ make make: *** No rule to make…
5
votes
2 answers

Automake: building shared module which is not to be installed

How to tell Automake to build a dynamic module which is not to be installed? pkglib_LTLIBRARIES = mywrapper.la mywrapper_la_LDFLAGS = -no-undefined -module -avoid-version causes mywrapper.so to be installed to pkglibdir. noinst_LTLIBRARIES =…
dottedmag
  • 853
  • 6
  • 16
5
votes
2 answers

Portable equivalent of GNU make %-style pattern rules

I'm following the directions on the Using Check with the Autotools page in an attempt to build in support for unit test in a (currently) small C project. Although I am using Cgreen instead of Check. I'm having trouble with step 9, which is causing…
Wes
  • 2,166
  • 1
  • 20
  • 22
5
votes
1 answer

Set python dist-packages path for autotools in Yocto bitbake

I am trying to write a bitbake file for a project with uses autotools to configure the Makefiles. ### tizonia.bb SUMMARY = "Tizonia Library" DESCRIPTION = "Tizonia" LICENSE = "LGPL-3.0" LIC_FILES_CHKSUM =…
serkan.tuerker
  • 1,681
  • 10
  • 20
5
votes
2 answers

How to reconfigure a large program for GNU Autotools

I have a fairly large program written in C. It spans several files, and has a bit of retooling in order to attempt to compensate for platform issues. Specifically, I have header files for different OSes, architectures, and compilers that define…
Chris Lutz
  • 73,191
  • 16
  • 130
  • 183
5
votes
2 answers

Print something after successfull make in Makefile.am

I am new to autotools and have managed to create a, for the moment, satisfying configure.ac. Now I would like to specify somewhere (configure.ac, Makefile.am, or wherever) that after a successfull "make", a short note is printed. Something like…
Shadow
  • 1,042
  • 2
  • 15
  • 23
5
votes
2 answers

automake+libtool+c++ = very bloated interface

First i have "include_HEADERS = 'my public headers'" and "libfoobar_la_SOURCES = 'private sources' 'private headers'". All is fine. It compile/install/link. But when i do "nm -C my_instaed_lib.so" i get: 00005be0 T yyget_debug(void*) 00005b00 T…
SQLek
  • 111
  • 5
5
votes
2 answers

autoconf recipe to use gcc-ar and gcc-ranlib

I'm using link-time optimisation (LTO) in a project that compiles under both GCC and Clang and builds a static library. It's working with GCC 4.8, but GCC 5.4 makes thin LTO objects and when automake tries to build the static library with ar it…
Bruce Merry
  • 751
  • 3
  • 11
5
votes
1 answer

How to install header files in Automake?

The following statement doesn't work: dist_include_DATA = someheaders.h which cause error: Makefile.am:8: `includedir' is not a legitimate directory for `DATA' Using: GNU Autoconf 2.65 GNU Automake 1.11.1 GNU Make 3.81
Lenik
  • 13,946
  • 17
  • 75
  • 103
5
votes
2 answers

Unable to build GNU automake

Installed automake using wget http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz ./configure --prefix=$HOME/local works fine for me. After this step, I ran make and it fails: GEN bin/automake GEN bin/aclocal GEN …
Varun Patro
  • 2,059
  • 3
  • 14
  • 17
5
votes
2 answers

how to make autotools tests read files?

my autotools project has a couple of unit-tests. one of these tests (filereader) needs to read a file (data/test1.bin) Here's my filesystem layout: - libfoo/tests/filereader.c - libfoo/tests/data/test1.bin and my…
umläute
  • 28,885
  • 9
  • 68
  • 122
5
votes
2 answers

Changing *FLAGS in configure.ac vs. caching with subprojects

Say I wish to add a specific flag to CFLAGS within my configure script, that should propagate to all subprojects' configure scripts: CFLAGS+=" -Dfoobar" export CFLAGS AC_CONFIG_SUBDIRS([sub]) This works when configure is invoked trivially. As soon…
Irfy
  • 9,323
  • 1
  • 45
  • 67