[Omake] Changing OCAMLPACKS in a section fails

Aleksey Nogin nogin at metaprl.org
Wed Feb 14 10:01:29 PST 2007


On 14.02.2007 02:55, Renald Buter wrote:

> I have an OMakefile that goes like this:
> 
> main_target:
> section
>         PROGRAM=main_target
>         FILES=main_target
>         OCAMLPACKS=expat
>         OCamlProgram($(PROGRAM),$(FILES))
> 
> main_target_test:
> section
>         PROGRAM=main_target_test
>         FILES=main_target main_target_test
>         OCAMLPACKS=oUnit
>         OCamlProgram($(PROGRAM),$(FILES))
> 
> Everything seems to work, *except* for the OCAMLPACKS variable: it does *not* 
> get used in the OCamlProgram. 

I could not reproduce this problem, using a slightly different OMakefile:

--------
USE_OCAMLFIND = true

section
         PROGRAM=main_target
         FILES=main_target
         OCAMLPACKS=expat
         .DEFAULT: $(OCamlProgram $(PROGRAM),$(FILES))

section
         PROGRAM=main_target_test
         FILES=main_target main_target_test
         OCAMLPACKS=oUnit
         .DEFAULT: $(OCamlProgram $(PROGRAM),$(FILES))
---------

I removed the "main_target:" and "main_target_test:" (which as 
essentially no-ops in your OMakefile) and explicitly added the two 
programs to the .DEFAULT target (so that I do not have to use some other 
mechanism to tell OMake to build them).

Aleksey


More information about the Omake mailing list