Compilation with srcdir != builddir

David Faure faure at kde.org
Fri Mar 11 15:46:21 GMT 2005


On Friday 11 March 2005 16:31, Luciano Montanaro wrote:
> El Viernes 11 Marzo 2005 16:27, David Faure escribió:
> > On Friday 11 March 2005 16:23, Luciano Montanaro wrote:
> > > In this case, shouldn't the INCLUDE line in kjs/Makefile.am
> > >
> > > INCLUDES = -I$(top_srcdir) $(PCRECFLAGS) $(all_includes)
> > >
> > > read
> > >
> > > INCLUDES = -I$(top_srcdir) -I$(top_builddir) $(PCRECFLAGS)
> > > $(all_includes)
> > >
> > > instead? Otherwise, the generated global.h file will not be found.
> > > I've not tested with kdelibs sources, actually, I noticed this while
> > > experimenting with kdenox.
> >
> > top_builddir is also known as ".", and -I. is automatically part of
> > $(all_includes). This works fine in kdelibs, so this must be a kdenox
> > bug.
> 
> Ok, thanks. Yes, it's a problem with kdenox because kjs is a directory two 
> levels under "." (kdesrc/kjs).

Hmm, make is recursive, so "." is "builddir", not top_builddir. I said nonsense above.
top_builddir is indeed not part of the includes (at least I can't see what would put it there).
I wonder if kjs really compiles with automake and srcdir!=builddir (with no installed kjs/global.h header).
It works with unsermake, since it adds -I../kjs automatically - does automake do that too?

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).




More information about the kde-core-devel mailing list