KDE/kdelibs

LiuCougar liucougar at gmail.com
Wed Oct 12 17:34:24 CEST 2005


On 10/12/05, Ralf Habacker <ralf.habacker at freenet.de> wrote:
> Am Mittwoch, 12. Oktober 2005 17:09 schrieb LiuCougar:
> > On 10/12/05, Ralf Habacker <ralf.habacker at freenet.de> wrote:
> > > Am Mittwoch, 12. Oktober 2005 14:59 schrieb LiuCougar:
> > > > On 10/12/05, Ralf Habacker <ralf.habacker at freenet.de> wrote:
> > > > > Am Mittwoch, 12. Oktober 2005 04:24 schrieben Sie:
> > > > > > SVN commit 469699 by liucougar:
> > > > > >
> > > > > >   # better dummy.cpp support
> > > > > >   # updated amtool.py to read libraries/programs/headers/includes
> > > > > >   # new am2bksys.py module: use
> > > > > >         python bksys/am2bksys.py
> > > > > >         to run it
> > > > > >   # now subdirs: kparts, kutils, kdeprint, khtml, kde3support
> > > > > > compilable
> > > > >
> > > > > great work. I have some little issues, see below
> > > > >
> > > > > >  A             khtml/css/SConscript
> > > > > >  A             khtml/dom/SConscript
> > > > > >  A             khtml/ecma/SConscript
> > > > > >  A             khtml/html/SConscript
> > > > > >  A             khtml/imload/SConscript
> > > > > >  A             khtml/imload/decoders/SConscript
> > > > > >  A             khtml/java/SConscript
> > > > > >  A             khtml/misc/SConscript
> > > > > >
> > > > > >
> > > > > > includes = '#/dcop #/kio #/libltdl #/khtml #/kutils '
> > > > >
> > > > > I think it would be better not to refer the build  dir instead the
> > > > > dirs in kdelibs should be referenced
> > > > >
> > > > > includes = 'dcop kio libltdl khtml kutils '
> > > >
> > > > AFAICT (from generic.py fixpath function), without leading #, both
> > > > build and source dir will be included (not the opposite
> > >
> > > ... which is required. Includes files are in the source tree and some
> > > generated source files like moc and dcopidl produced files are located in
> > > the build dir tree and must be included. scons has an option to copy all
> > > source files into the build dir, but this is disabled for bksys.
> >
> > ah, I misunderstood you.
> >
> > Then without # or /, a dir will be treated as relative one, so if change it
> > to: includes = 'dcop kio libltdl khtml kutils '
> >
> > It won't compile any more.
>
> > I introduced a double # prefix, which will add both dirs, so this will
> > achieve what you said:
> > includes = '##/dcop ##/kio ##/libltdl ##/khtml ##/kutils '
> >
> > But as in Makefile.am, not every build dir is useful, so I think we
> > should only add ## to those necessary ones
> >
> sorry, this was a example if all directories would be subdirectories from
> recent subdir. I try to explain more in detail
>
> kdeui for example uses the following include statement
>
> INCLUDES= -I$(top_srcdir)/kdefx -I$(top_srcdir)/interfaces $(all_includes)
>
> Thee examples:
>
> 1. includes = '../kdefx ../interfaces'
>
> -> includes <source-root>/kdefx   <build-root>/kdefx
>                     <source-root>/interfaces  <build-root>/interfaces
>
>
> 2. includes = '#/kdefx #/interfaces'
>
> -> includes <build-root>/kdefx   <build-root>/interfaces
>
>
> 3. includes = '##/kdefx ##/interfaces'
>
> -> includes <source-root>/kdefx   <build-root>/kdefx
>                     <source-root>/interfaces  <build-root>/interfaces
>
> Are I'm right ?
Not exactly:
> 1. includes = '../kdefx ../interfaces'
>
-> includes <source-current-dir>/../kdefx   <build-current-dir>/../kdefx
                     <source-current-dir>/../interfaces 
<build-current-dir>/../interfaces

Yes, the net result is the same as yours, but it is not so easy to map from
-I$(top_srcdir)/kdefx to ../kdefx
(the script has to decide the dir hierarchies)

>
> 2. includes = '#/kdefx #/interfaces'

-> includes <source-root>/kdefx   <source-root>/interfaces

These logics are in generic.py -> fixpath function

--
"People's characters are strengthened through struggle against
difficulties; they are weakened by comfort."
- Old Chinese adage


More information about the Kde-buildsystem mailing list