Hi,
I use boost-build in my project and would like to generate several .CPP and .H files using a custom Perl script whenever some perl templates with .TPL extension change. At the same time, those .C and .H are required by other modules. Right now I'm doing it as follows:
actions generate_FILE1_cpp
{
perl "$(SOME_CONSTANT_PATH)/
makeall.pl"
cp $(SOME_CONSTANT_PATH)/auto_generated/FILE1.cpp $(<)
}
make FILE1.cpp : $(perl_sources) : @generate_FILE1_cpp ;
actions generate_FILE2_cpp
{
cp $(SOME_CONSTANT_PATH)/auto_generated/FILE2.cpp $(<)
}
make FILE2.cpp : FILE1.cpp : @generate_FILE2_cpp ;
# the same scheme is replicated for the N files generated by the perl script in the first action
lib libALLFILES :
FILE1.cpp
FILE2.cpp
# ... N files here ...
FILEN.cpp
;
It seems to work, but the perl script generates around 10 files, and my Jamfile gets too dirty with so much replication. I'm sure there is an easy way to do it, but I'm finding the Boost-Build manual too simple for my current needs. Can somebody advice a cleaner way to do it?
Regards.
Jose.