GNU Build Utilities

Peter L. Peres plp-ysDPMY98cNQDDBjDh4tngg at public.gmane.org
Sun Oct 3 08:21:32 UTC 2004


On Fri, 1 Oct 2004, John Wildberger wrote:

> On Friday 01 October 2004 04:24 pm, Peter L. Peres wrote:
>> On Thu, 30 Sep 2004, John Wildberger wrote:
>>> I would like to use the GNU build utiities automake and autoconfig to
>>> generate an executable file from a simple c program.
>
>>> John
>>
>> Automake/autoconfig tutorials do not fit in an email but did you look at
>> 'info automake' -> Examples -> Hello ?
>>
>> Peter
> Well, I have to admit it, I approached this problem with a very simplistic
> attitude. My c program is only a few lines long and contains only the bare
> minimum to print Hello World.
> Following your advice I got hold of the Example "hello-1.3.tar.gz"  .
> I untared it, then used configure, make and then make install.
> Lo and behold I got an executable file called 'hello' that printed happily
> 'Hello, World!
> Examining all the produced files I was in for some surprises.
> The source c file is 263 lines long,
> There are 35 files in the source tree.
> The configure file is 554 lines long
> The Makefile is only 124 lines long.
> Most of the other files are a mystery in their makeup and usage.
> Enough said, I will stick with simple cc compiler and let the wizards worry
> about the GNU build system.

The point was that that is precisely the example you asked for (the right 
program too, apparently). It's your choice, just for the record: I 
seldomly use autoconf because if you write programs cleanly it only takes 
a few #defines to adjust it to any *nix environment. What autoconf really 
does is, it provides a way to write those defines in a way that others, 
and machines, understand. Also, most lines in the source files are 
comments for your convenience and illustrate how things are done.

Peter
--
The Toronto Linux Users Group.      Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml





More information about the Legacy mailing list