[m-rev.] diff: add --output-c-compiler-type
Julien Fischer
juliensf at csse.unimelb.edu.au
Fri Sep 16 04:00:04 AEST 2011
Branches: 11.07, main
Add a new option for printing out the value of the --c-compiler-type option.
compiler/mercury_compile.m:
compiler/options.m:
doc/user_guid.texi:
Add the new option.
Julien.
Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.515
diff -u -r1.515 mercury_compile.m
--- compiler/mercury_compile.m 16 Jun 2011 07:54:24 -0000 1.515
+++ compiler/mercury_compile.m 15 Sep 2011 16:28:06 -0000
@@ -338,6 +338,7 @@
globals.lookup_bool_option(Globals, output_libgrades,
OutputLibGrades),
globals.lookup_bool_option(Globals, output_cc, OutputCC),
+ globals.lookup_bool_option(Globals, output_c_compiler_type, OutputCCType),
globals.lookup_bool_option(Globals, output_cflags, OutputCFlags),
globals.lookup_bool_option(Globals, output_library_link_flags,
OutputLibraryLinkFlags),
@@ -385,6 +386,10 @@
globals.lookup_string_option(Globals, cc, CC),
io.stdout_stream(StdOut, !IO),
io.write_string(StdOut, CC ++ "\n", !IO)
+ ; OutputCCType = yes ->
+ globals.lookup_string_option(Globals, c_compiler_type, CC_Type),
+ io.stdout_stream(StdOut, !IO),
+ io.write_string(StdOut, CC_Type ++ "\n", !IO)
; OutputCFlags = yes ->
io.stdout_stream(StdOut, !IO),
output_c_compiler_flags(Globals, StdOut, !IO)
Index: compiler/options.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.698
diff -u -r1.698 options.m
--- compiler/options.m 9 Aug 2011 11:00:55 -0000 1.698
+++ compiler/options.m 15 Sep 2011 16:32:52 -0000
@@ -202,6 +202,7 @@
; output_shared_lib_link_command
; output_libgrades
; output_cc
+ ; output_c_compiler_type
; output_cflags
; output_library_link_flags
@@ -1175,6 +1176,7 @@
output_shared_lib_link_command - bool(no),
output_libgrades - bool(no),
output_cc - bool(no),
+ output_c_compiler_type - bool(no),
output_cflags - bool(no),
output_library_link_flags - bool(no)
]).
@@ -2046,6 +2048,8 @@
long_option("output-shared-lib-link-command", output_shared_lib_link_command).
long_option("output-libgrades", output_libgrades).
long_option("output-cc", output_cc).
+long_option("output-cc-type", output_c_compiler_type).
+long_option("output-c-compiler-type", output_c_compiler_type).
long_option("output-cflags", output_cflags).
long_option("output-library-link-flags", output_library_link_flags).
@@ -3734,7 +3738,10 @@
"\tPrint the list of compilation grades in which a library",
"\tto be installed should be built to the standard output.",
"--output-cc",
- "\tPrint the name of the C compiler to the standard output.",
+ "\tPrint the command used to invoke the C compiler to the",
+ "\tstandard output.",
+ "--output-cc-type, --output-c-compiler-type",
+ "\tPrint the C compiler type to the standard output.",
"--output-cflags",
"\tPrint the flags with which the C compiler will be invoked",
"\tto the standard output.",
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.635
diff -u -r1.635 user_guide.texi
--- doc/user_guide.texi 9 Aug 2011 11:00:55 -0000 1.635
+++ doc/user_guide.texi 15 Sep 2011 16:55:07 -0000
@@ -6952,7 +6952,14 @@
@sp 1
@item --output-cc
@findex --output-cc
-Print the name of the C compiler to the standard output.
+Print the command used to invoke C compiler to the standard output.
+
+ at sp 1
+ at item --output-cc-type
+ at itemx --output-c-compiler-type
+ at findex --output-cc-type
+ at findex --output-c-compiler-type
+Print the C compiler type to the standard output.
@sp 1
@item --output-cflags
--------------------------------------------------------------------------
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