|
Boost-Build : |
Subject: [Boost-build] How to remove code duplication from Jamfile
From: å×ÇÅÎÉÊ ûÕÂÉÎ (shubin_evgeniy_at_[hidden])
Date: 2010-03-19 10:56:40
I have have a project with Jamroot, which consists of some subprojects with Jamfiles.
In each Jamfile I have this block of code:
...
DAEMON_NAME = daemon_name ; #specific for each subproject
alias install : install-bin install-conf $(INSTALL_PATH)/scripts/$(DAEMON_NAME) ;
install install-bin : $(DAEMON_NAME) : <location>$(INSTALL_PATH)/bin ;
install install-conf : ../../conf/$(DAEMON_NAME).conf : <location>$(INSTALL_PATH)/conf ;
make $(INSTALL_PATH)/scripts/$(DAEMON_NAME) : ../../scripts/rc_script.freebsd : @transform-script ;
actions transform-script
{
sed "s_at_PREFIX@$(INSTALL_PATH)@g" $(>) | sed "s_at_NAME@$(DAEMON_NAME)@g" > $(<)
}
explicit install install-bin install-conf $(INSTALL_PATH)/scripts/$(DAEMON_NAME) ;
Could anyone explain me how to move this block of code to Jamroot of top project?
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