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

FFF fake function with google test

I am trying to test my C library with google test but I'm having trouble mocking functions with the fff.h framework. This is my file structure: . ├── Makefile.am ├── configure.ac ├── include │   ├── Makefile.am │   └── public_header.h ├── src │  …
ZeppRock
  • 988
  • 1
  • 10
  • 22
4
votes
3 answers

C/C++: Add -I option automatically for indirect include using automake

I have two projects being built using Automake. Here are simplified versions of the Automake.amS: AM_CPPFLAGS = -I/some/include_path lib_LTLIBRARIES = libfoo.la libfoo_la_SOURCES = foo.cpp libegfconfig_la_LIBADD = -lxml2 and AM_CPPFLAGS =…
deuberger
  • 3,578
  • 6
  • 31
  • 33
4
votes
2 answers

Installing Make in Cygwin

I am trying to build a Linux project in windows 7 environment usign cygwin. However I am continuously getting below error while configuring make for cygwin installation. -bash: make: command not found After searching on inernet the only solution is…
aneela
  • 1,457
  • 3
  • 24
  • 45
4
votes
0 answers

Automake generates an empty .dirstamp file

I added 'AUTOMAKE_OPTIONS = subdir-objects' to Makefile.am and a .dirstamp was created, what is .dirstamp and what's the relationship between 'subdir-objects' and this file?
cuihaikuo
  • 115
  • 1
  • 9
4
votes
1 answer

How do I write a custom silent rule in automake?

I'm working on an automake project and we have a custom assembler, compiler, and linker. Currenlty building those custom targets shows the entire command line: knucc -c -L/some/path/here -I/some/path/include -I/some/other/path -o foobar.o…
Nick
  • 2,342
  • 28
  • 25
4
votes
2 answers

Switching to dynamic linking

I'm building some packages with autoconf and automake, and would like to make sure libraries are dynamically linked (i.e. no static links). How should one set up the autotools to force dynamic library linking?
ajwood
  • 18,227
  • 15
  • 61
  • 104
4
votes
2 answers

Replace AC_CHECK_LIB in CMake

I'm converting a project from Autotools to CMake. We have a configure.ac file, with the statement: AC_CHECK_LIB([gsuffix], [gsuffix_create], [], AC_MSG_ERROR([Can not find gsuffix library])) I want to replace it to cmake, and not sure how (it…
Eyal H
  • 991
  • 5
  • 22
4
votes
1 answer

Are "configure" and "config.status" processes or input files?

In the flowchart of autoconf and automake from https://en.wikipedia.org/wiki/Automake , are "configure" and "config.status" processes or input files? Their representations are confusing to me, according to the legend in the bottom right…
Tim
  • 1
  • 141
  • 372
  • 590
4
votes
3 answers

How do I remove -Werror from autotools-generated makefiles?

I am compiling a large library which uses the autotools build process. There are many makefiles. Each of them are getting CFLAGS = .... -Werror. When I attempt to compile there are some minor warnings which kill the build on my setup. I would like…
4
votes
1 answer

GNU Automake - build dynamic libraries statically linked against its dependencies

By default, libtool creates two versions of library - static one and dynamic one and that's what I need. I also need that my library, no matter what type is it - static or dynamic, will be linked statically against certain dependencies (several .a…
peetonn
  • 2,942
  • 4
  • 32
  • 49
4
votes
1 answer

Linking against external libraries in gstreamer plugin using autotools

I have written a gstreamer plugin using the boilerplate template refrenced in the gstreamer plugin writers guide (http://gstreamer.freedesktop.org/data/doc/gstreamer/head/pwg/html/chapter-building-boiler.html). I first built the plugin without full…
RyanL
  • 458
  • 3
  • 14
4
votes
2 answers

autotools is there a short for AC_ARG_ENABLE action-if-given

I may need to add a lot of AC_ARG_ENABLE, currently I'm using the syntax below which is the only I got working, but I wonder if there's already some m4 macro for a simple action-if-given test as I'm using (I did some search but found nothing yet) or…
Alex
  • 3,264
  • 1
  • 25
  • 40
4
votes
3 answers

When converting to libtool automake and autoconf can't find libtool

I'm trying to convert libcsv to use libtool so I can use it on mac os x without mangling the makefile. When I try to run the makefile generated from the tools I get the following error: ~/software/libcsv (gnu_tools) $ make tag=CC --mode=compile…
robertpostill
  • 3,820
  • 3
  • 29
  • 38
4
votes
2 answers

Can't make automake to use C++11

I'm working on some project and it seems that I can't make automake script to use C++11. In rootdir of my project I have file Makefile.am which look like this (it was automade by eclipse): SUBDIRS=src Then in /rootdir/src I have Makefile.am that…
golobitch
  • 1,466
  • 3
  • 19
  • 38
4
votes
2 answers

AC_SUBST does not expand variable

In an Autotools project I am trying to generate parts of my .conf file. The program needs to read from $(pkgdatadir), but I know that that variable is only set in Makefile.in, so I instead substituted datadir and PACKAGE. configure.ac: …