Boost logo

Boost-Build :

From: Toon Knapen (toon.knapen_at_[hidden])
Date: 2004-08-25 07:57:53


I have made an extension to bjam to be able to compile fortran sources
too. So I have defined a file f.jam in the root directory of my project
that looks like:

<f.jam>
import type ;
type.register FORTRAN : f ;

import generators ;
generators.register-standard f.compile : FORTRAN : OBJ ;

import toolset : flags ;
flags f.compile INCLUDES <include> ;

actions compile
{
f77 -c -I$(INCLUDES) -o $(<) $(>)
}
</f.jam>

and in my project-root.jam I do

<project-root.jam>
import f
</project-root.jam>

But now I have hardcoded the name of the compiler (f77), the flag to be
used to indicate we only want th object file (-c) and the the flag for
the include path (-I). As you may well realise by now: this is not a
very multi-platform approach.

So what is the proper way to extend bjam such that bjam is able to
compile other languages (than C & C++) ?

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk