Commits

camlspotter  committed d72f5b9

rerun opam-setup 2.4.0

  • Participants
  • Parent commits dbe4a05
  • Branches release-2.4.0
  • Tags 2.4.0

Comments (0)

Files changed (3)

 (* OASIS_START *)
-(* DO NOT EDIT (digest: 88ed6e6bb9da0cbbd39aa3c4d7bb5134) *)
+(* DO NOT EDIT (digest: 33559fe166accf88dc68124788d2a515) *)
 This is the INSTALL file for the spotlib distribution.
 
 This package uses OASIS to generate its build system. See section OASIS for
-full information. 
+full information.
 
 Dependencies
 ============
 Uninstalling
 ============
 
-1. Go to the root of the package 
+1. Go to the root of the package
 2. Run 'ocaml setup.ml -uninstall'
 
 OASIS

File opam/spotlib.2.4.0/opam

 remove: [
   ["ocaml" "setup.ml" "-uninstall"]
 ]
+depends: [
+  "ocamlfind"
+  "omake"
+  "pa_ounit" {>="109.53.02"}
+]
 ocaml-version: [>= "4.01.0"]
-depends: ["ocamlfind" "omake" "pa_ounit" {>="109.53.02"}]
 (* setup.ml generated for the first time by OASIS v0.3.0 *)
 
 (* OASIS_START *)
-(* DO NOT EDIT (digest: 154fbc0418d8b9e59ff4417be6ebdb6f) *)
+(* DO NOT EDIT (digest: ab1582f164ce5b57a913ebb4cad13af3) *)
 (*
-   Regenerated by OASIS v0.3.0
+   Regenerated by OASIS v0.4.1
    Visit http://oasis.forge.ocamlcore.org for more information and
    documentation about functions used in this file.
 *)
 module OASISGettext = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISGettext.ml" *)
