[m-rev.] for post-commit review: document env type options
Julien Fischer
juliensf at csse.unimelb.edu.au
Mon Jan 10 17:39:42 AEDT 2011
For post-commit review by anyone.
Branches: main, 11.01
Document the --{host,target}-env-type options.
doc/user_guide.texi:
compiler/options.m:
Add (or enable) the documentation for the above options.
README.{Erlang,Java}:
Mention how to produce a batch file launcher rather than a
shell script.
Julien.
Index: README.Erlang
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/README.Erlang,v
retrieving revision 1.7
diff -u -r1.7 README.Erlang
--- README.Erlang 26 Oct 2010 04:59:10 -0000 1.7
+++ README.Erlang 10 Jan 2011 06:35:38 -0000
@@ -74,9 +74,13 @@
./hello
-Note that hello is a simple shell script that starts the Erlang
-runtime system. The actual object files will be stored in the Mercury
-subdirectory, in `beams'.
+Note that hello is a simple shell script that starts the Erlang runtime system.
+The actual object files will be stored in the Mercury subdirectory, in `beams'.
+
+If you are using the Windows command-line interpreter, i.e. cmd.exe, then
+setting the value of option --target-env-type to "windows" will cause the
+compiler to generate a batch file that starts the Erlang runtime system, rather
+than a shell script.
-----------------------------------------------------------------------------
Index: README.Java
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/README.Java,v
retrieving revision 1.19
diff -u -r1.19 README.Java
--- README.Java 26 Oct 2010 04:59:10 -0000 1.19
+++ README.Java 10 Jan 2011 06:35:38 -0000
@@ -47,9 +47,18 @@
./hello
+Note that hello is a simple shell script that invokes the program using the
+Java interpreter. The actual class files are stored in the Mercury
+subdirectory in `classs'.
+
+If you are using the Windows command-line interpreter, i.e. cmd.exe, then
+setting the value of the option --target-env-type to "windows" will cause the
+compiler to generate a batch file that invokes the program, rather than a shell
+script.
+
Problems at higher optimisation levels are still being resolved.
-For now we recommend sticking with -O2 or below and not enabling
-intermodule optimisation.
+For now we recommend sticking with -O2 or below and not enabling intermodule
+optimisation.
-----------------------------------------------------------------------------
Index: compiler/options.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.685
diff -u -r1.685 options.m
--- compiler/options.m 4 Jan 2011 05:01:33 -0000 1.685
+++ compiler/options.m 10 Jan 2011 06:35:38 -0000
@@ -5611,21 +5611,19 @@
"--restricted-command-line",
"\tEnable this option if your shell doesn't support long command lines.",
"\tThis option uses temporary files to pass arguments to sub-commands.",
- "\t(This option is only supported by `mmc --make'.)"
- %
- % XXX the following are commented out until they are actually useful.
- %
- %"--env-type <type>",
- %"\tSpecify the the environment type for the compiler."
- %"\tThe <type> should be one of `posix', `cygwin', `msys', or `windows'."
- %"\tThis option is equivalent to setting both --host-env-type and"
- %"\t--target-env-type to <type>."
- %"--host-env-type <type>",
- %"\tSpecify the environment type under which the compiler will be",
- %"\tinvoked."
- %"--target-env-type <type>",
- %"\tSpecify the environment type under which compiled programs will be",
- %"\tinvoked."
+ "\t(This option is only supported by `mmc --make'.)",
+ "--env-type <type>",
+ "\tSpecify the the environment type in which the compiler and generated",
+ "\tprograms will be invoked.",
+ "\tThe <type> should be one of `posix', `cygwin', `msys', or `windows'.",
+ "\tThis option is equivalent to setting both --host-env-type and",
+ "\t--target-env-type to <type>.",
+ "--host-env-type <type>",
+ "\tSpecify the environment type in which the compiler will be",
+ "\tinvoked.",
+ "--target-env-type <type>",
+ "\tSpecify the environment type in which generated programs will be",
+ "\tinvoked."
]).
:- pred options_help_misc(io::di, io::uo) is det.
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.619
diff -u -r1.619 user_guide.texi
--- doc/user_guide.texi 6 Jan 2011 13:40:12 -0000 1.619
+++ doc/user_guide.texi 10 Jan 2011 06:35:39 -0000
@@ -9316,6 +9316,30 @@
This option uses temporary files to pass arguments to sub-commands.
(This option is only supported by @samp{mmc --make})
+ at sp 1
+ at item --env-type @var{type}
+ at findex --env-type
+Specify the environment type in which the compiler and generated
+programs will be invoked.
+The environment type controls how the compiler and generated programs
+interact with the shell and other system tools.
+The @var{type} should be one of @samp{posix}, @samp{cygwin}, @samp{msys},
+or @samp{windows}.
+This option is equivalent to setting both @samp{--host-env-type} and
+ at samp{--target-env-type} to @var{type}.
+
+ at sp 1
+ at item --host-env-type @var{type}
+ at findex --host-env-type
+Specify the environment type in which the compiler will be invoked.
+(See above for a list of supported environment types.)
+
+ at sp 1
+ at item --target-env-type @var{type}
+ at findex --target-env-type
+Specify the environment type in which generated programs will be invoked.
+(See above for a list of supported environment types.)
+
@end table
@node Miscellaneous options
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to: mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions: mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------
More information about the reviews
mailing list