[m-rev.] diff: change c2init options
Simon Taylor
stayl at cs.mu.OZ.AU
Tue Nov 13 19:28:58 AEDT 2001
Estimated hours taken: 0.25
This is the first part of a change to make c2init and ml take
the same set of options (the c2init options will be added as
an "Initialization options" section of the ml options). When
this change is complete, users will only need to add `--trace'
to MLFLAGS, not C2INITFLAGS as well. c2init is an implementation
detail that users shouldn't need to know about.
scripts/c2init.in:
Remove the `-l' short form of the `--library' option,
since it conflicts with the use of `-l' as a linker option.
Add `--no-main' as a synonym for `--library', which will
cause less confusion with the `--make-shared-lib' ml
option. `--library' will still be accepted for backwards
compatability because the C interface samples refer to it.
Add `--init-c-file' as a synonym for `-o' and `--output'.
The latter two will be removed after mmake and mmc are
changed to use `--init-c-file' because they don't make
sense as ml options.
Index: c2init.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/c2init.in,v
retrieving revision 1.31
diff -u -u -r1.31 c2init.in
--- c2init.in 8 May 2001 12:48:31 -0000 1.31
+++ c2init.in 13 Nov 2001 07:59:39 -0000
@@ -60,7 +60,7 @@
-t, --trace
Enable execution tracing in the generated executable.
Implies -i.
- -l, --library
+ --no-main, --library
Don't generate a \`main()' function.
Instead, generate a function
mercury_main(int argc, char **argv);
@@ -70,9 +70,10 @@
-I <directory>, --init-file-directory <directory>
Include <directory> in the list of directories searched to
locate \`.init' files.
- -o <filename>, --output <filename>
- Output the generated C program to the specified file,
- rather than sending it to the standard output.
+ --init-c-file <filename>, -o <filename>, --output <filename>
+ Output the generated C initialization program to the
+ specified file, rather than sending it to the standard
+ output.
-w <label>, --entry-point <label>
Set entry point to <label>.
(Default value corresponds to main/2.)
@@ -105,16 +106,16 @@
-t|--trace)
trace_opt="-t";;
- -l|--library)
+ --no-main|--library)
library_opt="-l";;
- -l-|--no-library)
+ --main|--no-library)
library_opt="";;
-I|--init-file-directory)
extra_init_dirs="$extra_init_dirs -I $2"; shift;;
- -o|--output)
+ --init-c-file|-o|--output)
output_file="$2"; shift;;
-w|--entry-point)
--------------------------------------------------------------------------
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