On Friday 26 May 2006 08:29, Oron Peled wrote:
> On Thursday, 25 בMay 2006 09:17, Ami Chayun wrote:
> > Oron, Thanks for the answer. It was indeed the mistake.
> > The situation is a bit more complicated though.
> > My api.h is generated from api.h.in
>
> OK, but it does not affect the Makefile.am hierarchy or
> content -- it is handled only by autoconf/autoheader
> (through definitions in configure.ac) and then by configure.

When I run make autoheader runs automatically. Is it normal behaviour? Perhaps 
my project is not configured correctly?

> > I decided to go for the following solution (in the top level
> > Makefile.am): pkginclude_HEADERS = include/something.h include/api.h
> > This is in order to avoid include/Makefile.am
>
> It's not bad, but if you decided to have include/Makefile.am than
> it would contain only a single line:
>     pkginclude_HEADERS = something.h api.h
> (a single line Makefile.am)
>
Is it considered good practice? I was avoiding it since I did not want to 
clutter the include dirs with more files.

> > In the beginning of my configure.ac I have:
> >   AM_CONFIG_HEADER(include/api.h)
>
> That's stays regardless of your Makefile.am layout.
>

There is an issue I am a bit confused about. I understand that when I place a 
file in a AM_CONFIG_HEADER statement, I do not need to include it in 
AC_OUTPUT
Does this mean automake reads all the macros in the header, and will use them 
in all Makefiles in the project?

> > When I run ./configure && make I get errors in the spirit of:
> >
> > autoheader2.50: warning: missing template: SOCK_PATH
> > autoheader2.50: Use AC_DEFINE([SOCK_PATH], [], [Description])
> >
> > If I remove include/api.h from the Makefile.am, everything works
> > like a charm.
>
> Did you forget running aclocal before autoconf/automake/autoheader?
> Looks like your configure.ac reference this macro (SOCK_PATH)
> and your project does not contain a local version of the macro
> definition.

I reran the toolchain, still I get the errors when I run make (again, only 
when I include api.h in pkginclude_HEADERS

SOCK_PATH is defined in api.h.in which is included as AM_CONFIG_HEADER in 
configure.ac
I was hoping the macros will be passed on to the other parts of the projects 
(namely the Makefiles).


Thanks again for the invaluable guidance.

Ami

================================================================To unsubscribe, 
send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to