Markus Mottl avatar Markus Mottl committed 2e48ed1

Added stricter C-flags and fixed a minor bug

Comments (0)

Files changed (4)

 
 BuildTools:       ocamldoc, ocamlbuild
 
+Flag strict
+  Description:    Strict compile-time checks
+  Default:        true
+
 Library pcre
   Path:           lib
   FindlibName:    pcre
   Modules:        Pcre
   CSources:       pcre_stubs.c
-  CCOpt:          -O2 -DPIC
+  CCOpt:          -g -O2 -fPIC -DPIC
+  if flag(strict) && ccomp_type(cc)
+    CCOpt+:       -Wall -pedantic -Wextra -Wunused -Wno-long-long
 
 
 # Examples
       int ret;
       struct cod cod = { (value *) NULL, (value *) NULL, (value) NULL };
       struct pcre_extra new_extra =
-#ifdef PCRE_CONFIG_MATCH_LIMIT_RECURSION
+#ifdef PCRE_EXTRA_MATCH_LIMIT_RECURSION
+# ifdef PCRE_EXTRA_MARK
+#  ifdef PCRE_EXTRA_EXECUTABLE_JIT
+        { PCRE_EXTRA_CALLOUT_DATA, NULL, 0, NULL, NULL, 0, NULL, NULL };
+#  else
+        { PCRE_EXTRA_CALLOUT_DATA, NULL, 0, NULL, NULL, 0, NULL };
+#  endif
+# else
         { PCRE_EXTRA_CALLOUT_DATA, NULL, 0, NULL, NULL, 0 };
+# endif
 #else
         { PCRE_EXTRA_CALLOUT_DATA, NULL, 0, NULL, NULL };
 #endif
           new_extra.study_data = extra->study_data;
           new_extra.match_limit = extra->match_limit;
           new_extra.tables = extra->tables;
-#ifdef PCRE_CONFIG_MATCH_LIMIT_RECURSION
+#ifdef PCRE_EXTRA_MATCH_LIMIT_RECURSION
           new_extra.match_limit_recursion = extra->match_limit_recursion;
 #endif
 
 (* OASIS_START *)
-(* DO NOT EDIT (digest: acaed930fd25a07fd01f78360b273414) *)
+(* DO NOT EDIT (digest: c5eca8bd10eb9c445c8f46ac096beff6) *)
 module OASISGettext = struct
 (* # 21 "/Users/mmottl/local/darwin11.3.0/src/oasis-0.3.0/src/oasis/OASISGettext.ml" *)
 
           (["oasis_library_pcre_ccopt"; "compile"],
             [
                (OASISExpr.EBool true,
-                 S [A "-ccopt"; A "-O2"; A "-ccopt"; A "-DPIC"])
+                 S
+                   [
+                      A "-ccopt";
+                      A "-g";
+                      A "-ccopt";
+                      A "-O2";
+                      A "-ccopt";
+                      A "-fPIC";
+                      A "-ccopt";
+                      A "-DPIC"
+                   ]);
+               (OASISExpr.EAnd
+                  (OASISExpr.EFlag "strict",
+                    OASISExpr.ETest ("ccomp_type", "cc")),
+                 S
+                   [
+                      A "-ccopt";
+                      A "-g";
+                      A "-ccopt";
+                      A "-O2";
+                      A "-ccopt";
+                      A "-fPIC";
+                      A "-ccopt";
+                      A "-DPIC";
+                      A "-ccopt";
+                      A "-Wall";
+                      A "-ccopt";
+                      A "-pedantic";
+                      A "-ccopt";
+                      A "-Wextra";
+                      A "-ccopt";
+                      A "-Wunused";
+                      A "-ccopt";
+                      A "-Wno-long-long"
+                   ])
             ])
        ];
      includes =
 
 let dispatch_default = MyOCamlbuildBase.dispatch_default package_default;;
 
-# 503 "myocamlbuild.ml"
+# 537 "myocamlbuild.ml"
 (* OASIS_STOP *)
 
 let () =
 (* setup.ml generated for the first time by OASIS v0.3.0 *)
 
 (* OASIS_START *)
-(* DO NOT EDIT (digest: e5f446e6a9233fc7f13fe355212c0c97) *)
+(* DO NOT EDIT (digest: f1378aca1c189146af1c532f03970edf) *)
 (*
    Regenerated by OASIS v0.3.0
    Visit http://oasis.forge.ocamlcore.org for more information and
           files_ab = [];
           sections =
             [
+               Flag
+                 ({
+                     cs_name = "strict";
+                     cs_data = PropList.Data.create ();
+                     cs_plugin_data = [];
+                     },
+                   {
+                      flag_description = Some "Strict compile-time checks";
+                      flag_default = [(OASISExpr.EBool true, true)];
+                      });
                Library
                  ({
                      cs_name = "pcre";
                         [ExternalTool "ocamldoc"; ExternalTool "ocamlbuild"];
                       bs_c_sources = ["pcre_stubs.c"];
                       bs_data_files = [];
-                      bs_ccopt = [(OASISExpr.EBool true, ["-O2"; "-DPIC"])];
+                      bs_ccopt =
+                        [
+                           (OASISExpr.EBool true,
+                             ["-g"; "-O2"; "-fPIC"; "-DPIC"]);
+                           (OASISExpr.EAnd
+                              (OASISExpr.EFlag "strict",
+                                OASISExpr.ETest ("ccomp_type", "cc")),
+                             [
+                                "-g";
+                                "-O2";
+                                "-fPIC";
+                                "-DPIC";
+                                "-Wall";
+                                "-pedantic";
+                                "-Wextra";
+                                "-Wunused";
+                                "-Wno-long-long"
+                             ])
+                        ];
                       bs_cclib = [(OASISExpr.EBool true, [])];
                       bs_dlllib = [(OASISExpr.EBool true, [])];
                       bs_dllpath = [(OASISExpr.EBool true, [])];
           };
      oasis_fn = Some "_oasis";
      oasis_version = "0.3.0";
-     oasis_digest = Some "\012�l'�-e��A\\\127G���";
+     oasis_digest = Some "&S�f�\012��\149\1334n'\024\137^";
      oasis_exec = None;
      oasis_setup_args = [];
      setup_update = false;
 
 let setup () = BaseSetup.setup setup_t;;
 
-# 5831 "setup.ml"
+# 5859 "setup.ml"
 (* OASIS_STOP *)
 let () = setup ();;
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.