Commits

camlspotter committed 7d2d0ef

stopped RecalcFlags, since it seems too expensive

Comments (0)

Files changed (1)

     .PHONY:test
 
     test: inline_tests.log
-
-
-# File compilation rule redefinition
-# ==================================================
-
-RecalcFlags_(FILE) =
-    # println(awking $(FILE))
-    # .MEMO rule seems not working at all in this context...
-    res=
-    awk($(FILE))
-    case $"OMAKE_SYNTAX[(]\([^)]*\)[)]"
-       println("$(FILE): Use the syntax override: $1")
-       res+=$(split ' ',$1)
-       export res
-    value $(res)        
-
-RecalcFlags(FILE) =
-    res=$(RecalcFlags_ $(FILE))
-    if $(not $(equal $(length $(res)), 0))
-        OCAMLPPFLAGS[]=$(split ' ',$(res))
-        OCAMLDEPFLAGS[]=$(split ' ',$(res))
-        export
-    export
-
-public.OCamlScanner(src_file) =
-    RecalcFlags($(src_file))
-    if $(OCAMLDEP_MODULES_ENABLED)
-        value $(OCAMLFIND) $(OCAMLDEP) $(LAZY_OCAMLFINDFLAGS) $(PREFIXED_OCAMLPACKS) $(OCAMLDEPFLAGS) -modules $(src_file) | ocamldep-postproc
-    else
-        value $(OCAMLFIND) $(OCAMLDEP) $(LAZY_OCAMLFINDFLAGS) $(PREFIXED_OCAMLPACKS) $(OCAMLDEPFLAGS) $(PREFIXED_OCAMLINCLUDES) $(src_file)
-
-%.cmx: %.ml
-    section rule
-        RecalcFlags(%.ml)
-        if $(not $(NATIVE_ENABLED))
-            err. =
-                extends $(UnbuildableException)
-                message = $(string $"You are trying to build OCaml native code file: "%.cmx$"
-However, the NATIVE_ENABLED flag is not set.
-Include the following definition in your OMakefile
-if you really want to build this file.
-       NATIVE_ENABLED = true")
-                target = $(file %.cmx)
-            raise $(err)
-        elseif $(target-exists %.mli)
-            %.cmx %$(EXT_OBJ): %.ml %.cmi :scanner: scan-ocaml-%.ml
-                $(OCamlOpt) -c $<
-        elseif $(BYTE_ENABLED)
-            %.cmx %.cmi %$(EXT_OBJ) %.cmo: %.ml :scanner: scan-ocaml-%.ml
-                $(OCamlC) -c $<
-                $(OCamlOpt) -c $<
-        else
-            %.cmx %.cmi %$(EXT_OBJ): %.ml :scanner: scan-ocaml-%.ml
-                $(OCamlOpt) -c $<
-
-%$(EXT_OBJ): %.ml
-    section rule
-        RecalcFlags(%.ml)
-        if $(not $(NATIVE_ENABLED))
-            err. =
-                extends $(UnbuildableException)
-                message = $(string $"You are trying to build OCaml native code file: "%$(EXT_OBJ)$"
-However, the NATIVE_ENABLED flag is not set.
-Include the following definition in your OMakefile
-if you really want to build this file.
-       NATIVE_ENABLED = true")
-                target = $(file %.cmx)
-            raise $(err)
-        elseif $(target-exists %.mli)
-            %$(EXT_OBJ) %.cmx: %.ml %.cmi :scanner: scan-ocaml-%.ml
-                $(OCamlOpt) -c $<
-        elseif $(BYTE_ENABLED)
-            %$(EXT_OBJ) %.cmi %.cmx %.cmo: %.ml :scanner: scan-ocaml-%.ml
-                $(OCamlC) -c $<
-                $(OCamlOpt) -c $<
-        else
-            %$(EXT_OBJ) %.cmi %.cmx: %.ml :scanner: scan-ocaml-%.ml
-                $(OCamlOpt) -c $<
-
-%.cmo: %.ml
-    section rule
-        RecalcFlags(%.ml)
-        if $(not $(BYTE_ENABLED))
-            err. =
-                extends $(UnbuildableException)
-                message = $(string $"You are trying to build OCaml native code file: "%.cmo$"
-However, the BYTE_ENABLED flag is not set.
-Include the following definition in your OMakefile
-if you really want to build this file.
-       BYTE_ENABLED = true")
-                target = $(file %.cmx)
-            raise $(err)
-        elseif $(target-exists %.mli)
-            %.cmo: %.ml %.cmi :scanner: scan-ocaml-%.ml
-                $(OCamlC) -c $<
-        elseif $(NATIVE_ENABLED)
-            %.cmo %.cmi %.cmx %$(EXT_OBJ): %.ml :scanner: scan-ocaml-%.ml
-                $(OCamlC) -c $<
-                $(OCamlOpt) -c $<
-        else
-            %.cmo %.cmi: %.ml :scanner: scan-ocaml-%.ml
-                $(OCamlC) -c $<
-
-%.cmi: %.ml
-    section rule
-        RecalcFlags(%.ml)
-        if $(BYTE_ENABLED)
-            if $(NATIVE_ENABLED)
-                %.cmi %.cmo %.cmx %$(EXT_OBJ): %.ml :scanner: scan-ocaml-%.ml
-                    $(OCamlC) -c $<
-                    $(OCamlOpt) -c $<
-            else
-                %.cmi %.cmo: %.ml :scanner: scan-ocaml-%.ml
-                    $(OCamlC) -c $<
-        else
-            %.cmi %.cmx %$(EXT_OBJ): %.ml :scanner: scan-ocaml-%.ml
-                $(OCamlOpt) -c $<
-
-%.cmi: %.mli :scanner: scan-ocaml-%.mli
-    RecalcFlags(%.mli)
-    $(OCamlC) -c $<