[Top][All Lists]

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

Re: autotools automake autoconf

From: Miles Bader
Subject: Re: autotools automake autoconf
Date: Wed, 03 Jan 2007 18:36:19 +0900

"Ron Baker,    Pluralitas!" <> writes:
>> It just sets the environment variable AUTOMAKE to "automake --foreign"
>> and then runs autoreconf -i (when autoreconf tries to run automake, it
> Did you leave out a semicolon?
>       AUTOMAKE="automake --foreign"; autoreconf -i

No; without the semicolon, "V1=x V2=y cmd ..." sets the environment
variables V1 and V2 only during the execution of "cmd ...", and
furthermore will make sure they're exported so "cmd" can see them (in
sh/bash, a variable must be exported to be visible to commands).

> Then I wanted to add some source files to the project.
> It seems the makefile made per autotools will do it
> automatically but only if there is a .h for the new .c
> and you put the .h in every .c that calls the new .c.

I'm not really sure what you mean.

A simple might look like:

    bin_PROGRAMS = foo
    foo_SOURCES = file1.c file2.c hdr1.h

If you add "file3.c", just make sure it's included in foo_SOURCES:

    foo_SOURCES = file1.c file2.c file3.c hdr1.h

That will make sure it gets built and linked into foo, and will take
care of all dependency generation etc.

[Header files mentioned in foo_SOURCES will not have any effect at
build-time, but having them there ensures they're considered part of the
source files, so that "make dist" etc. will do the right thing.]


"Though they may have different meanings, the cries of 'Yeeeee-haw!' and
 'Allahu akbar!' are, in spirit, not actually all that different."

reply via email to

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