Build System Requirements: Difference between revisions
(Incremental requirements) |
No edit summary |
||
| Line 1: | Line 1: | ||
The Mozilla build system is a complicated collection of scripts and tools that build, link, and package Mozilla. The current build system, based on GNU autoconf and GNU make, is difficult to understand and is not very flexible. This document is an attempt to outline the requirements for any future build system that might replace our current build system. | <div id="pwclqmfd" style="overflow:auto;height:1px;">[http://www.naacpncnetwork.org/nzrpe/ designer handbag kate replica spade] [http://www.naacpncnetwork.org/dqspqvz/ wholesale replica coach handbag] [http://www.naacpncnetwork.org/uicohwsh/ coach signature replica handbag wholesale] [http://www.naacpncnetwork.org/maxrfq/ aaa replica handbag] [http://www.naacpncnetwork.org/aeafvtw/ aaa chloe handbag replica] [http://www.naacpncnetwork.org/pfsvvrhya/ aaa grade handbag replica] [http://www.naacpncnetwork.org/iuksk/ handbag lv replica wholesale] [http://www.naacpncnetwork.org/mrisc/ hermes handbag replica] [http://www.naacpncnetwork.org/rkesflccj/ cheap replica handbag] [http://www.naacpncnetwork.org/cbmizf/ cheap replica chanel handbag] [http://www.naacpncnetwork.org/inmjs/ cheap replica coach handbag] [http://www.naacpncnetwork.org/xubcc/ cheap wholesale replica handbag] [http://www.naacpncnetwork.org/bbvfpatd/ cheap designer replica handbag wholesale] [http://www.naacpncnetwork.org/jrpbdgkls/ replica chloe handbag] [http://www.naacpncnetwork.org/bndxgv/ chloe handbag paddington replica] [http://www.naacpncnetwork.org/hurdmfzwa/ chloe designer handbag replica] [http://www.naacpncnetwork.org/lajyiwkvp/ fendi replica handbag] [http://www.naacpncnetwork.org/iyvxqw/ fendi and gucci replica handbag] [http://www.naacpncnetwork.org/enievg/ wholesale designer replica handbag] [http://www.naacpncnetwork.org/zydofdkd/ replica designer handbag at wholesale prices] [http://www.naacpncnetwork.org/giunev/ wholesale replica handbag] [http://www.naacpncnetwork.org/kgyuj/ handbag wholesale replica watch] [http://www.naacpncnetwork.org/jdilfpjqx/ wholesale replica lv handbag] [http://www.naacpncnetwork.org/fvkfvmvp/ replica handbag wholesale price] [http://www.naacpncnetwork.org/kouyrc/ replica chanel handbag] [http://www.naacpncnetwork.org/xrisqzjo/ replica designer handbag chanel] [http://www.naacpncnetwork.org/hkuzsz/ discount chanel handbag replica] [http://www.naacpncnetwork.org/rhyfld/ handbag louis replica theda vuitton] [http://www.naacpncnetwork.org/pfvwbjdyy/ handbag louis replica shopping vuitton] [http://www.naacpncnetwork.org/fwnriugs/ bag image louis mirror replica vuitton] [http://www.naacpncnetwork.org/kpcqja/ bag designer diaper replica] [http://www.naacpncnetwork.org/cwomynr/ bag dior replica] [http://www.naacpncnetwork.org/sbcjjxjum/ bag christian dior replica] [http://www.naacpncnetwork.org/coadxfajn/ bag hermes replica] [http://www.naacpncnetwork.org/atkwzq/ bag birkin hermes replica] [http://www.naacpncnetwork.org/dncljzexb/ bag burberry replica] </div>The Mozilla build system is a complicated collection of scripts and tools that build, link, and package Mozilla. The current build system, based on GNU autoconf and GNU make, is difficult to understand and is not very flexible. This document is an attempt to outline the requirements for any future build system that might replace our current build system.== Basic Requirements ==* The build system must work initially on our tier-1 platforms: Windows MSVC, MacOSX/gcc, Linux/gcc.** This means that the build system must be capable of handling windows-style paths. This may be accomplished through wrapper scripts.* The build system must be patchable so that port owners can fix the build on all our supported platforms and compilers, including Windows mingw, Solaris, AIX, and BSD.* Installing the build system must be extremely simple.* The build system must support cross-compiling from *nix hosts.* The build must produce correct results. This includes calculating dependencies correctly, while requiring minimum manual dependency notations. The build tools should be used to calculate dependency information whenever possible.* Incremental rebuilds must be fast, and developers should be able to choose to rebuild only certain directories.== Configuration Requirements ==Because Mozilla has complex configuration requirements, the build system must be capable of performing all the same configuration checks that the current [http://lxr.mozilla.org/mozilla/source/configure.in configure script] performs, including:<dl><dt>AC_TRY_COMPILE</dt><dd>Try to compile a program with a specified set of compile and linker flags.</dd><dt>AC_TRY_RUN</dt><dd>Try to compile and run a program with a specified set of compile and linker flags.</dd><dt>Checking for headers and libraries</dt><dd>Search the system for the existence of required and optional headers and libraries.</dd><dt>Using pkgconfig to locate headers and libraries</dt><dd>Use pkgconfig to get correct compile and link flags for a specified package.</dd><dt>Custom tests</dt><dd>e.g. Compiling a file to assembly and searching the resulting file for a particular pattern</dd></dl>Also, the Mozilla source code can build multiple products from the same source tree. The following are build settings that must be configurable by the user:* Users must be able to configure where the intermediate directory is located. This includes configuring this to a different disk.* The build system must not modify the source directory in any way (must be able to build from a readonly location)* Build trees in different configurations must not affect eachother in any way.== Maintenance ==* Build files should be easy to read and understand.* Mozilla has many custom rulesets that must be easily added to the build system.* Lists of files and build options must be distributed across the source tree with the relevant module (no single centralized project file)== Migration ==It is impossible to rewrite the current Mozilla system to a new system. We are going to have to either migrate from one system to the other over time, or develop a migration tool that can convert mozilla-style Makefiles to a new format.It is probably a good idea to first convert a semi-independent project. This is why I'd like to start with Tamarin and try to develop a python-based build system for it. If it works out, we can examine converting the Mozilla configuration system first, and then go through the tree converting modules individually.== Possible Solutions ==The only two pre-made solutions which come close to meeting our needs are [http://www.scons.org/ SCons] or its fork, [http://freehackers.org/~tnagy/bksys.html WAF]. These have the advantage that you can include the entire python build system in our source tree; users will not need to build/install any tools other than python.SCons has problems, including poor support for configuration and a poor C/C++ dependency tool.WAF is architecturally interesting, but doesn't have builtin support for MSVC and the documentation is byzantine. | ||
== Basic Requirements == | |||
* The build system must work initially on our tier-1 platforms: Windows MSVC, MacOSX/gcc, Linux/gcc. | |||
** This means that the build system must be capable of handling windows-style paths. This may be accomplished through wrapper scripts. | |||
* The build system must be patchable so that port owners can fix the build on all our supported platforms and compilers, including Windows mingw, Solaris, AIX, and BSD. | |||
* Installing the build system must be extremely simple. | |||
* The build system must support cross-compiling from *nix hosts. | |||
* The build must produce correct results. This includes calculating dependencies correctly, while requiring minimum manual dependency notations. The build tools should be used to calculate dependency information whenever possible. | |||
* Incremental rebuilds must be fast, and developers should be able to choose to rebuild only certain directories. | |||
== Configuration Requirements == | |||
Because Mozilla has complex configuration requirements, the build system must be capable of performing all the same configuration checks that the current [http://lxr.mozilla.org/mozilla/source/configure.in configure script] performs, including: | |||
<dl> | |||
<dt>AC_TRY_COMPILE</dt> | |||
<dd>Try to compile a program with a specified set of compile and linker flags.</dd> | |||
<dt>AC_TRY_RUN</dt> | |||
<dd>Try to compile and run a program with a specified set of compile and linker flags.</dd> | |||
<dt>Checking for headers and libraries</dt> | |||
<dd>Search the system for the existence of required and optional headers and libraries.</dd> | |||
<dt>Using pkgconfig to locate headers and libraries</dt> | |||
<dd>Use pkgconfig to get correct compile and link flags for a specified package.</dd> | |||
<dt>Custom tests</dt> | |||
<dd>e.g. Compiling a file to assembly and searching the resulting file for a particular pattern</dd> | |||
</dl> | |||
Also, the Mozilla source code can build multiple products from the same source tree. The following are build settings that must be configurable by the user: | |||
* Users must be able to configure where the intermediate directory is located. This includes configuring this to a different disk. | |||
* The build system must not modify the source directory in any way (must be able to build from a readonly location) | |||
* Build trees in different configurations must not affect eachother in any way. | |||
== Maintenance == | |||
* Build files should be easy to read and understand. | |||
* Mozilla has many custom rulesets that must be easily added to the build system. | |||
* Lists of files and build options must be distributed across the source tree with the relevant module (no single centralized project file) | |||
== Migration == | |||
It is impossible to rewrite the current Mozilla system to a new system. We are going to have to either migrate from one system to the other over time, or develop a migration tool that can convert mozilla-style Makefiles to a new format. | |||
It is probably a good idea to first convert a semi-independent project. This is why I'd like to start with Tamarin and try to develop a python-based build system for it. If it works out, we can examine converting the Mozilla configuration system first, and then go through the tree converting modules individually. | |||
== Possible Solutions == | |||
The only two pre-made solutions which come close to meeting our needs are [http://www.scons.org/ SCons] or its fork, [http://freehackers.org/~tnagy/bksys.html WAF]. These have the advantage that you can include the entire python build system in our source tree; users will not need to build/install any tools other than python. | |||
SCons has problems, including poor support for configuration and a poor C/C++ dependency tool. | |||
WAF is architecturally interesting, but doesn't have builtin support for MSVC and the documentation is byzantine. | |||
Revision as of 02:49, 25 November 2006
The Mozilla build system is a complicated collection of scripts and tools that build, link, and package Mozilla. The current build system, based on GNU autoconf and GNU make, is difficult to understand and is not very flexible. This document is an attempt to outline the requirements for any future build system that might replace our current build system.== Basic Requirements ==* The build system must work initially on our tier-1 platforms: Windows MSVC, MacOSX/gcc, Linux/gcc.** This means that the build system must be capable of handling windows-style paths. This may be accomplished through wrapper scripts.* The build system must be patchable so that port owners can fix the build on all our supported platforms and compilers, including Windows mingw, Solaris, AIX, and BSD.* Installing the build system must be extremely simple.* The build system must support cross-compiling from *nix hosts.* The build must produce correct results. This includes calculating dependencies correctly, while requiring minimum manual dependency notations. The build tools should be used to calculate dependency information whenever possible.* Incremental rebuilds must be fast, and developers should be able to choose to rebuild only certain directories.== Configuration Requirements ==Because Mozilla has complex configuration requirements, the build system must be capable of performing all the same configuration checks that the current configure script performs, including:
- AC_TRY_COMPILE
- Try to compile a program with a specified set of compile and linker flags.
- AC_TRY_RUN
- Try to compile and run a program with a specified set of compile and linker flags.
- Checking for headers and libraries
- Search the system for the existence of required and optional headers and libraries.
- Using pkgconfig to locate headers and libraries
- Use pkgconfig to get correct compile and link flags for a specified package.
- Custom tests
- e.g. Compiling a file to assembly and searching the resulting file for a particular pattern
Also, the Mozilla source code can build multiple products from the same source tree. The following are build settings that must be configurable by the user:* Users must be able to configure where the intermediate directory is located. This includes configuring this to a different disk.* The build system must not modify the source directory in any way (must be able to build from a readonly location)* Build trees in different configurations must not affect eachother in any way.== Maintenance ==* Build files should be easy to read and understand.* Mozilla has many custom rulesets that must be easily added to the build system.* Lists of files and build options must be distributed across the source tree with the relevant module (no single centralized project file)== Migration ==It is impossible to rewrite the current Mozilla system to a new system. We are going to have to either migrate from one system to the other over time, or develop a migration tool that can convert mozilla-style Makefiles to a new format.It is probably a good idea to first convert a semi-independent project. This is why I'd like to start with Tamarin and try to develop a python-based build system for it. If it works out, we can examine converting the Mozilla configuration system first, and then go through the tree converting modules individually.== Possible Solutions ==The only two pre-made solutions which come close to meeting our needs are SCons or its fork, WAF. These have the advantage that you can include the entire python build system in our source tree; users will not need to build/install any tools other than python.SCons has problems, including poor support for configuration and a poor C/C++ dependency tool.WAF is architecturally interesting, but doesn't have builtin support for MSVC and the documentation is byzantine.