Here is just a proposal:

1. Place os neutral code in one directory
2. place os dependant code in platform specific directories
3. create an initial SIMPLE makefile and a config.h for each supported
platform/compiler combination

I know this isn't hightech, but it works like a charm.

4. write all other build tools in Perl

5. use uuids to identify packages, not name, this way my MY::TextModule and
your MY::TextModule can be identified as two different packages, OR require
that I do something like harlinn::no::MY::TextModule when I name my
packages/modules.

6. And please don't use fork at any time during the build process

Ideally only the following tools should be needed during the initial build
process:
        1. The simplest version of make ever written
        2. A modern C/C++ compiler
        3. A linker

To test for the presence of a particular library and associated include
files maintain a list of filenames
for each supported platform/compiler combination. Like:

ACE: LIB=E:\src\Corba\ACE_wrappers\bin\ace.lib;
INCLUDE=E:\src\Corba\ACE_wrappers;E:\src\Corba\ACE_wrappers\TAO
TCL: LIB=C:\Tcl\lib\tcl83.lib INCLUDE=C:\Tcl\include
DEFINES="WIN32";"WINNT=1" // a comment
DB2: LIB=C:\SQLLIB\lib\db2api.lib;C:\SQLLIB\lib\db2cli.lib
INCLUDE=C:\SQLLIB\include

and so on ...

or in other words:
<platform independent package name>: LIB=[<optional fullpath to
library>[;<optional fullpath to next library>]]
        INCLUDE=[<optional fullpath of directory>[;<optional fullpath to next
directory>]]
        DEFINES="NAME1=VALUE1";"NAME2=VALUE2"  // Comments

My point is that the format of this file should be kept really simple and
used during the next stage of the build process
to generate the final build. If a package is missing from this file, then
it's not included in the final build.

Best regards
Espen Harlinn

Reply via email to