[m-rev.] for review: combine ml and c2init options

Simon Taylor stayl at cs.mu.OZ.AU
Fri Dec 7 01:53:52 AEDT 2001


On 06-Dec-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 30-Nov-2001, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > 
> > Combine the options for ml and c2init. Once mmake has been
> > altered to pass MLFLAGS to c2init users will be able to
> > mostly ignore the existence of c2init.
> > 
> > diff -N scripts/parse_ml_options.sh-subr.in
> ...
> > +Diagnostics options:
> > +	-v, --verbose
> > +		Echo the gcc command line before executing it.
> 
> It might be a good idea to change that to
> 
> 		Print each command before executing it.

Done.
 
> and modifying c2init to support this option
> (i.e. printing the `mkinit' command).

Not done. The mkinit command line is far less likely to be useful
to the user than the linker command line.

> > +	-i, --include-initialization-code

> In fact this option is rarely useful, and might not be worth documenting.

Removed.
 
> > +
> > +	Environment variables:
> > +		MERCURY_MOD_LIB_DIR, MERCURY_MOD_LIB_MODS,
> > +		MERCURY_TRACE_LIB_DIR, MERCURY_TRACE_LIB_MODS,
> > +		MERCURY_MKINIT.

> The environment variables should be listed after all the options
> (and "Environment variables:" should not be indented).

Done.
 
> I also have a couple of suggestions about things that were
> just moved around, not modified, in this change:
> 
> > +Initialization options:
> > +	-a, --aditi
> > +		Generate a function to upload Aditi-RL data to a database.
> 
> That description is a bit cryptic.  I suggest appending the following:
> 
> 		This option is needed when interfacing with the Aditi
> 		deductive database system.

Done.

> > +	-c <n>, --max-calls <n>
> > +		Break up the initialization into groups of at most <n> function
> > +		calls.  (Default value of <n> is 40.)
> 
> This one is probably not useful enough to be worth officially documenting.
> I suggest commenting out the documentation for this option.

Removed.

Simon.

Index: parse_ml_options.sh-subr.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/parse_ml_options.sh-subr.in,v
retrieving revision 1.1
diff -u -u -r1.1 parse_ml_options.sh-subr.in
--- parse_ml_options.sh-subr.in	3 Dec 2001 03:11:26 -0000	1.1
+++ parse_ml_options.sh-subr.in	6 Dec 2001 14:27:37 -0000
@@ -66,7 +66,7 @@
 
 Diagnostics options:
 	-v, --verbose
-		Echo the gcc command line before executing it.
+		Print each command before executing it.
 	--no-demangle
 		Don't pipe the output of the linker through the Mercury
 		demangler.
@@ -139,16 +139,8 @@
 Initialization options:
 	-a, --aditi
 		Generate a function to upload Aditi-RL data to a database.
-	-c <n>, --max-calls <n>
-		Break up the initialization into groups of at most <n> function
-		calls.  (Default value of <n> is 40.)
-	-i, --include-initialization-code
-		Always include code that calls the initialization functions
-		of the various modules. With this option, the debugger can use
-		information from any modules that were compiled with execution
-		tracing to print (partial) stack traces, and to print the
-		values of variables in ancestors of the current call, even
-		in grades in which this not normally possible.
+		This option is needed when interfacing with the Aditi
+		deductive database system.
 	--no-main, --library
 		Don't generate a \`main()' function.
 		Instead, generate a function
@@ -174,19 +166,34 @@
 		containing only C code that was automatically generated
 		by the Mercury compiler.)
 
-	Environment variables:
-		MERCURY_MOD_LIB_DIR, MERCURY_MOD_LIB_MODS,
-		MERCURY_TRACE_LIB_DIR, MERCURY_TRACE_LIB_MODS,
-		MERCURY_MKINIT.
-
 Threads options:
 	--use-thread-libs
 		Link with the POSIX thread libraries. This option is useful
 		if a C library being linked with uses threads, but the
 		Mercury code being linked doesn't.
 
-$grade_usage"
+$grade_usage
+
+Environment variables:
+		MERCURY_DEFAULT_GRADE, MERCURY_C_COMPILER,
+		MERCURY_C_LIB_DIR, MERCURY_NONSHARED_LIB_DIR,
+		MERCURY_MOD_LIB_DIR, MERCURY_MOD_LIB_MODS,
+		MERCURY_TRACE_LIB_DIR, MERCURY_TRACE_LIB_MODS,
+		MERCURY_MKINIT."
 
+# The following options are not generally useful, so they are not documented:
+# -i, --include-initialization-code
+# 	Always include code that calls the initialization functions
+# 	of the various modules. With this option, the debugger can use
+# 	information from any modules that were compiled with execution
+# 	tracing to print (partial) stack traces, and to print the
+# 	values of variables in ancestors of the current call, even
+# 	in grades in which this not normally possible.
+#	(It's usually better just to use `--trace').
+# -c <n>, --max-calls <n>
+#         Break up the initialization into groups of at most <n> function
+#         calls.  (Default value of <n> is 40.)
+ 
 while : ; do
     case "$1" in
 	-h|--help|"-?")
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list