Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocamlbuild adding directories arguments to a tool with tags
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: ocamlbuild adding directories arguments to a tool with tags
> I would like to be able to specify
>
> <d> : mytool:include
>
> So that when mytool is invoked it is invoked for example with
>
> mytool -dir d


An alternate way of doing that is to tag the .ext files the tools act
upon with :

<**/.*ext> : dir(d)

And have the following pflag rule :

pflag ["mytool"] "dir" (fun d -> S [ A "-dir"; P d])

Of course the rules that invoke mytool should add the tag "mytool" to
the command tags.

Best,

Daniel