Commits

camlspotter committed 98b202a Merge
  • Participants
  • Parent commits aa7fd4a, c4e7cae

Comments (0)

Files changed (6)

    include OMyMakefile
    export
 
-OCAMLFLAGS    = -annot -w A-4-9-32
+# OCAMLFLAGS    = -annot -w A-4-9-32
 
 Subdirs()
 
 BYTE_ENABLED = true
 
 #|The default warning and errors. If you want to use different warning and error switches, use redefine the variable.
-OCAMLFLAGS = -g -w A-4-9 -warn-error A-4-9
+OCAMLFLAGS = -g 
+
+#|Warnings not to be printed separted with space
+OCAMLWARNING_IGNORE[] = 4 9
+
+#|Warnings treated as non errors
+OCAMLWARNING_NON_ERROR[] = 4 9
+
+#|The maximum warning value.
+# This is the maximum warning ID NOT of the current OCaml compiler,
+#                                BUT of the OCaml compiler used by the author.
+OCAMLWARNING_MAX= 39
+
+#|Function to build warning switches
+OCAMLWARNING_MAKE()=
+    return -w A-$(concat -,$(OCAMLWARNING_IGNORE)) -warn-error +1..$(OCAMLWARNING_MAX)-$(concat -, $(OCAMLWARNING_NON_ERROR))
 
 #|OMyMakefile assumes installation with .cmt files
-OCAMLANNOTFLAGS = -bin-annot
+OCAMLANNOTFLAGS = -annot -bin-annot
 
 #|Global variable to be defined as empty
 OCAMLPACKAGEFLAGS=
 
 #|Redefinition of compiler commands
 public.OCamlC() =
-    value $(OCAMLFIND) $(OCAMLC) $(OCAMLANNOTFLAGS) $(OCAMLPACKAGEFLAGS) $(LAZY_OCAMLFINDFLAGS) $(PREFIXED_OCAMLPACKS) $(OCAMLFLAGS)\
-              $(OCAMLCFLAGS) $(OCAMLPPFLAGS) $(PREFIXED_OCAMLINCLUDES)
+    value $(OCAMLFIND) $(OCAMLC) \
+        $(OCAMLANNOTFLAGS) \
+        $(OCAMLPACKAGEFLAGS) \
+        $(LAZY_OCAMLFINDFLAGS) \
+        $(PREFIXED_OCAMLPACKS) \
+        $(OCAMLFLAGS) \
+        $(OCAMLWARNING_MAKE) \
+        $(OCAMLCFLAGS) \
+        $(OCAMLPPFLAGS) \
+        $(PREFIXED_OCAMLINCLUDES)
 # Why we need "public." ?
 
 public.OCamlOpt() =
 .PHONY: all install clean
 
-OCAMLINCLUDES +=
-
-OCAMLFLAGS    +=
-OCAMLCFLAGS   +=
-OCAMLOPTFLAGS +=
-OCAML_LINK_FLAGS +=
-OCAML_BYTE_LINK_FLAGS +=
-OCAML_NATIVE_LINK_FLAGS +=
-
 CAMLP4PACKS[]=
     sexplib
 
 .PHONY: all clean
 
-OCAMLPACKAGEFLAGS=
-
-# BYTE_ENABLED= true
-
 OCAMLINCLUDES += ../lib
 
-OCAMLFLAGS    += -annot -w Ae
-OCAMLCFLAGS   +=
-OCAMLOPTFLAGS += 
-OCAML_LINK_FLAGS += 
-OCAML_BYTE_LINK_FLAGS +=
-OCAML_NATIVE_LINK_FLAGS +=
-
 CAMLP4PACKS[]=
     monad-custom
 

pa_bind_inline/OMakefile

 OCAMLPACKS[] =
 	camlp4
 
-OCAMLINCLUDES +=
-
 NATIVE_ENABLED = $(OCAMLOPT_EXISTS)
 BYTE_ENABLED = true
 
-# OCAMLFLAGS    +=
-OCAMLCFLAGS   += -annot -w Ae
-# OCAMLOPTFLAGS +=
-# OCAML_LINK_FLAGS +=
-# OCAML_BYTE_LINK_FLAGS +=
-# OCAML_NATIVE_LINK_FLAGS +=
-
-OCAMLPACKAGEFLAGS= 
-
 FILES[] =
 	pa_bind_inline
 
 
 OCAMLINCLUDES += ../lib
 
-OCAMLFLAGS    += -annot -w Ae
-OCAMLCFLAGS   +=
-OCAMLOPTFLAGS +=
-OCAML_LINK_FLAGS += 
 OCAML_BYTE_LINK_FLAGS += planck.cmo
 OCAML_NATIVE_LINK_FLAGS += planck.cmx