Boost logo

Boost-Build :

Subject: [Boost-build] A last minute link inclusion.
From: william.crocker_at_[hidden]
Date: 2009-01-01 18:49:43


Hello:

If my application needs to be relinked, I need
to sneak in a specially created/compiled source file.
I include the build date into my application with a
link action which looks like this (using
good old Jam (I removed some boiler plate)) :

actions Link bind {
    echo 'const char *link_date() { return("'`date`'"); }' > link_date.cc
    $(C++) $(C++FLAGS) -c -o link_date.o link_date.cc
    $(LINK) $(LINKFLAGS) -o $(<) $(>) link_date.o $(LINKLIBS)
    $(RM) link_date.o link_date.cc
}

Note that this is a NOT a dependency which causes the app to be relinked.

What is the cool way of doing this using BBV2?

Bill


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