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
19
votes
2 answers

Autotools : how to set global compilation flag

I have a project with several sources directories : src/A /B /C In each, the Makefile.am contains AM_CXXFLAGS = -fPIC -Wall -Wextra How can avoid repeating this in each source folder ? I tried to modifiy src/Makefile.am and the…
Barth
  • 15,135
  • 20
  • 70
  • 105
19
votes
7 answers

User of autotools-generated tarball gets error message: aclocal-1.13: command not found

I am distributing a tarball with installation scripts generated by autoconf version 2.69. Works fine on many different machines. Now a user, working on a fresh Arch Linux system, reports that configure executes properly, but make immediately…
Joachim W
  • 7,290
  • 5
  • 31
  • 59
19
votes
8 answers

Is it worth learning GNU Make?

I'm lately feeling the need to learn a build tool. I'm looking through StackOverflow for recommendations and Gnu Make gets barely mentioned. Instead I see Ant, Maven, CMake, Scon and many others. However, when I look at the little "rogue sources"…
Michael Ekoka
  • 19,050
  • 12
  • 78
  • 79
17
votes
2 answers

Placing header files in a subdirectory of /usr/include with automake?

If I write a library, and have header files for development included, and have a src/Makefile.am like this: AM_CFLAGS = -std=c99 -Wall -Werror -Os lib_LTLIBRARIES = libmylibrary.la libmylibrary_la_SOURCES = a.c b.c include_HEADERS = a.h…
Delan Azabani
  • 79,602
  • 28
  • 170
  • 210
17
votes
3 answers

autoconf/automake: conditional compilation based on presence of library?

I need to conditionally compile some code based on the presence of a library. Seems like this should be easy with autoconf/automake but I can't figure it out. For example, if there is a PNG library present, I want to include code to use it. My…
Ian Macky
  • 197
  • 1
  • 1
  • 6
17
votes
2 answers

Autotools - tar This does not look like a tar archive

After running make distcheck I get the message that I have successfully built the package and is ready for distribution. If I untar the tar.gz with tar -zxvf hello-0.2.tar.gz it successfully extracts all of its contents. However, when I try to…
denim69
  • 179
  • 1
  • 1
  • 3
17
votes
2 answers

"AM_PROG_LIBTOOL" not found in library

I got an error while trying to compile a library in centOS 7, and i tried reinstall libtool but it does not help. Below is the error + autoreconf --install configure.ac:32: warning: macro 'AM_PROG_LIBTOOL' not found in library configure.ac:32:…
Moses Liao GZ
  • 1,556
  • 5
  • 20
  • 45
17
votes
2 answers

How to set a define through "./configure" with Autoconf

I have one project that can generate two diferent applications based on one define. libfoo_la_CXXFLAGS = -DMYDEFINE I have to modify the Makefile.am to set this define, so it is not automatic. Can I set this define somehow through the configure…
Luiz Antonio
  • 223
  • 1
  • 2
  • 6
16
votes
3 answers

Install data directory tree with massive number of files using automake

I have a data directory which I would like automake to generate install and uninstall targets for. Essentially, I just want to copy this directory verbatim to the DATA directory, Normally, I might list all the files individually, like…
Jeremy Salwen
  • 8,061
  • 5
  • 50
  • 73
16
votes
1 answer

automake subdir-objects is disabled

I'm getting the below error with automake. I know you can put AUTOMAKE_OPTIONS = subdir-objects" at the top of Makefile.am. But how can I set this behaviour for all files, so I don't need to do it case by case? Makefile.am:454: warning: source file…
jaseUK
  • 303
  • 2
  • 4
  • 11
15
votes
4 answers

How to disable Automake docs?

I'm trying to update Automake on a really old CentOS machine. The build is failing with: $ make -j 4 ... MAKEINFO doc/automake.info /home/scripts/automake-1.15.1/lib/missing: line 81: makeinfo: command not found WARNING: 'makeinfo' is missing on…
jww
  • 97,681
  • 90
  • 411
  • 885
15
votes
4 answers

automake error: no proper invocation of AM_INIT_AUTOMAKE was found

I am new in autotools, and following this tutorial. but I could not solve this errors, $ automake configure.ac: error: no proper invocation of AM_INIT_AUTOMAKE was found. .. Makefile.am: error: required file './depcomp' not found …
arslan
  • 2,034
  • 7
  • 34
  • 61
15
votes
3 answers

How to create a Debian package as part of autotools build?

All of the Debian packaging examples I can find assume the user is re-packaging from an upstream build, so it unpacks a source tarball, configures, rebuilds, and re-packages. I'm trying to build a package for my own library, which is built using…
CAB
  • 1,015
  • 1
  • 14
  • 24
14
votes
2 answers

Error in automake

I’ve trying to create install package for hello world sample C program. I’ve done following staps. autoscan mv configure.scan configure.ac edit configure.ac to add some macros. aclocal create Makefile.am within bin_PROGRAMS = hello hello_SOURCES =…
user1345414
  • 3,745
  • 9
  • 36
  • 56
14
votes
4 answers

Why would autoconf/automake project link against installed library instead of local development library?

I'm creating a library libgdata that has some tests and non-installed programs. I am running into the problem that once I've installed the library once, the programs seem to be linking to the installed version and not the local version in…
Beau Simensen
  • 4,558
  • 3
  • 38
  • 55
1
2
3
72 73