Definitions
Flow for Automake and Autocof
Input files
Features
Automake
An Autotool
Priyanka Kapoor
June 7, 2013
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
Make
Configure Script
Autoconf
Automake
Make
Make utility determines which piece of source code need to be
recompiled and it issues command to recompile only those pieces.
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
Make
Configure Script
Autoconf
Automake
Dependencies Between Files
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
Make
Configure Script
Autoconf
Automake
Source Code of Files in a Project
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
Make
Configure Script
Autoconf
Automake
Makefile for the Project
Syntax
target: prerequisite-list
TAB construction-commands
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
Make
Configure Script
Autoconf
Automake
Configure Script
A configure script can be used to aid cross-platform compiling. A
suitable configure script should interpret a Makefile.in file and then
create a platform-specific Makefile file.
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
Make
Configure Script
Autoconf
Automake
Autoconf
Autoconf is used to make configure scripts automatically and that
too with GNU coding standards.
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
Make
Configure Script
Autoconf
Automake
INs And OUTs Of Autoconf
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
Make
Configure Script
Autoconf
Automake
Automake
Automake is a programming tool that produces portable makefiles
for use by the make program, used in compiling software.
It is made by the Free Software Foundation as one of the GNU
programs, and is part of the GNU build system.
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
Make
Configure Script
Autoconf
Automake
INs And OUTs Of Automake
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
Flow for Automake and Autoconf
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
configure.ac
Makefile.am
Automake Input
Input Files
So to use automake, there are two input files. They are:
1 configure.ac
2 Makefile.ac
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
configure.ac
Makefile.am
Demo Of config.ac File
Every configure.ac should have lines like the following:
AC_INIT([hello], [0.1], [bug-report@hello.example.com],
[hello], [http://hello.example.com/])
AC_PREREQ([2.59])
AM_INIT_AUTOMAKE([1.10 no-define])
AC_CONFIG_HEADERS([config.h])
AC_PROG_CXX
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
configure.ac
Makefile.am
Explanation of config.ac File
1 AC INIT macro initializes autoconf with information about
your project, including the project name, version number,
bug-reporting address, tarball name and the project homepage.
2 AC PREREQ(VERSION) macro is optional.
3 AM INIT AUTOMAKE macro takes two arguments: the
name of the package, and a version number.
4 AM CONFIG HEADER macro names the header file which
will hold the preprocessor macro definitions at run time.
5 AC PROG CXX checks for a C++ compiler. If your project
uses C, you can check for a C compiler with AC PROG CC.
6 AC OUTPUT macro takes a list of file names which the
configure process should produce
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
configure.ac
Makefile.am
Demo of Makefile.am File
AUTOMAKE_OPTIONS = foreign
CFLAGS=-Wall -I/usr/local/include -DVERSION="$(VERSION)"
-DPROG=""$(PACKAGE)""
LDFLAGS=-L/usr/local/lib -lX11 -lXtst -lxosd
bin_PROGRAMS = getkey
getkey_SOURCES = getkey.c circ_list.c
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
Features of Automake
Automake generates a makefile that allows the user to:
1 Compile the program.
2 The makefiles produced follow the GNU Coding Standards.
3 Clean (i.e. remove the files resulting from the compilation).
4 Create a source distribution archive (commonly called a
tarball).
5 Install the program in standard directories.
6 Uninstall the program from where it was installed.
Guru Nanak Dev Engineering College priyankacool10.wordpress.com
Definitions
Flow for Automake and Autocof
Input files
Features
Thank You
Guru Nanak Dev Engineering College priyankacool10.wordpress.com

Automake

  • 1.
    Definitions Flow for Automakeand Autocof Input files Features Automake An Autotool Priyanka Kapoor June 7, 2013 Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 2.
    Definitions Flow for Automakeand Autocof Input files Features Make Configure Script Autoconf Automake Make Make utility determines which piece of source code need to be recompiled and it issues command to recompile only those pieces. Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 3.
    Definitions Flow for Automakeand Autocof Input files Features Make Configure Script Autoconf Automake Dependencies Between Files Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 4.
    Definitions Flow for Automakeand Autocof Input files Features Make Configure Script Autoconf Automake Source Code of Files in a Project Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 5.
    Definitions Flow for Automakeand Autocof Input files Features Make Configure Script Autoconf Automake Makefile for the Project Syntax target: prerequisite-list TAB construction-commands Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 6.
    Definitions Flow for Automakeand Autocof Input files Features Make Configure Script Autoconf Automake Configure Script A configure script can be used to aid cross-platform compiling. A suitable configure script should interpret a Makefile.in file and then create a platform-specific Makefile file. Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 7.
    Definitions Flow for Automakeand Autocof Input files Features Make Configure Script Autoconf Automake Autoconf Autoconf is used to make configure scripts automatically and that too with GNU coding standards. Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 8.
    Definitions Flow for Automakeand Autocof Input files Features Make Configure Script Autoconf Automake INs And OUTs Of Autoconf Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 9.
    Definitions Flow for Automakeand Autocof Input files Features Make Configure Script Autoconf Automake Automake Automake is a programming tool that produces portable makefiles for use by the make program, used in compiling software. It is made by the Free Software Foundation as one of the GNU programs, and is part of the GNU build system. Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 10.
    Definitions Flow for Automakeand Autocof Input files Features Make Configure Script Autoconf Automake INs And OUTs Of Automake Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 11.
    Definitions Flow for Automakeand Autocof Input files Features Flow for Automake and Autoconf Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 12.
    Definitions Flow for Automakeand Autocof Input files Features configure.ac Makefile.am Automake Input Input Files So to use automake, there are two input files. They are: 1 configure.ac 2 Makefile.ac Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 13.
    Definitions Flow for Automakeand Autocof Input files Features configure.ac Makefile.am Demo Of config.ac File Every configure.ac should have lines like the following: AC_INIT([hello], [0.1], [bug-report@hello.example.com], [hello], [http://hello.example.com/]) AC_PREREQ([2.59]) AM_INIT_AUTOMAKE([1.10 no-define]) AC_CONFIG_HEADERS([config.h]) AC_PROG_CXX AC_CONFIG_FILES([Makefile]) AC_OUTPUT Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 14.
    Definitions Flow for Automakeand Autocof Input files Features configure.ac Makefile.am Explanation of config.ac File 1 AC INIT macro initializes autoconf with information about your project, including the project name, version number, bug-reporting address, tarball name and the project homepage. 2 AC PREREQ(VERSION) macro is optional. 3 AM INIT AUTOMAKE macro takes two arguments: the name of the package, and a version number. 4 AM CONFIG HEADER macro names the header file which will hold the preprocessor macro definitions at run time. 5 AC PROG CXX checks for a C++ compiler. If your project uses C, you can check for a C compiler with AC PROG CC. 6 AC OUTPUT macro takes a list of file names which the configure process should produce Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 15.
    Definitions Flow for Automakeand Autocof Input files Features configure.ac Makefile.am Demo of Makefile.am File AUTOMAKE_OPTIONS = foreign CFLAGS=-Wall -I/usr/local/include -DVERSION="$(VERSION)" -DPROG=""$(PACKAGE)"" LDFLAGS=-L/usr/local/lib -lX11 -lXtst -lxosd bin_PROGRAMS = getkey getkey_SOURCES = getkey.c circ_list.c Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 16.
    Definitions Flow for Automakeand Autocof Input files Features Features of Automake Automake generates a makefile that allows the user to: 1 Compile the program. 2 The makefiles produced follow the GNU Coding Standards. 3 Clean (i.e. remove the files resulting from the compilation). 4 Create a source distribution archive (commonly called a tarball). 5 Install the program in standard directories. 6 Uninstall the program from where it was installed. Guru Nanak Dev Engineering College priyankacool10.wordpress.com
  • 17.
    Definitions Flow for Automakeand Autocof Input files Features Thank You Guru Nanak Dev Engineering College priyankacool10.wordpress.com