wiki:CMTInWaf

Version 6 (modified by /C=FR/O=CNRS/OU=UMR8607/CN=Christian Arnault/emailAddress=arnault@…, 12 years ago) (diff)

--

Implementing CMT2 on top of Waf

Principle:

  • Every package is packaged using the CMT style:
    • a cmt directory with its requirements file
      • the requirements files hold:
        • mention of used packages
        • declarations of the constituents (libraries, programs, user build modules...)
        • specific macro/set/path declarations
    • a src directory containing the sources
    • other optional directories
      • <package> include files
      • job options
      • ...
  • The Project contains a cmt directory with its own requirements file
    • this requirements holds:
      • the list of packages belonging to the project
      • global definitions available to all packages
  • One install area per Project

Architecture

Only one standard & generic wscript is needed for managing the whole project. It stands at the top level directory, i.e. above all other stuff of the project.

import cmt

top, out = cmt.init ()

def options (ctx):
  cmt.options (ctx)

def configure (ctx):
  cmt.configure (ctx)

def build (ctx):
  cmt.build (ctx)

The build is launched using:

> waf.py configure build

and will output the binaries into one single build directory. None of the package contents are modified during the build.

Test configuration

The setting on my windows machine is:

set PATH=c:\Install\Python27;%PATH%
set PATH=c:\Install\Waf;%PATH%
set PYTHONPATH=c:\Arnault\CMT2\Waf;%PYTHONPATH%

The current development is maintained using SVN:

Next to do:

  • declare user build modules
    • eg: copy a file
    • gaudi component, etc...
  • multi-project using CMTPROJECTPATH
  • tag management for macro/set/path declaration
  • policy packages offering user build modules
  • check package with arbitrary directory depth
  • automate initialisation of the work model
    • single work area:
      • a single package
      • a set of checked out packages part of a release
      • a complete project
    • using a set of pre-built projects

Attachments (1)

  • cmt.py (18.5 KB) - added by /C=FR/O=CNRS/OU=UMR8607/CN=Christian Arnault/emailAddress=arnault@… 12 years ago.

Download all attachments as: .zip