Commits

camlspotter committed 6763708

added RecalcFlags

Comments (0)

Files changed (1)

 # File compilation rule redefinition
 # ==================================================
 
-RecalcFlags_(FILE) =
-    # println(awking $(FILE))
+RecalcFlags_(i) =
+    println(awking $i)
     # .MEMO rule seems not working at all in this context...
     res=
-    awk($(FILE))
+    awk($i)
     case $"OMAKE_SYNTAX[(]\([^)]*\)[)]"
-       println("$(FILE): Use the syntax override: $1")
+       println("$i: Use the syntax override: $1")
        res+=$(split ' ',$1)
        export res
     value $(res)        
 
 %.cmx: %.ml
     section rule
-        RecalcFlags(%.ml)
         if $(not $(NATIVE_ENABLED))
             err. =
                 extends $(UnbuildableException)
             raise $(err)
         elseif $(target-exists %.mli)
             %.cmx %$(EXT_OBJ): %.ml %.cmi :scanner: scan-ocaml-%.ml
+                RecalcFlags(%.ml)
                 $(OCamlOpt) -c $<
         elseif $(BYTE_ENABLED)
             %.cmx %.cmi %$(EXT_OBJ) %.cmo: %.ml :scanner: scan-ocaml-%.ml
+                RecalcFlags(%.ml)
                 $(OCamlC) -c $<
                 $(OCamlOpt) -c $<
         else
             %.cmx %.cmi %$(EXT_OBJ): %.ml :scanner: scan-ocaml-%.ml
+                RecalcFlags(%.ml)
                 $(OCamlOpt) -c $<
 
 %$(EXT_OBJ): %.ml
     section rule
-        RecalcFlags(%.ml)
         if $(not $(NATIVE_ENABLED))
             err. =
                 extends $(UnbuildableException)
             raise $(err)
         elseif $(target-exists %.mli)
             %$(EXT_OBJ) %.cmx: %.ml %.cmi :scanner: scan-ocaml-%.ml
+                RecalcFlags(%.ml)
                 $(OCamlOpt) -c $<
         elseif $(BYTE_ENABLED)
             %$(EXT_OBJ) %.cmi %.cmx %.cmo: %.ml :scanner: scan-ocaml-%.ml
+                RecalcFlags(%.ml)
                 $(OCamlC) -c $<
                 $(OCamlOpt) -c $<
         else
             %$(EXT_OBJ) %.cmi %.cmx: %.ml :scanner: scan-ocaml-%.ml
+                RecalcFlags(%.ml)
                 $(OCamlOpt) -c $<
 
 %.cmo: %.ml
     section rule
-        RecalcFlags(%.ml)
         if $(not $(BYTE_ENABLED))
             err. =
                 extends $(UnbuildableException)
             raise $(err)
         elseif $(target-exists %.mli)
             %.cmo: %.ml %.cmi :scanner: scan-ocaml-%.ml
+                RecalcFlags(%.ml)
                 $(OCamlC) -c $<
         elseif $(NATIVE_ENABLED)
             %.cmo %.cmi %.cmx %$(EXT_OBJ): %.ml :scanner: scan-ocaml-%.ml
+                RecalcFlags(%.ml)
                 $(OCamlC) -c $<
                 $(OCamlOpt) -c $<
         else
             %.cmo %.cmi: %.ml :scanner: scan-ocaml-%.ml
+                RecalcFlags(%.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
+                    RecalcFlags(%.ml)
                     $(OCamlC) -c $<
                     $(OCamlOpt) -c $<
             else
                 %.cmi %.cmo: %.ml :scanner: scan-ocaml-%.ml
+                    RecalcFlags(%.ml)
                     $(OCamlC) -c $<
         else
             %.cmi %.cmx %$(EXT_OBJ): %.ml :scanner: scan-ocaml-%.ml