harald
KDE
Posted by harald
 in KDE
 on Sunday, February 26, 2006 @ 17:07

The more I play with scons/bksys, the more I like it. I just submitted the last few patches to get kdelibs/main compiling on my machine. My current challenge is to get the bootstrapped applications to use the freshly built libs instead of the already installed ones.

One Response to “scons’ing kdelibs”

» Posted by Johannes Sixt
 on Monday, February 27, 2006 @ 14:55

I’ve read SCons docs some months ago and came to the conclusion that it
does not fit my style of development. Please prove me wrong!

Given a project’s source tree (e.g. in directory foo-0.1.1) that uses
auto-tools (or unsermake), i can do this:

mkdir bdebug bxcompile boptimized
cd bdebug && ../foo-0.1.1/configure CXXFLAGS=”-O0 -g”
cd ../bxcompile && ../foo-0.1.1/configure CXX=”ppc-foobar-g++” \
–prefix=/xcompile/ppc/usr/local
cd ../boptimized && ../foo-0.1.1/configure \
CXXFLAGS=”-O3″ CXX=”g++ -mpentium4″ –enable-optimized

As you can see, I can create as many different builds as I like without
touching the source tree. And I can even change build settings on the
fly for single files:

cd ../boptimized
make
rm main.o # want to debug this file
make CXXFLAGS=”-O0 -g” main.o # turn on debug info for single file
make

If I understand the SCons docs correctly, it should also be possible to
create lots of different build trees, but it requires to edit some SCons
file that is part of the source tree _and_ is version controlled. Is
this correct?

And having different build options for single files is a night mare.
(Basically, use -v to see the compiler invocation, invoke compiler
manually.) Right?