detect_lowlevel.py files

David Faure faure at kde.org
Sun Jan 8 23:01:36 CET 2006


On Sunday 08 January 2006 22:54, Jaison Lee wrote:
> Has there been discussion concerning duplication of effort in the
> various detect_lowlevel.py files for the various operating systems?
> They will always be different of course, but right now these files
> bare no resemblence to each other whatsoever. :)
> 
> Also, has there been discussion on what to do with common tests across
> operating systems? These could either be combined into the upper level
> lowlevel.py, or have different (identical) checks for each OS. Either
> way is perfectly workable, but I don't think we should try to mix
> both, or else it would be difficult to determine the location of
> tests.
> 
> I would lean in favor of keeping all tests separate myself. The
> downside is duplication of identical tests, but the reality is that
> few developers will have the ability to test for every targetted OS.
> It also preemptively solves the problem of dealing with tests that
> work for several but not all targetted OS.

Which tests are you thinking about more precisely?
I would like most tests to *NOT* be in *lowlevel.py anyway,
but rather in the source directory where they are needed (see the thread "modular configuration").

And I disagree that you need to test all targetted OS, for simple things.
When looking for a header file like limits.h, for some kdecore source file,
there should be only one line to add to a file under kdecore/, which tests
whether limits.h exists or not - this applies to all OSes, without the need to
duplicate the test.

Testing for headers and functions and anything else that the compiler can check,
can be done with one piece of code for all systems - duplication is a maintainance hell.

Some other things (like X11_RGBFILE :) of course are OS-specific, but we
should try to keep those at a minimum.

-- 
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-buildsystem mailing list