[m-rev.] diff: set {host,target}-env-type at configure time

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Jan 24 16:57:06 AEDT 2012


Branches: main, 11.07

Set the host and target environment types at configuration time.  By default,
they were both set to "posix" but that is no longer compatible with building
the csharp grade using the Microsoft compiler.

configure.in:
 	Set the environment type to "cygwin" on Cygwin, to "msys" on MinGW
 	and to "posix" otherwise.  (For Mercury installations that work with
 	the Windows command interpreter, it will need to be manually set to
 	"windows".)

scripts/Mercury.config.in:
 	Set the environment type.  (We set the target and host separately
 	so that is easier for installers to automatically modify this file.)

README.MS-VisualC:
 	Conform to the above change.

Julien.

Index: README.MS-VisualC
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/README.MS-VisualC,v
retrieving revision 1.10
diff -u -r1.10 README.MS-VisualC
--- README.MS-VisualC	23 Nov 2011 11:44:12 -0000	1.10
+++ README.MS-VisualC	24 Jan 2012 05:52:26 -0000
@@ -157,9 +157,12 @@

    + Replace any Unix-style paths with their Windows-style equivalent.

-  + Add the following option in the value of the variable DEFAULT_MCFLAGS
- 
-    --env-type windows
+  + Modify the values of the options --host-env-type and --target-env-type
+    in the value of the variable DEFAULT_MCFLAGS so that their values are as
+    follows:
+
+    --host-env-type "windows"
+    --target-env-type "windows"

    + To specify the commands used to install files and directories include
      the following options in the value of the variable DEFAULT_MCFLAGS
Index: configure.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/configure.in,v
retrieving revision 1.610
diff -u -r1.610 configure.in
--- configure.in	15 Jan 2012 17:33:35 -0000	1.610
+++ configure.in	24 Jan 2012 05:39:27 -0000
@@ -4639,12 +4639,18 @@
  case "$host" in
      *-cygwin*)
          EXT_FOR_EXE=".exe"
+        HOST_ENV_TYPE=cygwin
+        TARGET_ENV_TYPE=cygwin
          ;;
      *mingw*)
          EXT_FOR_EXE=".exe"
+        HOST_ENV_TYPE=msys
+        TARGET_ENV_TYPE=msys
          ;;
      *)
          EXT_FOR_EXE=
+        HOST_ENV_TYPE=posix
+        TARGET_ENV_TYPE=posix
          ;;
  esac

@@ -4668,6 +4674,8 @@
  AC_SUBST(EXT_FOR_LINK_WITH_PIC_OBJECTS)
  AC_SUBST(EXT_FOR_SHARED_LIB)
  AC_SUBST(EXT_FOR_EXE)
+AC_SUBST(HOST_ENV_TYPE)
+AC_SUBST(TARGET_ENV_TYPE)
  AC_SUBST(USE_DLLS)
  AC_SUBST(SHARED_LIBS)
  AC_SUBST(SHARED_LIBS_SH)
Index: scripts/Mercury.config.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/Mercury.config.in,v
retrieving revision 1.29
diff -u -r1.29 Mercury.config.in
--- scripts/Mercury.config.in	15 Jan 2012 23:38:21 -0000	1.29
+++ scripts/Mercury.config.in	24 Jan 2012 05:35:55 -0000
@@ -123,6 +123,8 @@
  		--bytes-per-word "@BYTES_PER_WORD@" \
  		--sync-term-size "@SYNC_TERM_SIZE@" \
  		--dotnet-library-version "@MS_DOTNET_LIBRARY_VERSION@" \
+		--host-env-type "@HOST_ENV_TYPE@" \
+		--target-env-type "@TARGET_ENV_TYPE@" \
  		@RESTRICTED_COMMAND_LINE_OPT@ \
  		@HAVE_DELAY_SLOT@ \
  		@HAVE_BOXED_FLOATS@ \



--------------------------------------------------------------------------
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