Dear Paul,

Many thanks for your prompt and helpful response!

Paul Smith (2017/07/26 08:57 -0400):
> On Wed, 2017-07-26 at 09:24 +0200, Sébastien Hinderer wrote:
> > parser.mli parser.ml: parser.mly
> >            ocaplyacc $<
> > 
> > does nos say exactly this but is rather an abbreviation for
> > 
> > parser.mli: parser.mly
> >             ocamlyacc $<
> > 
> > parser.ml: parser.mly
> >             ocamlyacc $<
> 
> Correct.  However this:
> 
>   %.mli %.ml : %.mly
>           ocamlyacc $<
> 
> will do just what you want.
> 
> Pattern rules with multiple targets tell make that a single invocation
> of the recipe will build all the targets.

Oh great! I was not aware of this.

So am I correctin assuming that something like

parsers := foo.mly bar.mly baz.mly

$(parsers): %.ml %.mli
            ocamlyacc $<

would work the expected way?

Thanks again, Paul!

Sébastien.

_______________________________________________
Help-make mailing list
Help-make@gnu.org
https://lists.gnu.org/mailman/listinfo/help-make

Reply via email to