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

Using the pkg-config macro PKG_CHECK_MODULES failing

I'm sure this is a fairly simple problem. I have a very simple configure.ac file which I am using to just learn how autoconf & pkg-config work together. The confgure.ac file looks like: AC_PREREQ(2.61) AC_INIT(autoconf_test, 1.0,…
ericg
  • 8,413
  • 9
  • 43
  • 77
13
votes
3 answers

Automake Variables to tidy up Makefile.am

I have a directory /src containing all of my source files, and /bin to store all binary after running make command. The directory is something like below: /BuildDirectory - - /src - - /bin - - configure - - Makefile.am - - configure.ac - - ...…
w00d
  • 5,416
  • 12
  • 53
  • 85
13
votes
3 answers

PKG_CHECK_MODULES syntax error near luajit

I'm new to GNU autotools.In my project when i try ./configure it generates following error : ./configure: line 9852: syntax error near unexpected token `luajit,' ./configure: line 9852: ` PKG_CHECK_MODULES(luajit,…
Prabhakar
  • 513
  • 1
  • 5
  • 22
13
votes
3 answers

How do I specify in a Makefile.am script that I only want to compile object .o files?

I have a Makefile.am which will be responsible for building a final application binary: project/src/Makefile.am Also in the src directory is a sub-directory called ctrnn which contains an additional Makefile.am: project/src/ctrnn/Makefile.am Now,…
Ben J
  • 1,367
  • 2
  • 15
  • 33
13
votes
3 answers

How to build *.so module in Automake and a libtool-using project?

I have the same problem as others have: I have a *.la file generated by libtool in an Automake project (e.g. module.la), but I need the *.so of it to use it for dlopen() (eg. module.so). But: project is configured and built with --disable-shared…
towi
  • 21,587
  • 28
  • 106
  • 187
12
votes
1 answer

Can't turn off gcc optimizer, Makefile from automake

I am trying to get ZBar in a debug session. I am able to do so, but I can't get the optimizer to turn off, so my debug session jumps around unexpectedly and many variables are labeled as optimized-out in Eclipse Indigo. I am running in Ubuntu. I…
vlad417
  • 313
  • 1
  • 3
  • 10
12
votes
2 answers

speed up autoconf/configure of large project

I have a large autoconf/automake project, broken into components using AC_CONFIG_SUBDIRS. Is there any way to make autoconf/configure run faster? Perhaps doing subdirs in parallel, or caching reusable findings? I could easily write a build script…
CAB
  • 1,015
  • 1
  • 14
  • 24
12
votes
2 answers

How to check the OS with automake

I have a project that uses automake to create the configure and all related files (I'm using autoreconf command to make all this stuff). So, I'm trying to set some conditional files to compile when the project is compiling for macOS (OS X), Windows…
melchor629
  • 242
  • 3
  • 11
12
votes
4 answers

how to create binary and .so using libtool

I have a set of cpp files that I want to compile directly into a binary and also to compile into a shared library. I have bin_PROGRAMS=mybin lib_LTLIBRARIES=libmylib.la COMMON_SOURCES=f1.cpp f2.cpp f3.cpp mybin_SOURCES=main.cpp…
pm100
  • 48,078
  • 23
  • 82
  • 145
12
votes
2 answers

How are .Po files created in Makefile?

I have changed Makefile of a project and now when I make it, it returns:- ERROR: "make[2]: *** No rule to make target ../libvmi/driver/.deps/xen.Po. Stop. " How does Makefile create .Po files and how can I disable creating it for a certain file…
Peggy
  • 639
  • 9
  • 28
12
votes
2 answers

How to use protocol-buffers with autoconf/automake?

Looking for a good example of autoconf and automake rules for building a project that uses protocol buffers, best way to add protoc to the build process?
Aaron
  • 1,141
  • 1
  • 11
  • 21
12
votes
2 answers

Correcting the GCC command line ordering using Automake

I have an autotools project that compiles just fine on the Mac, but under Linux (Ubuntu 12.04.1 LTS) the command lines passed to gcc have the libraries out of order relative to the object files. For example, autotools generates the following command…
Pridkett
  • 4,883
  • 4
  • 30
  • 47
12
votes
2 answers

Makefile.in and variable substitution

In Makefile.in I see variable definition where an external variable name is enclosed between two @ symbols # @configure_input@ package = @PACKAGE_NAME@ Where those external variables come from? Also, I couldn't find in GNU manual what does exactly…
pic11
  • 14,267
  • 21
  • 83
  • 119
11
votes
2 answers

automake and project dependencies

I have a project that I want to build using automake. The project consists of different components or modules, and there are inter module dependencies which require the project to be built in a specific order. For example: project dir/ module1…
Homunculus Reticulli
  • 65,167
  • 81
  • 216
  • 341
11
votes
1 answer

How to generate a source file when building using autotools

With Make, I do something like generated.c: input.txt generator ./generator input.txt > generated.c How would I get equivalent functionality out of autotools? (removing generated.c on cleaning would also be a bonus).
Jeremy Salwen
  • 8,061
  • 5
  • 50
  • 73
1 2
3
72 73