Yulup Development Policy

2006-05-17

Revision History
Revision 1.0 2006-05-17 AW
First initial draft.

Abstract

The development policy for Yulup.


Table of Contents

1. Development Rules
1.1. Methodology
1.1.1. Unit Tests
1.1.2. Design by Contract
1.2. Coding Style
1.3. Coding Practices
2. Directory Structure
3. Build Infrastructure

The directory structure of the source directory is as follows:

./
 |-- mozilla                                          (1)
 |    |-- gecko-sdk                                   (2)
 |    |    |-- PLATFORM                               (3)
 |    |    `-- PLATFORM...
 |    |-- xulrunner                                   (4)
 |    |    |-- bin                                    (5)
 |    |    |    |-- PLATFORM                          (6)
 |    |    |    `-- PLATFORM...
 |    |    `-- src                                    (7)
 |    |         |-- mozilla                           (8)
 |    |         `-- cvsco.log                         (9)
 |    `-- mozilla-tree.config                         (10)
 |-- yulup                                            (11)
 |    |-- bin                                         (12)
 |    |    |-- PLATFORM                               (13)
 |    |    `-- PLATFORM...
 |    |-- pkg                                         (14)
 |    |    |-- PLATFORM                               (15)
 |    |    `-- PLATFORM...
 |    `-- src                                         (16)
 |         |-- backend                                (17)
 |         |    |-- public                            (18)
 |         |    |    `-- Makefile.in
 |         |    |-- src                               (19)
 |         |    |    `-- Makefile.in
 |         |    `-- test                              (20)
 |         |         `-- Makefile.in
 |         |-- connector                              (21)
 |         |-- frontend                               (22)
 |         |    |-- public                            (23)
 |         |    |    `-- Makefile.in
 |         |    |-- src                               (24)
 |         |    |    `-- Makefile.in
 |         |    |-- test                              (25)
 |         |    |    `-- Makefile.in
 |         |    `-- variants                          (26)
 |         |         |-- browser                      (27)
 |         |         |    |-- public                  (28)
 |         |         |    |    `-- Makefile.in
 |         |         |    |-- src                     (29)
 |         |         |    |    `-- Makefile.in
 |         |         |    `-- test                    (30)
 |         |         |         `-- Makefile.in
 |         |         |-- standalone                   (31)
 |         |         `-- web                          (32)
 |         |-- Makefile.in
 |         `-- install.rdf                            (33)
 `-- Makefile                                         (34)
      

(1)

The mozilla directory contains the Mozilla header files and source code which are needed to link against. This is a CVS checkout of the target Mozilla branch for this specific Yulup branch.

Note that the contents of this directory are READ-ONLY. This means:

  • You MUST NOT modify the contents of this directory directly. If the contents are modifed, we cannot guarantee anymore that Yulup builds against the targeted Mozilla branch.

  • You MUST NOT execute make in this directory. The Mozilla platform employs a modified make infrastructure. Executing plain make screws up the tree beyond repair.

  • You MUST NOT perform a CVS update in this directory. The Mozilla platform employs a custom CVS infrastructure which is driven by make files. Executing plain cvs up screws up the tree beyond repair.

    In order to update the Mozilla tree, issue make mozilla-update in the parent directory of mozilla (cf. Build Infrastructure). Note that this operation may only be performed by an authorised developer.

(7)

The mozilla/xulrunner/src directory contains the Mozilla XULRunner tree from which the Gecko SDK is built. Note that this directory is about 306 MB in size.

(10)

The mozilla-tree.config contains the branch string of the Mozilla tree to checkout and update. Change the string in this file if you want to switch to a different branch of the Mozilla tree (but first issue make mozilla-remove to make sure that the branches do not mix up).

(11)

The yulup directory contains all files related to Yulup. Although mozilla is of course needed to build Yulup, those files are not an integral part of Yulup.

(12)

The yulup/bin directory contains the object files of the Yulup module.

(14)

The yulup/pkg directory contains an installable XPI file of Yulup.

(16)

The yulup/src directory contains the Yulup sources.

(23)

The yulup/src/frontend/public directory contains the IDL files to interface with other modules.

(24)

The yulup/src/frontend/src directory contains the module source files.

(25)

The yulup/src/frontend/test directory contains the unit test source files.

(33)

The yulup/src/install.rdf file contains the information necessary to install Yulup as an XPI extension.

(34)

The Makfile contains the central logic of the build infrastructure. For instructions on how to use it, see Build Infrastructure.

The central tool for building Yulup is the make file in the top-level source directory. It supports the following targets:

  • Default Target.  The default target builds Yulup and places the objects in yulup/bin.

  • pkg The pkg target builds Yulup and creates an installable XPI file in yulup/pkg.

  • clean The clean targets removes the object files in yulup/bin and deletes the XPI package in yulup/pkg.

  • mozilla-checkout The mozilla-checkout target first removes the Mozilla tree in mozilla/xulrunner and then performs a fresh checkout of the branch set in mozilla-tree.conf.

    Do NOT exercise this target unless you know what you are doing and are authorised to do so.

  • mozilla-update The mozilla-update target updates the Mozilla tree in mozilla.

    Do NOT exercise this target unless you know what you are doing and are authorised to do so.

  • mozilla-build-gecko-sdk The mozilla-build-gecko-sdk target builds and installs the platform-specifc Gecko SDK in mozilla/gecko-sdk/PLATFORM, where PLATFORM is a string based on the architecture and the operating system currently running on your build host.

  • mozilla-remove The mozilla-remove target deletes the complete Mozilla tree in mozilla.

    Do NOT exercise this target unless you know what you are doing and are authorised to do so.

  • mozilla-clean The mozilla-clean target cleans the Mozilla tree in mozilla/xulrunner.

    Do NOT exercise this target unless you know what you are doing and are authorised to do so.