start page | rating of books | rating of authors | reviews | copyrights

Unix Power ToolsUnix Power ToolsSearch this book

40.4. Simplifying the make Process

One of the problems associated with building and installing software within a Unix environment is ensuring that all the necessary libraries are present, the makefile is modified to fit the environment, and so on. The general building process is simplified by two GNU utilities: autoconf and automake.

The autoconf utility takes an input file called configure.in containing macros that determine how a configure file is built. The configure file, usually called Makefile.in, is then used by automake to create a Makefile that can be used to compile the application.

A README file should provide instructions on building an application, but if one is absent, you know that the application supports autoconf if you see a configure.in file, or see a script file called configure. If the package creator built a configure script manually, instructions will most likely be included within the README.

As a demonstration, I downloaded a GNU library called plotutils that provides graphics capability. After running gunzip and tar on the package to decompress the files, I looked at the topmost directory and found a configure file. I ran this using the following command:

> ./configure

The application can actually take a bit of time, and when finished, Makefiles have been generated for the application directories. All that's required at this point is to run make install as root:

> make install

Once the build was finished, I cleaned up by typing:

> make clean
> make distclean

The first make cleans up any in-process installation files; the second cleans up the distribution files.

The autoconf and automake utilities have greatly simplified installation of GNU and open source functionality.

-- SP



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.