|
Boost-Build : |
Subject: [Boost-build] User-defined options
From: Phil Bass (Phil.Bass_at_[hidden])
Date: 2008-10-16 06:49:25
We have a configuration-parser program that reads .txt files and
generates .sql files. I have defined a simple bjam generator which
invokes the parser program, but I can't get it to understand the options
for the parser program.
Here's a stripped down sql.jam file and a trivial Jamroot that
illustrate my problem:
# === sql.jam ===
# --- define file types
import type ;
type.register CONFIG_SRC : txt ;
type.register SQL : sql ;
# --- define the cal-config feature
import feature : feature ;
import toolset : flags ;
feature cal-config : : path free ;
flags sql.make-SQL-file CAL_CONFIG <cal-config> ;
# --- register a .txt -> .sql generator
import generators ;
generators.register-standard make-SQL-file : CONFIG_SRC : SQL ;
actions make-SQL-file #bind CAL_CONFIG
{
echo -o $(<) $(-c) $(CAL_CONFIG) $(>)
}
IMPORT sql : make-SQL-file : : make-SQL-file ;
# === Jamroot ===
import sql ;
# invoke the .txt -> .sql generator
sql IPSW.sql : IPSWConfig.txt : <cal-config>Config_Cal.sql ;
The value of the CAL_CONFIG variable in the make-SQL-file action is
always empty. What am I doing wrong?
-- Phil Bass (phil_at_[hidden])
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