+(* # 22 "src/oasis/OASISGettext.ml" *)
+
 
   let ns_ str =
     str
 
+
   let s_ str =
     str
 
-  let f_ (str : ('a, 'b, 'c, 'd) format4) =
+
+  let f_ (str: ('a, 'b, 'c, 'd) format4) =
     str
 
+
   let fn_ fmt1 fmt2 n =
     if n = 1 then
       fmt1^^""
     else
       fmt2^^""
 
+
   let init =
     []
 
+
 end
 
 module OASISContext = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISContext.ml" *)
+(* # 22 "src/oasis/OASISContext.ml" *)
+
 
   open OASISGettext
 
+
   type level =
     [ `Debug
     | `Info
     | `Warning
     | `Error]
 
+
   type t =
     {
       quiet:                 bool;
       printf:                level -> string -> unit;
     }
 
+
   let printf lvl str =
     let beg =
       match lvl with
     in
       prerr_endline (beg^str)
 
+
   let default =
     ref
       {
         printf                = printf;
       }
 
+
   let quiet =
     {!default with quiet = true}
 
 end
 
 module OASISString = struct
-(* # 1 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISString.ml" *)
-
+(* # 22 "src/oasis/OASISString.ml" *)
 
 
   (** Various string utilities.
-     
+
       Mostly inspired by extlib and batteries ExtString and BatString libraries.
 
       @author Sylvain Le Gall
     *)
 
+
   let nsplitf str f =
     if str = "" then
       []
         push ();
         List.rev !lst
 
+
   (** [nsplit c s] Split the string [s] at char [c]. It doesn't include the
       separator.
     *)
   let nsplit str c =
     nsplitf str ((=) c)
 
+
   let find ~what ?(offset=0) str =
     let what_idx = ref 0 in
-    let str_idx = ref offset in 
-      while !str_idx < String.length str && 
+    let str_idx = ref offset in
+      while !str_idx < String.length str &&
             !what_idx < String.length what do
         if str.[!str_idx] = what.[!what_idx] then
           incr what_idx
       done;
       if !what_idx <> String.length what then
         raise Not_found
-      else 
+      else
         !str_idx - !what_idx
 
-  let sub_start str len = 
+
+  let sub_start str len =
     let str_len = String.length str in
     if len >= str_len then
       ""
     else
       String.sub str len (str_len - len)
 
+
   let sub_end ?(offset=0) str len =
     let str_len = String.length str in
     if len >= str_len then
     else
       String.sub str 0 (str_len - len)
 
+
   let starts_with ~what ?(offset=0) str =
     let what_idx = ref 0 in
     let str_idx = ref offset in
     let ok = ref true in
       while !ok &&
-            !str_idx < String.length str && 
+            !str_idx < String.length str &&
             !what_idx < String.length what do
         if str.[!str_idx] = what.[!what_idx] then
           incr what_idx
       done;
       if !what_idx = String.length what then
         true
-      else 
+      else
         false
 
+
   let strip_starts_with ~what str =
     if starts_with ~what str then
       sub_start str (String.length what)
     else
       raise Not_found
 
+
   let ends_with ~what ?(offset=0) str =
     let what_idx = ref ((String.length what) - 1) in
     let str_idx = ref ((String.length str) - 1) in
     let ok = ref true in
       while !ok &&
-            offset <= !str_idx && 
+            offset <= !str_idx &&
             0 <= !what_idx do
         if str.[!str_idx] = what.[!what_idx] then
           decr what_idx
       done;
       if !what_idx = -1 then
         true
-      else 
+      else
         false
 
+
   let strip_ends_with ~what str =
     if ends_with ~what str then
       sub_end str (String.length what)
     else
       raise Not_found
 
+
   let replace_chars f s =
     let buf = String.make (String.length s) 'X' in
       for i = 0 to String.length s - 1 do
       done;
       buf
 
+
 end
 
 module OASISUtils = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISUtils.ml" *)
+(* # 22 "src/oasis/OASISUtils.ml" *)
+
 
   open OASISGettext
 
+
   module MapString = Map.Make(String)
 
+
   let map_string_of_assoc assoc =
     List.fold_left
       (fun acc (k, v) -> MapString.add k v acc)
       MapString.empty
       assoc
 
+
   module SetString = Set.Make(String)
 
+
   let set_string_add_list st lst =
     List.fold_left
       (fun acc e -> SetString.add e acc)
       st
       lst
 
+
   let set_string_of_list =
     set_string_add_list
       SetString.empty
   let compare_csl s1 s2 =
     String.compare (String.lowercase s1) (String.lowercase s2)
 
+
   module HashStringCsl =
     Hashtbl.Make
       (struct
            Hashtbl.hash (String.lowercase s)
        end)
 
+
   let varname_of_string ?(hyphen='_') s =
     if String.length s = 0 then
       begin
           String.lowercase buf
       end
 
+
   let varname_concat ?(hyphen='_') p s =
     let what = String.make 1 hyphen in
     let p =
   let is_varname str =
     str = varname_of_string str
 
+
   let failwithf fmt = Printf.ksprintf failwith fmt
 
+
 end
 
 module PropList = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/PropList.ml" *)
+(* # 22 "src/oasis/PropList.ml" *)
+
 
   open OASISGettext
 
+
   type name = string
 
+
   exception Not_set of name * string option
   exception No_printer of name
   exception Unknown_field of name * name
 
+
   let () =
     Printexc.register_printer
       (function
          | Not_set (nm, Some rsn) ->
-             Some 
+             Some
                (Printf.sprintf (f_ "Field '%s' is not set: %s") nm rsn)
          | Not_set (nm, None) ->
-             Some 
+             Some
                (Printf.sprintf (f_ "Field '%s' is not set") nm)
          | No_printer nm ->
              Some
                (Printf.sprintf (f_ "No default printer for value %s") nm)
          | Unknown_field (nm, schm) ->
-             Some 
-               (Printf.sprintf (f_ "Field %s is not defined in schema %s") nm schm)
+             Some
+               (Printf.sprintf
+                  (f_ "Field %s is not defined in schema %s") nm schm)
          | _ ->
              None)
 
+
   module Data =
   struct
-
     type t =
         (name, unit -> unit) Hashtbl.t
 
     let clear t =
       Hashtbl.clear t
 
-(* # 71 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/PropList.ml" *)
+
+(* # 78 "src/oasis/PropList.ml" *)
   end
 
+
   module Schema =
   struct
-
     type ('ctxt, 'extra) value =
         {
           get:   Data.t -> string;
       t.name
   end
 
+
   module Field =
   struct
-
     type ('ctxt, 'value, 'extra) t =
         {
           set:    Data.t -> ?context:'ctxt -> 'value -> unit;
 
     let fgets data t =
       t.gets data
-
   end
 
+
   module FieldRO =
   struct
-
     let create ?schema ?name ?parse ?print ?default ?update ?help extra =
       let fld =
         Field.create ?schema ?name ?parse ?print ?default ?update ?help extra
       in
         fun data -> Field.fget data fld
-
   end
 end
 
 module OASISMessage = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISMessage.ml" *)
+(* # 22 "src/oasis/OASISMessage.ml" *)
 
 
   open OASISGettext
   open OASISContext
 
+
   let generic_message ~ctxt lvl fmt =
     let cond =
       if ctxt.quiet then
              end)
         fmt
 
+
   let debug ~ctxt fmt =
     generic_message ~ctxt `Debug fmt
 
+
   let info ~ctxt fmt =
     generic_message ~ctxt `Info fmt
 
+
   let warning ~ctxt fmt =
     generic_message ~ctxt `Warning fmt
 
+
   let error ~ctxt fmt =
     generic_message ~ctxt `Error fmt
 
 end
 
 module OASISVersion = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISVersion.ml" *)
+(* # 22 "src/oasis/OASISVersion.ml" *)
+
 
   open OASISGettext
 
 
 
+
+
   type s = string
 
+
   type t = string 
 
+
   type comparator =
     | VGreater of t
     | VGreaterEqual of t
     | VAnd of comparator * comparator
     
 
+
   (* Range of allowed characters *)
   let is_digit c =
     '0' <= c && c <= '9'
 
+
   let is_alpha c =
     ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z')
 
+
   let is_special =
     function
       | '.' | '+' | '-' | '~' -> true
       | _ -> false
 
+
   let rec version_compare v1 v2 =
     if v1 <> "" || v2 <> "" then
       begin
               while !p < String.length v && is_digit v.[!p] do
                 incr p
               done;
-              let substr = 
+              let substr =
                 String.sub v !p ((String.length v) - !p)
-              in 
-              let res = 
-                match String.sub v start_p (!p - start_p) with 
+              in
+              let res =
+                match String.sub v start_p (!p - start_p) with
                   | "" -> 0
                   | s -> int_of_string s
               in
 
   let version_of_string str = str
 
+
   let string_of_version t = t
 
+
+  let version_compare_string s1 s2 =
+    version_compare (version_of_string s1) (version_of_string s2)
+
+
   let chop t =
     try
       let pos =
     with Not_found ->
       t
 
+
   let rec comparator_apply v op =
     match op with
       | VGreater cv ->
       | VAnd (op1, op2) ->
           (comparator_apply v op1) && (comparator_apply v op2)
 
+
   let rec string_of_comparator =
     function
       | VGreater v  -> "> "^(string_of_version v)
       | VAnd (c1, c2) ->
           (string_of_comparator c1)^" && "^(string_of_comparator c2)
 
+
   let rec varname_of_comparator =
     let concat p v =
       OASISUtils.varname_concat
         | VAnd (c1, c2) ->
             (varname_of_comparator c1)^"_and_"^(varname_of_comparator c2)
 
-  let version_0_3_or_after t =
-    comparator_apply t (VGreaterEqual (string_of_version "0.3"))
+
+  let rec comparator_ge v' =
+    let cmp v = version_compare v v' >= 0 in
+    function
+      | VEqual v
+      | VGreaterEqual v
+      | VGreater v -> cmp v
+      | VLesserEqual _
+      | VLesser _ -> false
+      | VOr (c1, c2) -> comparator_ge v' c1 || comparator_ge v' c2
+      | VAnd (c1, c2) -> comparator_ge v' c1 && comparator_ge v' c2
+
 
 end
 
 module OASISLicense = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISLicense.ml" *)
+(* # 22 "src/oasis/OASISLicense.ml" *)
+
 
   (** License for _oasis fields
       @author Sylvain Le Gall
 
 
 
+
+
   type license = string 
 
+
   type license_exception = string 
 
+
   type license_version =
     | Version of OASISVersion.t
     | VersionOrLater of OASISVersion.t
     | NoVersion
     
 
+
   type license_dep_5_unit =
     {
       license:   license;
     }
     
 
+
   type license_dep_5 =
     | DEP5Unit of license_dep_5_unit
     | DEP5Or of license_dep_5 list
     | DEP5And of license_dep_5 list
     
 
+
   type t =
     | DEP5License of license_dep_5
     | OtherLicense of string (* URL *)
     
 
+
 end
 
 module OASISExpr = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISExpr.ml" *)
+(* # 22 "src/oasis/OASISExpr.ml" *)
+
+
 
 
 
   open OASISGettext
 
+
   type test = string 
 
+
   type flag = string 
 
+
   type t =
     | EBool of bool
     | ENot of t
     | ETest of test * string
     
 
+
   type 'a choices = (t * 'a) list 
 
+
   let eval var_get t =
     let rec eval' =
       function
     in
       eval' t
 
+
   let choose ?printer ?name var_get lst =
     let rec choose_aux =
       function
     in
       choose_aux (List.rev lst)
 
+
 end
 
 module OASISTypes = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISTypes.ml" *)
+(* # 22 "src/oasis/OASISTypes.ml" *)
+
 
 
 
   type args          = string list 
   type command_line  = (prog * arg list) 
 
+
   type findlib_name = string 
   type findlib_full = string 
 
+
   type compiled_object =
     | Byte
     | Native
     | Best
     
 
+
   type dependency =
     | FindlibPackage of findlib_full * OASISVersion.comparator option
     | InternalLibrary of name
     
 
+
   type tool =
     | ExternalTool of name
     | InternalExecutable of name
     
 
+
   type vcs =
     | Darcs
     | Git
     | OtherVCS of url
     
 
+
   type plugin_kind =
       [  `Configure
        | `Build
        | `Extra
       ]
 
+
   type plugin_data_purpose =
       [  `Configure
        | `Build
        | `Other of string
       ]
 
+
   type 'a plugin = 'a * name * OASISVersion.t option 
 
+
   type all_plugin = plugin_kind plugin
 
+
   type plugin_data = (all_plugin * plugin_data_purpose * (unit -> unit)) list
 
-(* # 102 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISTypes.ml" *)
+
+(* # 115 "src/oasis/OASISTypes.ml" *)
+
 
   type 'a conditional = 'a OASISExpr.choices 
 
+
   type custom =
       {
         pre_command:  (command_line option) conditional;
       }
       
 
+
   type common_section =
       {
         cs_name: name;
       }
       
 
+
   type build_section =
       {
         bs_build:           bool conditional;
       }
       
 
+
   type library =
       {
         lib_modules:            string list;
         lib_findlib_containers: findlib_name list;
       } 
 
+
+  type object_ =
+      {
+        obj_modules:            string list;
+        obj_findlib_fullname:   findlib_name list option;
+      } 
+
+
   type executable =
       {
         exec_custom:          bool;
         exec_main_is:         unix_filename;
       } 
 
+
   type flag =
       {
         flag_description:  string option;
         flag_default:      bool conditional;
       } 
 
+
   type source_repository =
       {
         src_repo_type:        vcs;
         src_repo_subdir:      unix_filename option;
       } 
 
+
   type test =
       {
         test_type:               [`Test] plugin;
         test_tools:              tool list;
       } 
 
+
   type doc_format =
     | HTML of unix_filename
     | DocText
     | OtherDoc
     
 
+
   type doc =
       {
         doc_type:        [`Doc] plugin;
         doc_build_tools: tool list;
       } 
 
+
   type section =
     | Library    of common_section * build_section * library
+    | Object     of common_section * build_section * object_
     | Executable of common_section * build_section * executable
     | Flag       of common_section * flag
     | SrcRepo    of common_section * source_repository
     | Doc        of common_section * doc
     
 
+
   type section_kind =
-      [ `Library | `Executable | `Flag | `SrcRepo | `Test | `Doc ]
-
-  type package = 
+      [ `Library | `Object | `Executable | `Flag | `SrcRepo | `Test | `Doc ]
+
+
+  type package =
       {
         oasis_version:    OASISVersion.t;
         ocaml_version:    OASISVersion.comparator option;
         findlib_version:  OASISVersion.comparator option;
+        alpha_features:   string list;
+        beta_features:    string list;
         name:             package_name;
         version:          OASISVersion.t;
         license:          OASISLicense.t;
         plugin_data:      plugin_data;
       } 
 
+
 end
 
+module OASISFeatures = struct
+(* # 22 "src/oasis/OASISFeatures.ml" *)
+
+  open OASISTypes
+  open OASISUtils
+  open OASISGettext
+  open OASISVersion
+
+  module MapPlugin =
+    Map.Make
+      (struct
+         type t = plugin_kind * name
+         let compare = Pervasives.compare
+       end)
+
+  module Data =
+  struct
+    type t =
+        {
+          oasis_version: OASISVersion.t;
+          plugin_versions: OASISVersion.t option MapPlugin.t;
+          alpha_features: string list;
+          beta_features: string list;
+        }
+
+    let create oasis_version alpha_features beta_features =
+      {
+        oasis_version = oasis_version;
+        plugin_versions = MapPlugin.empty;
+        alpha_features = alpha_features;
+        beta_features = beta_features
+      }
+
+    let of_package pkg =
+      create
+        pkg.OASISTypes.oasis_version
+        pkg.OASISTypes.alpha_features
+        pkg.OASISTypes.beta_features
+
+    let add_plugin (plugin_kind, plugin_name, plugin_version) t =
+      {t with
+           plugin_versions = MapPlugin.add
+                               (plugin_kind, plugin_name)
+                               plugin_version
+                               t.plugin_versions}
+
+    let plugin_version plugin_kind plugin_name t =
+      MapPlugin.find (plugin_kind, plugin_name) t.plugin_versions
+  end
+
+  type origin =
+    | Field of string * string
+    | Section of string
+    | NoOrigin
+
+  type stage = Alpha | Beta
+
+
+  let string_of_stage =
+    function
+      | Alpha -> "alpha"
+      | Beta -> "beta"
+
+
+  let field_of_stage =
+    function
+      | Alpha -> "AlphaFeatures"
+      | Beta -> "BetaFeatures"
+
+  type publication = InDev of stage | SinceVersion of OASISVersion.t
+
+  type t =
+      {
+        name: string;
+        plugin: all_plugin option;
+        publication: publication;
+        description: unit -> string;
+      }
+
+  (* TODO: mutex protect this. *)
+  let all_features = Hashtbl.create 13
+
+
+  let since_version ver_str = SinceVersion (version_of_string ver_str)
+  let alpha = InDev Alpha
+  let beta = InDev Beta
+
+
+  let data_check t data origin =
+    let no_message = "no message" in
+
+    let check_feature features stage =
+      let has_feature = List.mem t.name features in
+      if not has_feature then
+        match origin with
+          | Field (fld, where) ->
+              Some
+                (Printf.sprintf
+                   (f_ "Field %s in %s is only available when feature %s \
+                        is in field %s.")
+                   fld where t.name (field_of_stage stage))
+          | Section sct ->
+              Some
+                (Printf.sprintf
+                   (f_ "Section %s is only available when features %s \
+                        is in field %s.")
+                   sct t.name (field_of_stage stage))
+          | NoOrigin ->
+              Some no_message
+      else
+        None
+    in
+
+    let version_is_good ~min_version version fmt =
+      let version_is_good =
+        OASISVersion.comparator_apply
+          version (OASISVersion.VGreaterEqual min_version)
+      in
+        Printf.ksprintf
+          (fun str ->
+             if version_is_good then
+               None
+             else
+               Some str)
+          fmt
+    in
+
+    match origin, t.plugin, t.publication with
+      | _, _, InDev Alpha -> check_feature data.Data.alpha_features Alpha
+      | _, _, InDev Beta -> check_feature data.Data.beta_features Beta
+      | Field(fld, where), None, SinceVersion min_version ->
+          version_is_good ~min_version data.Data.oasis_version
+            (f_ "Field %s in %s is only valid since OASIS v%s, update \
+                 OASISFormat field from '%s' to '%s' after checking \
+                 OASIS changelog.")
+            fld where (string_of_version min_version)
+            (string_of_version data.Data.oasis_version)
+            (string_of_version min_version)
+
+      | Field(fld, where), Some(plugin_knd, plugin_name, _),
+        SinceVersion min_version ->
+          begin
+            try
+              let plugin_version_current =
+                try
+                  match Data.plugin_version plugin_knd plugin_name data with
+                    | Some ver -> ver
+                    | None ->
+                        failwithf
+                          (f_ "Field %s in %s is only valid for the OASIS \
+                               plugin %s since v%s, but no plugin version is \
+                               defined in the _oasis file, change '%s' to \
+                               '%s (%s)' in your _oasis file.")
+                          fld where plugin_name (string_of_version min_version)
+                          plugin_name
+                          plugin_name (string_of_version min_version)
+                with Not_found ->
+                  failwithf
+                    (f_ "Field %s in %s is only valid when the OASIS plugin %s \
+                         is defined.")
+                    fld where plugin_name
+              in
+              version_is_good ~min_version plugin_version_current
+                (f_ "Field %s in %s is only valid for the OASIS plugin %s \
+                     since v%s, update your plugin from '%s (%s)' to \
+                     '%s (%s)' after checking the plugin's changelog.")
+                fld where plugin_name (string_of_version min_version)
+                plugin_name (string_of_version plugin_version_current)
+                plugin_name (string_of_version min_version)
+            with Failure msg ->
+              Some msg
+          end
+
+      | Section sct, None, SinceVersion min_version ->
+          version_is_good ~min_version data.Data.oasis_version
+            (f_ "Section %s is only valid for since OASIS v%s, update \
+                 OASISFormat field from '%s' to '%s' after checking OASIS \
+                 changelog.")
+            sct (string_of_version min_version)
+            (string_of_version data.Data.oasis_version)
+            (string_of_version min_version)
+
+      | Section sct, Some(plugin_knd, plugin_name, _),
+        SinceVersion min_version ->
+          begin
+            try
+              let plugin_version_current =
+                try
+                  match Data.plugin_version plugin_knd plugin_name data with
+                    | Some ver -> ver
+                    | None ->
+                        failwithf
+                          (f_ "Section %s is only valid for the OASIS \
+                               plugin %s since v%s, but no plugin version is \
+                               defined in the _oasis file, change '%s' to \
+                               '%s (%s)' in your _oasis file.")
+                          sct plugin_name (string_of_version min_version)
+                          plugin_name
+                          plugin_name (string_of_version min_version)
+                with Not_found ->
+                  failwithf
+                    (f_ "Section %s is only valid when the OASIS plugin %s \
+                         is defined.")
+                    sct plugin_name
+              in
+              version_is_good ~min_version plugin_version_current
+                (f_ "Section %s is only valid for the OASIS plugin %s \
+                     since v%s, update your plugin from '%s (%s)' to \
+                     '%s (%s)' after checking the plugin's changelog.")
+                sct plugin_name (string_of_version min_version)
+                plugin_name (string_of_version plugin_version_current)
+                plugin_name (string_of_version min_version)
+            with Failure msg ->
+              Some msg
+          end
+
+      | NoOrigin, None, SinceVersion min_version ->
+          version_is_good ~min_version data.Data.oasis_version "%s" no_message
+
+      | NoOrigin, Some(plugin_knd, plugin_name, _), SinceVersion min_version ->
+          begin
+            try
+              let plugin_version_current =
+                match Data.plugin_version plugin_knd plugin_name data with
+                  | Some ver -> ver
+                  | None -> raise Not_found
+              in
+              version_is_good ~min_version plugin_version_current
+                "%s" no_message
+            with Not_found ->
+              Some no_message
+          end
+
+
+  let data_assert t data origin =
+    match data_check t data origin with
+      | None -> ()
+      | Some str -> failwith str
+
+
+  let data_test t data =
+    match data_check t data NoOrigin with
+      | None -> true
+      | Some str -> false
+
+
+  let package_test t pkg =
+    data_test t (Data.of_package pkg)
+
+
+  let create ?plugin name publication description =
+    let () =
+      if Hashtbl.mem all_features name then
+        failwithf "Feature '%s' is already declared." name
+    in
+    let t =
+      {
+        name = name;
+        plugin = plugin;
+        publication = publication;
+        description = description;
+      }
+    in
+      Hashtbl.add all_features name t;
+      t
+
+
+  let get_stage name =
+    try
+      (Hashtbl.find all_features name).publication
+    with Not_found ->
+      failwithf (f_ "Feature %s doesn't exist.") name
+
+
+  let list () =
+    Hashtbl.fold (fun _ v acc -> v :: acc) all_features []
+
+  (*
+   * Real flags.
+   *)
+
+
+  let features =
+    create "features_fields"
+      (since_version "0.4")
+      (fun () ->
+         s_ "Enable to experiment not yet official features.")
+
+
+  let flag_docs =
+    create "flag_docs"
+      (since_version "0.3")
+      (fun () ->
+         s_ "Building docs require '-docs' flag at configure.")
+
+
+  let flag_tests =
+    create "flag_tests"
+      (since_version "0.3")
+      (fun () ->
+         s_ "Running tests require '-tests' flag at configure.")
+
+
+  let pack =
+    create "pack"
+      (since_version "0.3")
+      (fun () ->
+         s_ "Allow to create packed library.")
+
+
+  let section_object =
+    create "section_object" beta
+      (fun () ->
+         s_ "Implement an object section.")
+
+
+  let dynrun_for_release =
+    create "dynrun_for_release" alpha
+      (fun () ->
+         s_ "Make '-setup-update dynamic' suitable for releasing project.")
+end
+
 module OASISUnixPath = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISUnixPath.ml" *)
+(* # 22 "src/oasis/OASISUnixPath.ml" *)
+
 
   type unix_filename = string
   type unix_dirname = string
 
+
   type host_filename = string
   type host_dirname = string
 
+
   let current_dir_name = "."
 
+
   let parent_dir_name = ".."
 
+
   let is_current_dir fn =
     fn = current_dir_name || fn = ""
 
+
   let concat f1 f2 =
     if is_current_dir f1 then
       f2
       in
         f1'^"/"^f2
 
+
   let make =
     function
       | hd :: tl ->
       | [] ->
           invalid_arg "OASISUnixPath.make"
 
+
   let dirname f =
     try
       String.sub f 0 (String.rindex f '/')
     with Not_found ->
       current_dir_name
 
+
   let basename f =
     try
       let pos_start =
     with Not_found ->
       f
 
+
   let chop_extension f =
     try
       let last_dot =
     with Not_found ->
       f
 
+
   let capitalize_file f =
     let dir = dirname f in
     let base = basename f in
     concat dir (String.capitalize base)
 
+
   let uncapitalize_file f =
     let dir = dirname f in
     let base = basename f in
     concat dir (String.uncapitalize base)
 
+
 end
 
 module OASISHostPath = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISHostPath.ml" *)
+(* # 22 "src/oasis/OASISHostPath.ml" *)
 
 
   open Filename
 
+
   module Unix = OASISUnixPath
 
+
   let make =
     function
       | [] ->
       | hd :: tl ->
           List.fold_left Filename.concat hd tl
 
+
   let of_unix ufn =
     if Sys.os_type = "Unix" then
       ufn
 end
 
 module OASISSection = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISSection.ml" *)
+(* # 22 "src/oasis/OASISSection.ml" *)
+
 
   open OASISTypes
 
-  let section_kind_common = 
+
+  let section_kind_common =
     function
-      | Library (cs, _, _) -> 
+      | Library (cs, _, _) ->
           `Library, cs
+      | Object (cs, _, _) ->
+          `Object, cs
       | Executable (cs, _, _) ->
           `Executable, cs
       | Flag (cs, _) ->
       | Doc (cs, _) ->
           `Doc, cs
 
+
   let section_common sct =
     snd (section_kind_common sct)
 
+
   let section_common_set cs =
     function
       | Library (_, bs, lib)     -> Library (cs, bs, lib)
+      | Object (_, bs, obj)      -> Object (cs, bs, obj)
       | Executable (_, bs, exec) -> Executable (cs, bs, exec)
       | Flag (_, flg)            -> Flag (cs, flg)
       | SrcRepo (_, src_repo)    -> SrcRepo (cs, src_repo)
       | Test (_, tst)            -> Test (cs, tst)
       | Doc (_, doc)             -> Doc (cs, doc)
 
+
   (** Key used to identify section
     *)
-  let section_id sct = 
-    let k, cs = 
+  let section_id sct =
+    let k, cs =
       section_kind_common sct
     in
       k, cs.cs_name
 
+
   let string_of_section sct =
     let k, nm =
       section_id sct
     in
       (match k with
-         | `Library    -> "library" 
+         | `Library    -> "library"
+         | `Object     -> "object"
          | `Executable -> "executable"
          | `Flag       -> "flag"
          | `SrcRepo    -> "src repository"
          | `Doc        -> "doc")
       ^" "^nm
 
+
   let section_find id scts =
     List.find
       (fun sct -> id = section_id sct)
       scts
 
+
   module CSection =
   struct
     type t = section
 
     let id = section_id
 
-    let compare t1 t2 = 
+    let compare t1 t2 =
       compare (id t1) (id t2)
-      
+
     let equal t1 t2 =
       (id t1) = (id t2)
 
       Hashtbl.hash (id t)
   end
 
+
   module MapSection = Map.Make(CSection)
   module SetSection = Set.Make(CSection)
 
+
 end
 
 module OASISBuildSection = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISBuildSection.ml" *)
+(* # 22 "src/oasis/OASISBuildSection.ml" *)
+
 
 end
 
 module OASISExecutable = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISExecutable.ml" *)
+(* # 22 "src/oasis/OASISExecutable.ml" *)
+
 
   open OASISTypes
 
-  let unix_exec_is (cs, bs, exec) is_native ext_dll suffix_program = 
-    let dir = 
+
+  let unix_exec_is (cs, bs, exec) is_native ext_dll suffix_program =
+    let dir =
       OASISUnixPath.concat
         bs.bs_path
         (OASISUnixPath.dirname exec.exec_main_is)
     in
-    let is_native_exec = 
+    let is_native_exec =
       match bs.bs_compiled_object with
         | Native -> true
         | Best -> is_native ()
         dir
         (cs.cs_name^(suffix_program ())),
 
-      if not is_native_exec && 
-         not exec.exec_custom && 
+      if not is_native_exec &&
+         not exec.exec_custom &&
          bs.bs_c_sources <> [] then
         Some (dir^"/dll"^cs.cs_name^"_stubs"^(ext_dll ()))
       else
         None
 
+
 end
 
 module OASISLibrary = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISLibrary.ml" *)
+(* # 22 "src/oasis/OASISLibrary.ml" *)
+
 
   open OASISTypes
   open OASISUtils
   open OASISGettext
   open OASISSection
 
-  type library_name = name
-  type findlib_part_name = name
-  type 'a map_of_findlib_part_name = 'a OASISUtils.MapString.t
-
-  exception InternalLibraryNotFound of library_name
-  exception FindlibPackageNotFound of findlib_name
-
-  type group_t =
-    | Container of findlib_name * group_t list
-    | Package of (findlib_name *
-                  common_section *
-                  build_section *
-                  library *
-                  group_t list)
 
   (* Look for a module file, considering capitalization or not. *)
-  let find_module source_file_exists (cs, bs, lib) modul =
+  let find_module source_file_exists bs modul =
     let possible_base_fn =
       List.map
         (OASISUnixPath.concat bs.bs_path)
         (`No_sources possible_base_fn)
         possible_base_fn
 
+
   let source_unix_files ~ctxt (cs, bs, lib) source_file_exists =
     List.fold_left
       (fun acc modul ->
-         match find_module source_file_exists (cs, bs, lib) modul with
+         match find_module source_file_exists bs modul with
            | `Sources (base_fn, lst) ->
                (base_fn, lst) :: acc
            | `No_sources _ ->
       []
       (lib.lib_modules @ lib.lib_internal_modules)
 
+
   let generated_unix_files
         ~ctxt
         ~is_native
         ~source_file_exists
         (cs, bs, lib) =
 
-    let find_modules lst ext = 
+    let find_modules lst ext =
       let find_module modul =
-        match find_module source_file_exists (cs, bs, lib) modul with
+        match find_module source_file_exists bs modul with
+          | `Sources (base_fn, [fn]) when ext <> "cmi"
+                                       && Filename.check_suffix fn ".mli" ->
+              None (* No implementation files for pure interface. *)
           | `Sources (base_fn, _) ->
-              [base_fn]
+              Some [base_fn]
           | `No_sources lst ->
               OASISMessage.warning
                 ~ctxt
                 (f_ "Cannot find source file matching \
                      module '%s' in library %s")
                 modul cs.cs_name;
-              lst
+              Some lst
       in
-      List.map 
-        (fun nm -> 
-           List.map 
-             (fun base_fn -> base_fn ^"."^ext)
-             (find_module nm))
+      List.fold_left
+        (fun acc nm ->
+          match find_module nm with
+            | None -> acc
+            | Some base_fns ->
+                List.map (fun base_fn -> base_fn ^"."^ext) base_fns :: acc)
+        []
         lst
     in
 
     (* The .cmx that be compiled along *)
     let cmxs =
       let should_be_built =
-        (not lib.lib_pack) && (* Do not install .cmx packed submodules *)
         match bs.bs_compiled_object with
           | Native -> true
           | Best -> is_native
           | Byte -> false
       in
         if should_be_built then
-          find_modules
-            (lib.lib_modules @ lib.lib_internal_modules)
-            "cmx"
+          if lib.lib_pack then
+            find_modules
+              [cs.cs_name]
+              "cmx"
+          else
+            find_modules
+              (lib.lib_modules @ lib.lib_internal_modules)
+              "cmx"
         else
           []
     in
         add_pack_header ([cs.cs_name^".cma"] :: acc)
       in
       let native acc =
-        let acc = 
+        let acc =
           add_pack_header
             (if has_native_dynlink then
                [cs.cs_name^".cmxs"] :: acc
            acc_nopath)
         (headers @ cmxs)
 
-  type data = common_section * build_section * library
+
+end
+
+module OASISObject = struct
+(* # 22 "src/oasis/OASISObject.ml" *)
+
+
+  open OASISTypes
+  open OASISGettext
+
+
+  let source_unix_files ~ctxt (cs, bs, obj) source_file_exists =
+    List.fold_left
+      (fun acc modul ->
+         match OASISLibrary.find_module source_file_exists bs modul with
+           | `Sources (base_fn, lst) ->
+               (base_fn, lst) :: acc
+           | `No_sources _ ->
+               OASISMessage.warning
+                 ~ctxt
+                 (f_ "Cannot find source file matching \
+                      module '%s' in object %s")
+                 modul cs.cs_name;
+               acc)
+      []
+      obj.obj_modules
+
+
+  let generated_unix_files
+        ~ctxt
+        ~is_native
+        ~source_file_exists
+        (cs, bs, obj) =
+
+    let find_module ext modul =
+      match OASISLibrary.find_module source_file_exists bs modul with
+        | `Sources (base_fn, _) -> [base_fn ^ ext]
+        | `No_sources lst ->
+          OASISMessage.warning
+            ~ctxt
+            (f_ "Cannot find source file matching \
+                 module '%s' in object %s")
+            modul cs.cs_name ;
+          lst
+    in
+
+    let header, byte, native, c_object, f =
+      match obj.obj_modules with
+        | [ m ] -> (find_module ".cmi" m,
+                    find_module ".cmo" m,
+                    find_module ".cmx" m,
+                    find_module ".o" m,
+                    fun x -> x)
+        | _ -> ([cs.cs_name ^ ".cmi"],
+                [cs.cs_name ^ ".cmo"],
+                [cs.cs_name ^ ".cmx"],
+                [cs.cs_name ^ ".o"],
+                OASISUnixPath.concat bs.bs_path)
+    in
+      List.map (List.map f) (
+        match bs.bs_compiled_object with
+          | Native ->
+              native :: c_object :: byte :: header :: []
+          | Best when is_native ->
+              native :: c_object :: byte :: header :: []
+          | Byte | Best ->
+              byte :: header :: [])
+
+
+end
+
+module OASISFindlib = struct
+(* # 22 "src/oasis/OASISFindlib.ml" *)
+
+
+  open OASISTypes
+  open OASISUtils
+  open OASISGettext
+  open OASISSection
+
+
+  type library_name = name
+  type findlib_part_name = name
+  type 'a map_of_findlib_part_name = 'a OASISUtils.MapString.t
+
+
+  exception InternalLibraryNotFound of library_name
+  exception FindlibPackageNotFound of findlib_name
+
+
+  type group_t =
+    | Container of findlib_name * group_t list
+    | Package of (findlib_name *
+                  common_section *
+                  build_section *
+                  [`Library of library | `Object of object_] *
+                  group_t list)
+
+
+  type data = common_section *
+              build_section *
+              [`Library of library | `Object of object_]
   type tree =
     | Node of (data option) * (tree MapString.t)
     | Leaf of data
 
+
   let findlib_mapping pkg =
     (* Map from library name to either full findlib name or parts + parent. *)
     let fndlb_parts_of_lib_name =
                                mp
                    end
 
+               | Object (cs, _, obj) ->
+                   begin
+                     let obj_name = cs.cs_name in
+                     if MapString.mem obj_name mp then
+                       failwithf
+                         (f_ "The object name '%s' is used more than once.")
+                         obj_name;
+                     let findlib_full_name = match obj.obj_findlib_fullname with
+                       | Some ns -> String.concat "." ns
+                       | None -> obj_name
+                     in
+                     MapString.add
+                       obj_name
+                       (`Solved findlib_full_name)
+                       mp
+                   end
+
                | Executable _ | Test _ | Flag _ | SrcRepo _ | Doc _ ->
                    mp)
           MapString.empty
         let lib_name = cs.cs_name in
           findlib_name_of_library_name lib_name
       in
-      let rec add_children nm_lst (children : tree MapString.t) =
+      let rec add_children nm_lst (children: tree MapString.t) =
         match nm_lst with
           | (hd :: tl) ->
               begin
         (fun mp ->
            function
              | Library (cs, bs, lib) ->
-                 add (cs, bs, lib) mp
+                 add (cs, bs, `Library lib) mp
+             | Object (cs, bs, obj) ->
+                 add (cs, bs, `Object obj) mp
              | _ ->
                  mp)
         MapString.empty
       findlib_name_of_library_name,
       library_name_of_findlib_name
 
+
   let findlib_of_group =
     function
       | Container (fndlb_nm, _)
       | Package (fndlb_nm, _, _, _, _) -> fndlb_nm
 
+
   let root_of_group grp =
     let rec root_lib_aux =
       (* We do a DFS in the group. *)
               (f_ "Unable to determine root library of findlib library '%s'")
               (findlib_of_group grp)
 
+
 end
 
 module OASISFlag = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISFlag.ml" *)
+(* # 22 "src/oasis/OASISFlag.ml" *)
+
 
 end
 
 module OASISPackage = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISPackage.ml" *)
+(* # 22 "src/oasis/OASISPackage.ml" *)
+
 
 end
 
 module OASISSourceRepository = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISSourceRepository.ml" *)
+(* # 22 "src/oasis/OASISSourceRepository.ml" *)
+
 
 end
 
 module OASISTest = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISTest.ml" *)
+(* # 22 "src/oasis/OASISTest.ml" *)
+
 
 end
 
 module OASISDocument = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISDocument.ml" *)
+(* # 22 "src/oasis/OASISDocument.ml" *)
+
 
 end
 
 module OASISExec = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISExec.ml" *)
+(* # 22 "src/oasis/OASISExec.ml" *)
+
 
   open OASISGettext
   open OASISUtils
   open OASISMessage
 
+
   (* TODO: I don't like this quote, it is there because $(rm) foo expands to
    * 'rm -f' foo...
    *)
         | Some f, i ->
             f i
 
+
   let run_read_output ~ctxt ?f_exit_code cmd args =
     let fn =
       Filename.temp_file "oasis-" ".txt"
         (try Sys.remove fn with _ -> ());
         raise e
 
+
   let run_read_one_line ~ctxt ?f_exit_code cmd args =
     match run_read_output ~ctxt ?f_exit_code cmd args with
       | [fst] ->
 end
 
 module OASISFileUtil = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/oasis/OASISFileUtil.ml" *)
+(* # 22 "src/oasis/OASISFileUtil.ml" *)
+
 
   open OASISGettext
 
+
   let file_exists_case fn =
     let dirname = Filename.dirname fn in
     let basename = Filename.basename fn in
       else
         false
 
+
   let find_file ?(case_sensitive=true) paths exts =
 
     (* Cardinal product of two list *)
         (List.map
            (fun a ->
               List.map
-                (fun b -> a,b)
+                (fun b -> a, b)
                 lst2)
            lst1)
     in
         | p1 :: p2 :: tl ->
             let acc =
               (List.map
-                 (fun (a,b) -> Filename.concat a b)
+                 (fun (a, b) -> Filename.concat a b)
                  (p1 * p2))
             in
               combined_paths (acc :: tl)
 
     let alternatives =
       List.map
-        (fun (p,e) ->
+        (fun (p, e) ->
            if String.length e > 0 && e.[0] <> '.' then
              p ^ "." ^ e
            else
              p ^ e)
         ((combined_paths paths) * exts)
     in
-      List.find
+      List.find (fun file ->
         (if case_sensitive then
-           file_exists_case
+           file_exists_case file
          else
-           Sys.file_exists)
-        alternatives
+           Sys.file_exists file)
+        && not (Sys.is_directory file)
+      ) alternatives
+
 
   let which ~ctxt prg =
     let path_sep =
     in
       find_file ~case_sensitive:false [path_lst; [prg]] exec_ext
 
+
   (**/**)
   let rec fix_dir dn =
     (* Windows hack because Sys.file_exists "src\\" = false when
       else
         dn
 
+
   let q = Filename.quote
   (**/**)
 
+
   let cp ~ctxt ?(recurse=false) src tgt =
     if recurse then
       match Sys.os_type with
          | _ -> "cp")
         [q src; q tgt]
 
+
   let mkdir ~ctxt tgt =
     OASISExec.run ~ctxt
       (match Sys.os_type with
          | _ -> "mkdir")
       [q tgt]
 
+
   let rec mkdir_parent ~ctxt f tgt =
     let tgt =
       fix_dir tgt
             end
         end
 
+
   let rmdir ~ctxt tgt =
     if Sys.readdir tgt = [||] then
       begin
               OASISExec.run ~ctxt "rm" ["-r"; q tgt]
       end
 
+
   let glob ~ctxt fn =
    let basename =
      Filename.basename fn
 end
 
 
-# 2142 "setup.ml"
+# 2766 "setup.ml"
 module BaseEnvLight = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/base/BaseEnvLight.ml" *)
+(* # 22 "src/base/BaseEnvLight.ml" *)
+
 
   module MapString = Map.Make(String)
 
+
   type t = string MapString.t
 
+
   let default_filename =
     Filename.concat
       (Sys.getcwd ())
       "setup.data"
 
+
   let load ?(allow_empty=false) ?(filename=default_filename) () =
     if Sys.file_exists filename then
       begin
              filename)
       end
 
+
   let var_get name env =
     let rec var_expand str =
       let buff =
     in
       var_expand (MapString.find name env)
 
+
   let var_choose lst env =
     OASISExpr.choose
       (fun nm -> var_get nm env)
 end
 
 
-# 2240 "setup.ml"
+# 2870 "setup.ml"
 module BaseContext = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/base/BaseContext.ml" *)
+(* # 22 "src/base/BaseContext.ml" *)
+
 
   open OASISContext
 
+
   let args = args
 
+
   let default = default
 
 end
 
 module BaseMessage = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/base/BaseMessage.ml" *)
+(* # 22 "src/base/BaseMessage.ml" *)
+
 
   (** Message to user, overrid for Base
       @author Sylvain Le Gall
   open OASISMessage
   open BaseContext
 
+
   let debug fmt   = debug ~ctxt:!default fmt
 
+
   let info fmt    = info ~ctxt:!default fmt
 
+
   let warning fmt = warning ~ctxt:!default fmt
 
+
   let error fmt = error ~ctxt:!default fmt
 
 end
 
 module BaseEnv = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/base/BaseEnv.ml" *)
+(* # 22 "src/base/BaseEnv.ml" *)
 
   open OASISGettext
   open OASISUtils
   open PropList
 
+
   module MapString = BaseEnvLight.MapString
 
+
   type origin_t =
     | ODefault
     | OGetEnv
     | OFileLoad
     | OCommandLine
 
+
   type cli_handle_t =
     | CLINone
     | CLIAuto
     | CLIEnable
     | CLIUser of (Arg.key * Arg.spec * Arg.doc) list
 
+
   type definition_t =
       {
         hide:       bool;
         group:      string option;
       }
 
+
   let schema =
     Schema.create "environment"
 
+
   (* Environment data *)
   let env =
     Data.create ()
 
+
   (* Environment data from file *)
   let env_from_file =
     ref MapString.empty
 
+
   (* Lexer for var *)
   let var_lxr =
     Genlex.make_lexer []
 
+
   let rec var_expand str =
     let buff =
       Buffer.create ((String.length str) * 2)
         str;
       Buffer.contents buff
 
+
   and var_get name =
     let vl =
       try
     in
       var_expand vl
 
+
   let var_choose ?printer ?name lst =
     OASISExpr.choose
       ?printer
       var_get
       lst
 
+
   let var_protect vl =
     let buff =
       Buffer.create (String.length vl)
         vl;
       Buffer.contents buff
 
+
   let var_define
         ?(hide=false)
         ?(dump=true)
       fun () ->
         var_expand (var_get_low (var_get_lst env))
 
+
   let var_redefine
         ?hide
         ?dump
           dflt
       end
 
-  let var_ignore (e : unit -> string) =
-    ()
+
+  let var_ignore (e: unit -> string) = ()
+
 
   let print_hidden =
     var_define
       "print_hidden"
       (fun () -> "false")
 
+
   let var_all () =
     List.rev
       (Schema.fold
          []
          schema)
 
+
   let default_filename =
     BaseEnvLight.default_filename
 
+
   let load ?allow_empty ?filename () =
     env_from_file := BaseEnvLight.load ?allow_empty ?filename ()
 
+
   let unload () =
     env_from_file := MapString.empty;
     Data.clear env
 
+
   let dump ?(filename=default_filename) () =
     let chn =
       open_out_bin filename
     in
-    let output nm value = 
+    let output nm value =
       Printf.fprintf chn "%s=%S\n" nm value
     in
-    let mp_todo = 
+    let mp_todo =
       (* Dump data from schema *)
       Schema.fold
         (fun mp_todo nm def _ ->
       (* End of the dump *)
       close_out chn
 
+
   let print () =
     let printable_vars =
       Schema.fold
 
     Printf.printf "\nConfiguration: \n";
     List.iter
-      (fun (name,value) ->
+      (fun (name, value) ->
         Printf.printf "%s: %s %s\n" name (dot_pad name) value)
       (List.rev printable_vars);
     Printf.printf "\n%!"
 
+
   let args () =
     let arg_concat =
       OASISUtils.varname_concat ~hyphen:'-'
 end
 
 module BaseArgExt = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/base/BaseArgExt.ml" *)
+(* # 22 "src/base/BaseArgExt.ml" *)
+
 
   open OASISUtils
   open OASISGettext
 
+
   let parse argv args =
       (* Simulate command line for Arg *)
       let current =
 end
 
 module BaseCheck = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/base/BaseCheck.ml" *)
+(* # 22 "src/base/BaseCheck.ml" *)
+
 
   open BaseEnv
   open BaseMessage
   open OASISUtils
   open OASISGettext
 
+
   let prog_best prg prg_lst =
     var_redefine
       prg
              | Some prg -> prg
              | None -> raise Not_found)
 
+
   let prog prg =
     prog_best prg [prg]
 
+
   let prog_opt prg =
     prog_best prg [prg^".opt"; prg]
 
+
   let ocamlfind =
     prog "ocamlfind"
 
+
   let version
         var_prefix
         cmp
                  version_str)
         ()
 
+
   let package_version pkg =
     OASISExec.run_read_one_line ~ctxt:!BaseContext.default
       (ocamlfind ())
       ["query"; "-format"; "%v"; pkg]
 
+
   let package ?version_comparator pkg () =
     let var =
       OASISUtils.varname_concat
 end
 
 module BaseOCamlcConfig = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/base/BaseOCamlcConfig.ml" *)
+(* # 22 "src/base/BaseOCamlcConfig.ml" *)
 
 
   open BaseEnv
   open OASISUtils
   open OASISGettext
 
+
   module SMap = Map.Make(String)
 
+
   let ocamlc =
     BaseCheck.prog_opt "ocamlc"
 
+
   let ocamlc_config_map =
     (* Map name to value for ocamlc -config output
        (name ^": "^value)
             mp
     in
 
-    let cache = 
+    let cache =
       lazy
         (var_protect
            (Marshal.to_string
            (* TODO: update if ocamlc change !!! *)
            Lazy.force cache)
 
+
   let var_define nm =
     (* Extract data from ocamlc -config *)
     let avlbl_config_get () =
         0
     in
     let chop_version_suffix s =
-      try 
+      try
         String.sub s 0 (String.index s '+')
-      with _ -> 
+      with _ ->
         s
      in
 
     let nm_config, value_config =
       match nm with
-        | "ocaml_version" -> 
+        | "ocaml_version" ->
             "version", chop_version_suffix
         | _ -> nm, (fun x -> x)
     in
 end
 
 module BaseStandardVar = struct
-(* # 21 "/somewhere/.share/projects/externals/oasis/_build/src/base/BaseStandardVar.ml" *)
+(* # 22 "src/base/BaseStandardVar.ml" *)