Re: Executing commands in the same dir as Jamfile
Craig Allsop <cjamallsop <at> gmail.com>
2009-08-11 04:06:10 GMT
Well the medium answer is, stage your inputs into temp folder, e.g.
use Bulk dir : sources
where dir is your LOCATE_TARGET and build it all into the same folder.
Then copy out your output where you want it.
Craig.
On Tue, Aug 11, 2009 at 1:21 PM, Jeremy Cowgar<jeremy <at> cowgar.com> wrote:
> Hello Jeremy,
>
> Oh! Those :BS's were not in there originally. That was me playing. I
> forgot to remove them before posting to the mailing list.
>
> Jeremy
> mailto:jeremy <at> cowgar.com
>
> ============
> Monday, August 10, 2009, 11:15:37 PM, you wrote:
>
>> Hello Craig,
>
>> I think maybe I need the long answer :-/
>
>> Here is my rule/action and example use:
>
>> #
>> # Generate documentation using eudoc
>> #
>> # Example:
>> # EuDoc manual : manual.af : euphoria.txt : tmpl.html ;
>> #
>
>> rule EuDoc
>> {
>> if ! $(EUDOC_SOURCE)
>> {
>> Depends $(<) : get_eudoc ;
>
>> EUDOC_SOURCE = [ FDirName $(TOP) source eudoc eudoc.ex ] ;
>> CREOLEHTML_SOURCE = [ FDirName $(TOP) source eudoc creole creolehtml.ex ] ;
>> }
>
>> ASSEMBLY_FILE on $(<) = $(2) ;
>> CREOLE_FILE on $(<) = $(3) ;
>> TEMPLATE on $(<) = $(4) ;
>> }
>
>> actions EuDoc
>> {
>> $(EUI_EXE) $(EUDOC_SOURCE:BS) -v -a $(ASSEMBLY_FILE:BS) -o $(CREOLE_FILE:BS)
>> $(EUI_EXE) $(CREOLEHTML_SOURCE) -A=ON -t=$(TEMPLATE:BS) -ohtml $(CREOLE_FILE:BS)
>> }
>
>
>> In the example case, EuDoc manual ... manual is the target to call,
>> manual.af is an assembly file in the same dir as the Jamfile.
>> euphoria.txt is an interim file that eudoc writes, then creole 2 html
>> reads and produces HTML docs from. tmpl.html is a template for each
>> page. Here's a sample dir layout:
>
>> C:\euphoria\source\eudoc\eudoc.ex
>> C:\euphoria\source\eudoc\creole\creolehtml.ex
>> C:\euphoria\Jamfile <--- root Jamfile
>> C:\euphoria\docs\Jamfile <--- Jamfile containing EuDoc manual : ... ;
>> C:\euphoria\docs\manual.af
>> C:\euphoria\docs\tmpl.html
>
>
>> Then it is run from the root Jamfile, which includes:
>
>> SubInclude TOP doc ;
>
> C:\euphoria>> jam manual
>
>
>> Jeremy
>> mailto:jeremy <at> cowgar.com
>
>> ============
>> Monday, August 10, 2009, 10:33:37 PM, you wrote:
>
>>> The short answer:
>
>>> cd $(<:P)
>>> tool.exe -out $(<:BS) -in $(>:BS)
>
>>> If your output / inputs are all over the place this won't work thus
>>> you need the long answer.
>
>>> Craig.
>
>>> On Tue, Aug 11, 2009 at 10:40 AM, Jeremy Cowgar<jeremy <at> cowgar.com> wrote:
>>>> Hello Jamming,
>>>>
>>>> I have a top level Jamfile that has
>>>>
>>>> ...
>>>> SubInclude TOP docs ;
>>>> ...
>>>>
>>>> Now, in the docs dir, I of course have another Jamfile. I define a
>>>> custom rule to build the docs. The problem is, the command to build
>>>> the docs needs to execute from the docs directory, but when I am at
>>>> the top level and run jam makedocs it executes from the top level.
>>>>
>>>> How can I execute this command from the docs directory (i.e. the
>>>> same directory the Jamfile containing the target)?
>>>>
>>>> Thanks!
>>>>
>>>> --
>>>> Best regards,
>>>> Jeremy mailto:jeremy <at> cowgar.com
>>>>
>>>> _______________________________________________
>>>> jamming mailing list - jamming <at> maillist.perforce.com
>>>> http://maillist.perforce.com/mailman/listinfo/jamming
>>>>
>
>> _______________________________________________
>> jamming mailing list - jamming <at> maillist.perforce.com
>> http://maillist.perforce.com/mailman/listinfo/jamming
>
>
_______________________________________________
jamming mailing list - jamming <at> maillist.perforce.com
http://maillist.perforce.com/mailman/listinfo/jamming