automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Possible to use Automake without Autoconf/config script?


From: Stephen Torri
Subject: Re: Possible to use Automake without Autoconf/config script?
Date: 16 Apr 2003 23:29:20 -0500

On Wed, 2003-04-16 at 22:33, address@hidden wrote:
> Bob
> 
> Thanks for your reply. Why is a Makefile.in even
> necessary though??? All the portability magic
> of Autoconf is done thru a config.h (*just* a list of
> #define's right?) that gets included in source code!!!

You are right but not totally. Autoconf does indeed perform analysis of
various conditions of the system to set these config.h #define
correctly. What it also allows you to do is setup Makefile variables
which can determine the direction a build takes on a system. For example
you might have:

project_mastermind
  |
  |- Windows genius extensions
  |- Linux genius extensions
  |- MAC OSX genius extensions
  |- generic genius

Now if I use Linux then I do not want to compile anything other than the
generic files and the Linux extensions. By using these Makefile
variables in a Makefile.in I can do just that.

> What is the Makefile.in->Makefile step gaining
> us???  Why not Makefile.am->Makefile without
> the middle step??... We'll still get the benefits
> of Autoconfi via the config.h!!!!

The way in which automake and autoconf are designed was to be two
seperate steps in the process. Automake handles the conversion of simple
Makefiles like:

SUBDIRS = Linux Windows MAC_OSX

bin_PROGRAM = mastermind

mastermind_SOURCES = ....

Into a more complex but platform independent state (Makefile.in).
Autoconf specializes in library and header detection, OS and platform
specific tests, etc.

By have this two step process it not only simplifies the work that you
must do as a user it also simplifies the development process. So I hope
you can see that automake (taking the users Makefile.am file) and
autoconf (using the configure.ac file) do just what you want to do. They
provide "one suite" used to create the required Makefiles for a
platform.

To truly utilize the power of automake and autoconf as a developer you
create your Makefile.am files for your project. You place your
"intelligence" in the configure.ac file. Together these two eliminate
the manual production of the Makefile.in and Makefile. This power can be
extended through the use of m4 files but that is too much for this
discussion. You can get a lot from the automake and autoconf manuals on
the www.gnu.org website.

Stephen

-- 
Stephen Torri <address@hidden>





reply via email to

[Prev in Thread] Current Thread [Next in Thread]