Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Rename 'OASIS' exec to 'oasis' (Closes: #769)

Ignore-this: 3683db2e3aaea2cef9dd328ca8a6bd93

This patch also splits OASISConf.version between version_full and
version_short. It avoids too much versions for only minor releases.

darcs-hash:20101015093758-a43a9-e6e1326a7222ca35e69f1e4d6bb0e6f64b84db3e
  • Loading branch information...
commit a2875754b473a55d086f36dc80b01319f6373f57 1 parent 82581a3
@gildor478 gildor478 authored
Showing with 196 additions and 161 deletions.
  1. +5 −5 _oasis
  2. +2 −2 _tags
  3. +6 −6 doc/ANALYSIS.mkd
  4. +134 −46 setup.ml
  5. +4 −4 src/base/BaseDev.ml
  6. +1 −1  src/base/BaseDev.mli
  7. +4 −4 src/base/BaseSetup.ml
  8. +3 −3 src/cli/ArgExt.ml
  9. +1 −1  src/cli/ManualHelp.mkd
  10. +1 −1  src/cli/SetupDev.ml
  11. +3 −4 src/cli/SetupDevHelp.mkd
  12. +1 −1  src/cli/SetupHelp.mkd
  13. +2 −2 src/oasis/MANUAL-template.mkd
  14. +2 −1  src/oasis/OASISConf.ml.ab
  15. +1 −1  src/oasis/OASISPlugin.ml
  16. +2 −2 src/oasis/OASISQuickstart.ml
  17. +9 −0 src/oasis/OASISVersion.ml
  18. +4 −0 src/oasis/OASISVersion.mli
  19. +1 −1  src/plugins/custom/CustomPlugin.ml
  20. +1 −1  src/plugins/extra/META/METAPlugin.ml
  21. +1 −1  src/plugins/extra/devfiles/DevFilesPlugin.ml
  22. +1 −1  src/plugins/extra/stdfiles/StdFilesPlugin.ml
  23. +1 −1  src/plugins/internal/InternalId.ml
  24. +1 −1  src/plugins/none/NonePlugin.ml
  25. +1 −1  src/plugins/ocamlbuild/OCamlbuildId.ml
  26. +1 −1  src/tools/{OASIS.sh → oasis}
  27. +1 −1  src/tools/{OASIS-i18n.sh → oasis-i18n}
  28. 0  src/tools/{OASIS.bat → oasis.bat}
  29. +1 −1  test/TestQuickstart.ml
  30. +0 −66 test/data/quickstart-simple.expect
  31. +1 −1  test/data/test1.oasis
View
10 _oasis
@@ -179,7 +179,7 @@ Library cli
Install$: flag(libraries)
-Executable OASIS
+Executable oasis
Path: src/cli
MainIs: Main.ml
BuildDepends: oasis, oasis.base, oasis.cli, oasis.builtin-plugins
@@ -193,17 +193,17 @@ Executable test
Test main
Type: custom (0.1.0)
- Command: $test -oasis-exec $OASIS -has-ocamlopt $is_native
+ Command: $test -oasis-exec $oasis -has-ocamlopt $is_native
WorkingDirectory: test
- TestTools: OASIS, test
+ TestTools: oasis, test
Document manual
Type: custom (0.1.0)
Title: OASIS User Manual
if flag(gettext)
- XCustom: env LANG=C $OASIS manual > doc/MANUAL.mkd
+ XCustom: env LANG=C $oasis manual > doc/MANUAL.mkd
else
- XCustom: $OASIS manual > doc/MANUAL.mkd
+ XCustom: $oasis manual > doc/MANUAL.mkd
XCustomClean: $rm doc/MANUAL.mkd
DataFiles: doc/MANUAL.mkd
View
4 _tags
@@ -20,7 +20,7 @@
################################################################################
# OASIS_START
-# DO NOT EDIT (digest: faebd70ab65ed22b29926d59462ea068)
+# DO NOT EDIT (digest: 6aafe185defa04a606fef7201e83fcb6)
# Executable ocamlmod
"src/tools/ocamlmod.byte": pkg_pcre
"src/tools/ocamlmod.byte": pkg_fileutils
@@ -153,7 +153,7 @@
<test/*.ml{,i}>: pkg_fileutils
<test/*.ml{,i}>: pkg_extlib
<test/*.ml{,i}>: pkg_expect.pcre
-# Executable OASIS
+# Executable oasis
"src/cli/Main.byte": use_cli
"src/cli/Main.byte": use_builtin-plugins
"src/cli/Main.byte": use_base
View
12 doc/ANALYSIS.mkd
@@ -27,13 +27,13 @@ configure step try to auto detect various parameters and see if they match with
should create files which summarize choices made. Files are created through
replacement of variable in files (%.ab -> %).
-We rely on OASIS file to describe "user choices" (Flag) and "build
+We rely on `_oasis` file to describe "user choices" (Flag) and "build
dependencies" (BuildDepends and BuildTools).
OASIS should provide 2 choices for configure:
- internal (default): an OCaml module is embedded in the project that perform
- all this checks, use translated OASIS in setup.ml structure.
-- ocaml-autoconf: use translated OASIS in configure.ac, output setup.data.
+ all this checks, use translated `_oasis` in setup.ml structure.
+- ocaml-autoconf: use translated `_oasis` in configure.ac, output setup.data.
build
-----
@@ -42,11 +42,11 @@ The build phase should build all the project objects. It should take care of
building native and bytecode object depending on the target system.
OASIS provides 3 choices for build:
-- ocamlbuild (default): use translated OASIS files (.mllib, .itarget...) and
+- ocamlbuild (default): use translated `_oasis` files (.mllib, .itarget...) and
ocamlbuild shipped with ocaml, add ocamlbuild detection to configure
-- OCamlMakefile: use translated OASIS files (Makefile) and OCamlMakefile
+- OCamlMakefile: use translated `_oasis` files (Makefile) and OCamlMakefile
shipped externally, add OCamlMakefile user choice and detection
-- OMake: use translated OASIS files (TODO)
+- OMake: use translated `_oasis` files (TODO)
build phase use configure phase result through a generated file that list
important variable regarding build process.
View
180 setup.ml
@@ -20,7 +20,7 @@
(********************************************************************************)
(* OASIS_START *)
-(* DO NOT EDIT (digest: dc7ba694430c22601534d1b2090f3e8d) *)
+(* DO NOT EDIT (digest: 3ade185662ea869c17f3a400790b454b) *)
(*
Regenerated by OASIS v0.1.0
Visit http://oasis.forge.ocamlcore.org for more information and
@@ -108,6 +108,9 @@ module OASISUtils = struct
SetString.empty
+ let compare_csl s1 s2 =
+ String.compare (String.lowercase s1) (String.lowercase s2)
+
module HashStringCsl =
Hashtbl.Make
(struct
@@ -915,9 +918,38 @@ module OASISTypes = struct
| OtherVCS of url
- type 'a conditional = 'a OASISExpr.choices
+ type plugin_kind =
+ [ `Configure
+ | `Build
+ | `Doc
+ | `Test
+ | `Install
+ | `Extra
+ ]
+
+ type plugin_data_purpose =
+ [ `Configure
+ | `Build
+ | `Install
+ | `Clean
+ | `Distclean
+ | `Install
+ | `Uninstall
+ | `Test
+ | `Doc
+ | `Extra
+ | `Other of string
+ ]
+
+ type 'a plugin = 'a * name * OASISVersion.t option
- type plugin = name * OASISVersion.t option
+ type all_plugin = plugin_kind plugin
+
+ type plugin_data = (all_plugin * plugin_data_purpose * (unit -> unit)) list
+
+# 102 "/home/gildor/programmation/oasis/src/oasis/OASISTypes.ml"
+
+ type 'a conditional = 'a OASISExpr.choices
type custom =
{
@@ -930,6 +962,7 @@ module OASISTypes = struct
{
cs_name: name;
cs_data: PropList.Data.t;
+ cs_plugin_data: plugin_data;
}
@@ -986,7 +1019,7 @@ module OASISTypes = struct
type test =
{
- test_type: plugin;
+ test_type: [`Test] plugin;
test_command: command_line conditional;
test_custom: custom;
test_working_directory: unix_filename option;
@@ -1006,7 +1039,7 @@ module OASISTypes = struct
type doc =
{
- doc_type: plugin;
+ doc_type: [`Doc] plugin;
doc_custom: custom;
doc_build: bool conditional;
doc_install: bool conditional;
@@ -1045,13 +1078,13 @@ module OASISTypes = struct
description: string option;
categories: url list;
- conf_type: plugin;
+ conf_type: [`Configure] plugin;
conf_custom: custom;
- build_type: plugin;
+ build_type: [`Build] plugin;
build_custom: custom;
- install_type: plugin;
+ install_type: [`Install] plugin;
install_custom: custom;
uninstall_custom: custom;
@@ -1060,8 +1093,9 @@ module OASISTypes = struct
files_ab: unix_filename list;
sections: section list;
- plugins: plugin list;
+ plugins: [`Extra] plugin list;
schema_data: PropList.Data.t;
+ plugin_data: plugin_data;
}
end
@@ -1070,6 +1104,10 @@ module OASISUnixPath = struct
# 21 "/home/gildor/programmation/oasis/src/oasis/OASISUnixPath.ml"
type unix_filename = string
+ type unix_dirname = string
+
+ type host_filename = string
+ type host_dirname = string
let current_dir_name = "."
@@ -3352,12 +3390,15 @@ module BaseTest = struct
else
failed /. (float_of_int n)
in
- (if failure_percent > 0.0 then
- warning
- else
- info)
+ let msg =
+ Printf.sprintf
(f_ "Tests had a %.2f%% failure rate")
(100. *. failure_percent)
+ in
+ if failure_percent > 0.0 then
+ failwith msg
+ else
+ info "%s" msg
end
module BaseDoc = struct
@@ -4938,6 +4979,9 @@ module CustomPlugin = struct
let clean t pkg extra_args =
clean t pkg extra_args;
+ (* TODO: this seems to be pretty generic (at least wrt to ocamlbuild
+ * considering moving this to BaseSetup?
+ *)
List.iter
(function
| Library (cs, _, _) ->
@@ -5007,7 +5051,7 @@ let setup_t =
("$test",
[
"-oasis-exec";
- "$OASIS";
+ "$oasis";
"-has-ocamlopt";
"$is_native"
]))
@@ -5028,13 +5072,13 @@ let setup_t =
("env",
[
"LANG=C";
- "$OASIS";
+ "$oasis";
"manual";
">";
"doc/MANUAL.mkd"
]));
(OASISExpr.ENot (OASISExpr.EFlag "gettext"),
- ("$OASIS", ["manual"; ">"; "doc/MANUAL.mkd"]))
+ ("$oasis", ["manual"; ">"; "doc/MANUAL.mkd"]))
];
cmd_clean =
[
@@ -5058,7 +5102,7 @@ let setup_t =
("$test",
[
"-oasis-exec";
- "$OASIS";
+ "$oasis";
"-has-ocamlopt";
"$is_native"
]))
@@ -5079,13 +5123,13 @@ let setup_t =
("env",
[
"LANG=C";
- "$OASIS";
+ "$oasis";
"manual";
">";
"doc/MANUAL.mkd"
]));
(OASISExpr.ENot (OASISExpr.EFlag "gettext"),
- ("$OASIS", ["manual"; ">"; "doc/MANUAL.mkd"]))
+ ("$oasis", ["manual"; ">"; "doc/MANUAL.mkd"]))
];
cmd_clean =
[
@@ -5107,7 +5151,7 @@ let setup_t =
("$test",
[
"-oasis-exec";
- "$OASIS";
+ "$oasis";
"-has-ocamlopt";
"$is_native"
]))
@@ -5127,13 +5171,13 @@ let setup_t =
("env",
[
"LANG=C";
- "$OASIS";
+ "$oasis";
"manual";
">";
"doc/MANUAL.mkd"
]));
(OASISExpr.ENot (OASISExpr.EFlag "gettext"),
- ("$OASIS", ["manual"; ">"; "doc/MANUAL.mkd"]))
+ ("$oasis", ["manual"; ">"; "doc/MANUAL.mkd"]))
];
cmd_clean =
[
@@ -5168,13 +5212,13 @@ let setup_t =
Some
"OASIS generates a full configure, build and install system for your\napplication. It starts with a simple `_oasis` file at the toplevel of your\nproject and creates everything required.\n\nIt uses external tools like OCamlbuild and it can be considered as the glue\nbetween various subsystems that do the job. It should support the following\ntools:\n\n- OCamlbuild\n- OMake (todo)\n- OCamlMakefile (todo),\n- ocaml-autoconf (todo)\n\nIt also features a do-it-yourself command line invocation and an internal\nconfigure/install scheme. Libraries are managed through findlib. It has been\ntested on GNU Linux and Windows.\n\nIt also allows to have standard entry points and description. It helps to\nintegrates your libraries and software with third parties tools like GODI.";
categories = [];
- conf_type = ("internal", Some "0.1.0");
+ conf_type = (`Configure, "internal", Some "0.1.0");
conf_custom =
{
pre_command = [(OASISExpr.EBool true, None)];
post_command = [(OASISExpr.EBool true, None)];
};
- build_type = ("ocamlbuild", Some "0.1.0");
+ build_type = (`Build, "ocamlbuild", Some "0.1.0");
build_custom =
{
pre_command = [(OASISExpr.EBool true, None)];
@@ -5185,7 +5229,7 @@ let setup_t =
Some (("$make", ["-C"; "po"; "all"])))
];
};
- install_type = ("internal", Some "0.1.0");
+ install_type = (`Install, "internal", Some "0.1.0");
install_custom =
{
pre_command = [(OASISExpr.EBool true, None)];
@@ -5239,7 +5283,11 @@ let setup_t =
sections =
[
Executable
- ({cs_name = "ocamlmod"; cs_data = PropList.Data.create (); },
+ ({
+ cs_name = "ocamlmod";
+ cs_data = PropList.Data.create ();
+ cs_plugin_data = [];
+ },
{
bs_build = [(OASISExpr.EBool true, true)];
bs_install = [(OASISExpr.EBool true, false)];
@@ -5263,7 +5311,11 @@ let setup_t =
},
{exec_custom = false; exec_main_is = "ocamlmod.ml"; });
Library
- ({cs_name = "oasis"; cs_data = PropList.Data.create (); },
+ ({
+ cs_name = "oasis";
+ cs_data = PropList.Data.create ();
+ cs_plugin_data = [];
+ },
{
bs_build = [(OASISExpr.EBool true, true)];
bs_install =
@@ -5363,7 +5415,11 @@ let setup_t =
lib_findlib_containers = [];
});
Library
- ({cs_name = "base"; cs_data = PropList.Data.create (); },
+ ({
+ cs_name = "base";
+ cs_data = PropList.Data.create ();
+ cs_plugin_data = [];
+ },
{
bs_build = [(OASISExpr.EBool true, true)];
bs_install =
@@ -5425,6 +5481,7 @@ let setup_t =
({
cs_name = "builtin-plugins";
cs_data = PropList.Data.create ();
+ cs_plugin_data = [];
},
{
bs_build = [(OASISExpr.EBool true, true)];
@@ -5475,7 +5532,11 @@ let setup_t =
lib_findlib_containers = [];
});
Library
- ({cs_name = "cli"; cs_data = PropList.Data.create (); },
+ ({
+ cs_name = "cli";
+ cs_data = PropList.Data.create ();
+ cs_plugin_data = [];
+ },
{
bs_build = [(OASISExpr.EBool true, true)];
bs_install =
@@ -5505,7 +5566,11 @@ let setup_t =
lib_findlib_containers = [];
});
Executable
- ({cs_name = "test"; cs_data = PropList.Data.create (); },
+ ({
+ cs_name = "test";
+ cs_data = PropList.Data.create ();
+ cs_plugin_data = [];
+ },
{
bs_build = [(OASISExpr.EBool true, true)];
bs_install = [(OASISExpr.EBool true, false)];
@@ -5536,7 +5601,11 @@ let setup_t =
},
{exec_custom = false; exec_main_is = "test.ml"; });
Executable
- ({cs_name = "OASIS"; cs_data = PropList.Data.create (); },
+ ({
+ cs_name = "oasis";
+ cs_data = PropList.Data.create ();
+ cs_plugin_data = [];
+ },
{
bs_build = [(OASISExpr.EBool true, true)];
bs_install = [(OASISExpr.EBool true, true)];
@@ -5562,14 +5631,21 @@ let setup_t =
},
{exec_custom = false; exec_main_is = "Main.ml"; });
Flag
- ({cs_name = "gettext"; cs_data = PropList.Data.create (); },
+ ({
+ cs_name = "gettext";
+ cs_data = PropList.Data.create ();
+ cs_plugin_data = [];
+ },
{
flag_description = Some "Use ocaml-gettext for i18n";
flag_default = [(OASISExpr.EBool true, false)];
});
Flag
- ({cs_name = "libraries"; cs_data = PropList.Data.create ();
- },
+ ({
+ cs_name = "libraries";
+ cs_data = PropList.Data.create ();
+ cs_plugin_data = [];
+ },
{
flag_description =
Some
@@ -5577,16 +5653,20 @@ let setup_t =
flag_default = [(OASISExpr.EBool true, true)];
});
Test
- ({cs_name = "main"; cs_data = PropList.Data.create (); },
+ ({
+ cs_name = "main";
+ cs_data = PropList.Data.create ();
+ cs_plugin_data = [];
+ },
{
- test_type = ("custom", Some "0.1.0");
+ test_type = (`Test, "custom", Some "0.1.0");
test_command =
[
(OASISExpr.EBool true,
("$test",
[
"-oasis-exec";
- "$OASIS";
+ "$oasis";
"-has-ocamlopt";
"$is_native"
]))
@@ -5602,15 +5682,18 @@ let setup_t =
[
ExternalTool "ocamlbuild";
ExternalTool "make";
- InternalExecutable "OASIS";
+ InternalExecutable "oasis";
InternalExecutable "test"
];
});
Doc
- ({cs_name = "api-oasis"; cs_data = PropList.Data.create ();
- },
+ ({
+ cs_name = "api-oasis";
+ cs_data = PropList.Data.create ();
+ cs_plugin_data = [];
+ },
{
- doc_type = ("ocamlbuild", Some "0.1.0");
+ doc_type = (`Doc, "ocamlbuild", Some "0.1.0");
doc_custom =
{
pre_command = [(OASISExpr.EBool true, None)];
@@ -5632,9 +5715,13 @@ let setup_t =
];
});
Doc
- ({cs_name = "manual"; cs_data = PropList.Data.create (); },
+ ({
+ cs_name = "manual";
+ cs_data = PropList.Data.create ();
+ cs_plugin_data = [];
+ },
{
- doc_type = ("custom", Some "0.1.0");
+ doc_type = (`Doc, "custom", Some "0.1.0");
doc_custom =
{
pre_command = [(OASISExpr.EBool true, None)];
@@ -5654,11 +5741,12 @@ let setup_t =
];
plugins =
[
- ("DevFiles", Some "0.1.0");
- ("StdFiles", Some "0.1.0");
- ("META", Some "0.1.0")
+ (`Extra, "DevFiles", Some "0.1.0");
+ (`Extra, "StdFiles", Some "0.1.0");
+ (`Extra, "META", Some "0.1.0")
];
schema_data = PropList.Data.create ();
+ plugin_data = [];
};
version = "0.1.0";
};;
View
8 src/base/BaseDev.ml
@@ -45,15 +45,15 @@ let update_and_run t =
error
(f_ "The command '%s %s' exit with code 2. It often means that we \
don't use the right command-line arguments, rerun \
- 'OASIS setup-dev'.")
+ 'oasis setup-dev'.")
t.oasis_cmd
(String.concat " " oasis_args)
| 127 ->
(* Cannot find OASIS *)
error
- (f_ "Cannot find executable '%s', check where OASIS is located \
- and rerun 'OASIS setup-dev'")
+ (f_ "Cannot find executable '%s', check where 'oasis' is located \
+ and rerun 'oasis setup-dev'")
t.oasis_cmd
| i ->
@@ -87,7 +87,7 @@ let make ?oasis_exec ctxt pkg =
oasis_cmd =
(match oasis_exec with
| Some fn -> fn
- | None -> "OASIS");
+ | None -> "oasis");
}
in
View
2  src/base/BaseDev.mli
@@ -10,7 +10,7 @@ type t =
oasis_cmd : prog; (** Program to regenerate the build system. *)
}
-(** Run 'OASIS setup' command line tool to regenerate a build system and
+(** Run 'oasis setup' command line tool to regenerate a build system and
and run it.
*)
val update_and_run : t -> unit
View
8 src/base/BaseSetup.ml
@@ -643,7 +643,7 @@ let of_package pkg =
"distclean_test", odn_of_assocs distclean_test_funcs;
"distclean_doc", odn_of_assocs distclean_doc_funcs;
"package", OASISTypes.odn_of_package pkg;
- "version", OASISVersion.odn_of_t OASISConf.version;
+ "version", OASISVersion.odn_of_t OASISConf.version_full;
])
in
@@ -662,14 +662,14 @@ let of_package pkg =
(* Header *)
[
"(* "^default_filename^" generated for the first time by "^
- "OASIS v"^(OASISVersion.string_of_version OASISConf.version)^" *)";
+ "OASIS v"^(OASISVersion.string_of_version OASISConf.version_full)^" *)";
"";
]
(* Body *)
(
[
"(*";
- " Regenerated by OASIS v"^(OASISVersion.string_of_version OASISConf.version);
+ " Regenerated by OASIS v"^(OASISVersion.string_of_version OASISConf.version_full);
" Visit http://oasis.forge.ocamlcore.org for more information and";
" documentation about functions used in this file.";
"*)";
@@ -716,7 +716,7 @@ let of_package pkg =
distclean_test = func_calls distclean_test_funcs;
distclean_doc = func_calls distclean_doc_funcs;
package = pkg;
- version = OASISVersion.string_of_version OASISConf.version;
+ version = OASISVersion.string_of_version OASISConf.version_full;
}
in
View
6 src/cli/ArgExt.ml
@@ -20,7 +20,7 @@ let specs, usage_msg =
s_ "OASIS (C) 2009-2010 OCamlCore SARL\n\
\n\
- OASIS [global-options*] subcommand [subcommand-options*]\n\
+ oasis [global-options*] subcommand [subcommand-options*]\n\
\n\
Global options:"
@@ -145,7 +145,7 @@ let pp_print_help hext hsty fmt () =
~check_last_char:scmd.scmd_help
fmt ();
- fprintf fmt (f_ "Usage: OASIS [global-options*] %s %s") scmd.scmd_name scmd.scmd_usage;
+ fprintf fmt (f_ "Usage: oasis [global-options*] %s %s") scmd.scmd_name scmd.scmd_usage;
pp_print_endblock fmt ();
if scmd.scmd_specs <> [] then
@@ -196,7 +196,7 @@ let parse () =
""
(fun () ->
error "%s"
- (s_ "No subcommand defined, call 'OASIS -help' for help")))
+ (s_ "No subcommand defined, call 'oasis -help' for help")))
in
let scmd_args =
View
2  src/cli/ManualHelp.mkd
@@ -4,5 +4,5 @@ print it and more precisely the [pandoc][] extension of this syntax.
[markdown]: http://daringfireball.net/projects/markdown/
[pandoc]: http://johnmacfarlane.net/pandoc/
-This manual describes the command line tool `OASIS`, the `_oasis` file format
+This manual describes the command line tool `oasis`, the `_oasis` file format
and the generated `setup.ml` file.
View
2  src/cli/SetupDev.ml
@@ -171,7 +171,7 @@ let scmd =
([
"-real-oasis",
Arg.Unit (fun () -> roasis_exec := Some Sys.argv.(0)),
- s_ " Use the real OASIS filename when generating developper mode \
+ s_ " Use the real 'oasis' executable filename when generating developper mode \
setup.ml.";
"-run",
View
7 src/cli/SetupDevHelp.mkd
@@ -1,10 +1,9 @@
This subcommand is the developper counterpart of the Setup subcommand. It
-acts the same way but it produces a `setup.ml` that still requires an
-installation of `OASIS` in order to recompile the `_oasis` file at each
-invocation.
+acts the same way but it produces a `setup.ml` that still requires the
+executable `oasis` in order to recompile the `_oasis` file at each invocation.
The big advantage to create a `setup.ml` this way is that you don't have
-to call `OASIS setup` each time you update the `_oasis` file. The other
+to call `oasis setup` each time you update the `_oasis` file. The other
advantage is that it keeps clean your build system, i.e. it generates a file,
use it and reset it to its pristine state, which helps to maintain the changes
in this file to the bare minimum.
View
2  src/cli/SetupHelp.mkd
@@ -1,3 +1,3 @@
-This is the main subcommand of `OASIS`, it compiles the `_oasis` file into a
+This is the main subcommand of `oasis`, it compiles the `_oasis` file into a
self contained `setup.ml`. The generated file handle the various step to
configure, build and install your project.
View
4 src/oasis/MANUAL-template.mkd
@@ -347,8 +347,8 @@ Using OASIS during software development
---------------------------------------
Since `_oasis` becomes a central place of information about the building
-process, it can be quite cumbersome to run again and again `OASIS`. You can
-avoid it using the `-dev` flags when calling `OASIS` for the first time. This
+process, it can be quite cumbersome to run again and again `oasis`. You can
+avoid it using the `-dev` flags when calling `oasis` for the first time. This
way it will rebuilt very dependents build files each time you call `ocaml
setup.ml`. A `setup.ml` built this way, should not be distributed. This intended
for development purpose only.
View
3  src/oasis/OASISConf.ml.ab
@@ -19,4 +19,5 @@
(* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA *)
(********************************************************************************)
-let version = OASISVersion.version_of_string "$(pkg_version)"
+let version_full = OASISVersion.version_of_string "$(pkg_version)"
+let version_short = OASISVersion.chop version_full
View
2  src/oasis/OASISPlugin.ml
@@ -531,7 +531,7 @@ let test_field_name nm =
*)
let builtin knd nm =
let builtin_version =
- Some OASISConf.version
+ Some OASISConf.version_short
in
knd, nm, builtin_version
View
4 src/oasis/OASISQuickstart.ml
@@ -702,7 +702,7 @@ let to_file ~ctxt fn lvl intrf oasis_dev =
pp_open_vbox fmt 0;
pp_open_box fmt 0;
pp_print_string_spaced fmt
- (s_ "The program will ask some questions to create the OASIS \
+ (s_ "The program will ask some questions to create the `_oasis` \
file. If you answer '?' to a question, an help text will \
be displayed.");
pp_close_box fmt ();
@@ -914,7 +914,7 @@ let to_file ~ctxt fn lvl intrf oasis_dev =
create_fn content fn;
false);
- s_ "r", s_ "write, run 'OASIS setup-dev' and exit", None,
+ s_ "r", s_ "write, run 'oasis setup-dev' and exit", None,
(fun () ->
create_fn content fn;
oasis_dev ();
View
9 src/oasis/OASISVersion.ml
@@ -142,6 +142,15 @@ let version_of_string str =
let string_of_version t =
t
+let chop t =
+ try
+ let pos =
+ String.rindex t '.'
+ in
+ String.sub t 0 pos
+ with Not_found ->
+ t
+
let rec comparator_apply v op =
match op with
| VGreater cv ->
View
4 src/oasis/OASISVersion.mli
@@ -39,6 +39,10 @@ val value: t OASISValues.t
*)
val odn_of_t: t -> ODN.t
+(** Remove the last part of a version, after the last '.'. I.e. 0.2.0~alpha1 ->
+ 0.2.
+ *)
+val chop: t -> t
(** {2 Version comparator} *)
View
2  src/plugins/custom/CustomPlugin.ml
@@ -162,7 +162,7 @@ open OASISPlugin
open OASISSchema
let nm, ver =
- "Custom", Some OASISConf.version
+ "Custom", Some OASISConf.version_short
let conf_plugin = `Configure, nm, ver
let conf_data = data_new_property conf_plugin
View
2  src/plugins/extra/META/METAPlugin.ml
@@ -45,7 +45,7 @@ type t =
}
let plugin =
- `Extra, "META", Some OASISConf.version
+ `Extra, "META", Some OASISConf.version_short
let pivot_data =
data_new_property plugin
View
2  src/plugins/extra/devfiles/DevFilesPlugin.ml
@@ -29,7 +29,7 @@ open OASISTypes
open OASISPlugin
open OASISSchema
-let plugin = `Extra, "DevFiles", Some OASISConf.version
+let plugin = `Extra, "DevFiles", Some OASISConf.version_short
let self_id, all_id =
Extra.create
View
2  src/plugins/extra/stdfiles/StdFilesPlugin.ml
@@ -36,7 +36,7 @@ open Format
open FormatExt
let plugin =
- `Extra, "StdFiles", Some OASISConf.version
+ `Extra, "StdFiles", Some OASISConf.version_short
let self_id, all_id =
Extra.create
View
2  src/plugins/internal/InternalId.ml
@@ -25,7 +25,7 @@
let name = "Internal"
-let version = OASISConf.version
+let version = OASISConf.version_short
let help = InternalData.readme_template_mkd
View
2  src/plugins/none/NonePlugin.ml
@@ -56,7 +56,7 @@ let section_no_generate str ctxt pkg (cs, section) =
pkg
let init () =
- let nm, ver = "None", Some OASISConf.version in
+ let nm, ver = "None", Some OASISConf.version_short in
let help = NoneData.readme_template_mkd in
let help_order = 10 in
View
2  src/plugins/ocamlbuild/OCamlbuildId.ml
@@ -25,7 +25,7 @@
let name = "OCamlbuild"
-let version = OASISConf.version
+let version = OASISConf.version_short
let help = OCamlbuildData.readme_template_mkd
View
2  src/tools/OASIS.sh → src/tools/oasis
@@ -32,5 +32,5 @@ fi
export OASIS_GETTEXT_DIR="$ROOTDIR/share/locale"
-exec "$ROOTDIR/libexec/OASIS" "$@"
+exec "$ROOTDIR/libexec/oasis" "$@"
View
2  src/tools/OASIS-i18n.sh → src/tools/oasis-i18n
@@ -23,4 +23,4 @@
LOCDIR="$(dirname $(readlink -f $0))"
BUILDDIR="$(readlink -f "$LOCDIR/../../_build")"
export OASIS_GETTEXT_DIR="$BUILDDIR/po"
-exec "$BUILDDIR/src/cli/OASIS" "$@"
+exec "$BUILDDIR/src/cli/oasis" "$@"
View
0  src/tools/OASIS.bat → src/tools/oasis.bat
File renamed without changes
View
2  test/TestQuickstart.ml
@@ -141,7 +141,7 @@ let tests =
try
assert_oasis_cli ["setup"];
with e ->
- failwith "'OASIS setup' failed but 'OASIS check' succeed"
+ failwith "'oasis setup' failed but 'oasis check' succeed"
end;
let pkg =
OASISParse.from_file ~ctxt:!oasis_ctxt "_oasis"
View
66 test/data/quickstart-simple.expect
@@ -1,66 +0,0 @@
-################################################################################
-# OASIS: architecture for building OCaml libraries and applications #
-# #
-# Copyright (C) 2008-2010, OCamlCore SARL #
-# #
-# This library is free software; you can redistribute it and/or modify it #
-# under the terms of the GNU Lesser General Public License as published by #
-# the Free Software Foundation; either version 2.1 of the License, or (at #
-# your option) any later version, with the OCaml static compilation #
-# exception. #
-# #
-# This library is distributed in the hope that it will be useful, but #
-# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY #
-# or FITNESS FOR A PARTICULAR PURPOSE. See the file COPYING for more #
-# details. #
-# #
-# You should have received a copy of the GNU Lesser General Public License #
-# along with this library; if not, write to the Free Software Foundation, #
-# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
-################################################################################
-
-#!/usr/bin/expect -f
-set timeout 1
-spawn OASIS --quickstart
-expect {
- "Value of Name?" {send -- "test\r"; exp_continue}
- "Value of Version?" {send -- "0.1\r"; exp_continue}
- "Value of Synopsis?" {send -- "test package\r"; exp_continue}
- "Value of Authors?" {send -- "me\r"; exp_continue}
- "Value of License?" {send -- "GPL\r"; exp_continue}
- "Create a section?"
- {
- send -- "l\r"
- expect {
- "Library name?" {send -- "testlib\r"; exp_continue}
- "Value of Path?" {send -- "src\r"; exp_continue}
- "Value of Modules?" {send -- "A, B\r"; exp_continue}
-
- "Create another section?"
- {
- send -- "e\r"
- expect {
- "Executable name?" {send -- "testexec\r"; exp_continue}
- "Value of MainIs?" {send -- "test/main.ml\r"; exp_continue}
-
- "Create another section?"
- {
- send -- "t\r"
- expect {
- "Test name?" {send -- "testexec\r"; exp_continue}
- "Value of Command?" {send -- "\$testexec\r"; exp_continue}
- "Create another section?"
- {
- send -- "?\r"
- expect "Create another section?"
- send -- "n\r"
- expect eof
- exit
- }
- }
- }
- }
- }
- }
- }
-}
View
2  test/data/test1.oasis
@@ -5,7 +5,7 @@ Synopsis: Just a test
License: GPL
LicenseFile: LICENSE
Authors: Sylvain Le Gall
-BuildType: None (0.1.0)
+BuildType: None (0.2)
BuildDepends: oUnit (>= 0.1.2), benchmark (>= 0.6)
Description:
This is a test to check that everything is working great
Please sign in to comment.
Something went wrong with that request. Please try again.