Boost logo

Boost-Build :

Subject: Re: [Boost-build] How to remove code duplication from Jamfile
From: å×ÇÅÎÉÊ ûÕÂÉÎ (shubin_evgeniy_at_[hidden])
Date: 2010-03-30 03:13:37


Fri, 19 Mar 2010 19:06:19 +0300 ÐÉÓØÍÏ ÏÔ Vladimir Prus <ghost_at_[hidden]>:

> You can put this in Jamroot:
>
> constant JAMROOT : $(__name__) ;
> actions transform-script
> {
> sed "s_at_PREFIX@$(INSTALL_PATH)@g" $(>) | sed "s_at_NAME@$(DAEMON_NAME)@g" > $(<)
> }
>
> rule your-install ( DAEMON_NAME )
> {
> 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 : @$(JAMROOT).transform-script ;
> }
>
> and then have:
>
> your-install some-daemon ;
>
> inside Jamfile for each component. Does this work?

Is there any way to call "your-install some-daemon" explicit?

>
> 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