Boost logo

Boost-Build :

From: Miguel Ramos (c++_at_[hidden])
Date: 2008-03-14 08:34:57


Hello,

I'm having trouble using the JAMDATE built-in variable. I'm using
Boost.Build for a few months now, and need to replace uses of the
output of the UNIX date command with something which is platform
independent.

The problem is I can't get JAMDATE however I use it. Apparently, it is
expanded to an empty variable.
The most basic use of it is something like
<define>BUILD_DATE=\\\"$(JAMDATE)\\\" and what happens is that the
-DBUILD_DATE=something compiler argument is being omited. If I replace
that with some other variable which has content, then the argument is
emited.

I tried using JAMDATE in a constant in Jamroot and bjam tells me that
the variable is empty.
I looked into the source file src/jam.c to check if the variable
definition was inside some conditional compilation directive (maybe my
bjam on Gentoo Linux is being incorrectly built) but it looks like it
isn't.

What am I doing wrong? How can I have that preprocessor macro defined?

The output of the bjam --version command is:
Boost.Build V2 (Milestone 11)
Boost.Jam 03.1.16

-- 
Miguel Ramos

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