Question

I am currently defining a constant in order to use it within a function in my Jamfile:

project-root.jam

path-constant LIB_PATH : ./x_my_lib/ ;

myjamfile.jam

actions create-build-info.unix
{
        printf "Generating build-info, please wait...\n" ;
        "$(LIB_PATH)/prebuild.sh" $(PROJECT_ROOT) > $(1)
}

Would it be possible for the Jamfile to detect what path is located so I don't need to define LIB_PATH as a constant somewhere else?

Was it helpful?

Solution

So you can just use some bash scripting with Bjam :)

actions create-build-info.unix
{
    printf "Generating build-info, please wait...\n" ;
    find $(PROJECT_ROOT) -type f -name prebuild.py  -exec {} $(PROJECT_ROOT) \;   > $(1)
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top