Boost logo

Boost-Build :

Subject: [Boost-build] make rule with extra variables + figuring out the full target path
From: Fadi Beyrouti (fbeyrout_at_[hidden])
Date: 2010-02-04 16:44:50


Hello,

I am using the make rule in the following fashion:

    make my_target_file :
        my_source_file :
        @my_action :
        <location>"dir1/dir2/dir3" ;

actions my_action
{
    my_command "$(>)" "$(<)"
}

However, I would like to introduce an extra variable to include in the command.
For example:

actions my_action
{
    my_command "$(>)" "$(<)" $(EXTRA_VAR)
}

In order to do that I thought of doing the following after the make statement:

$(EXTRA_VAR) on my_target_file = "SOME VALUE" ;

however, this is not working since I am not able to retrieve the correct path of
my_target_file. My questions are:

1. Is there a way to get that path?
2. Is there a better/cleaner way of doing what I want to do?

Thanks,


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