[m-rev.] for review: install executables to top-level bin directory

Ian MacLarty maclarty at cs.mu.OZ.AU
Sun Oct 23 21:32:45 AEST 2005


This diff is an alternative to my previous proposal of a C version of mmc.
In this proposal we would install mercury_compile directly to the top-level bin
directory.  In a subsequent diff I would rename mercury_compile to mmc.

My reasons for abandoning the previous proposal are as follows:
I encountered some problems with the MinGW version of execv on Windows XP
(on Windows 98 it seems to work fine).  The MinGW version of execv seems
to spawn off a new process in the background, instead of replacing the
current process.  This means control returns to the command shell, even
though mercury_compile has not yet exited.  Using system instead would
not be desirable for the reasons pointed out by Peter Moulder.  The C code
from mmc.c was also quite messy and would be difficult to maintain.

I think this new proposal would be far more elegant.

I have tested this change by building and installing Mercury and then using
the installed compiler to bootcheck the workspace.

I have not yet tested the test_mercury script or the java or il backends,
but the changes there are small.

For review by anyone.

Estimated hours taken: 2
Branches: main and 0.12

Remove the architecture string from the installed directory structure
and put the executables in $PREFIX/bin, instead of
$PREFIX/lib/mercury/bin/$FULLARCH.

The reason for this change is to reduce the need for unix shell scripts in
the top-level bin directory that call the actual programs in the
lib/mercury/bin/FULLARCH directory.  The unix scripts can't be run on Windows
without a unix emulation environment like Cygwin.

Because the executables are now in the top-level bin directory, we cannot
install multiple architectures under the same directory structure.  However
this is not a real loss, since the binaries for different architectures can
just be installed to different locations, as we currently do anyway on
mundula.cs.mu.oz.au.

The plan is to rename mercury_compile to mmc and do away with the mmc unix
script.  This will allow mmc to be run on Windows without Cygwin or MSYS.
This proposal replaces a previous proposal to implement a C version of the
mmc script.  That solution turned out to be quite complicated and
unreliable.

This diff will also mean mdice, mslice and mtc_union will be in the same
directory as mmc, so will be in the PATH as long as mmc is in the PATH.

configure.in:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
compiler/compile_target_code.m:
compiler/handle_options.m:
compiler/make.program_target.m:
debian/rules:
library/Mmakefile:
scripts/Mmake.vars.in:
scripts/mdprof.in:
scripts/mercury.bat.in:
scripts/mgnuc.in:
scripts/ml.in:
scripts/mmc.in:
scripts/mprof.in:
tools/run_all_tests_from_cron:
tools/test_mercury:
	Remove FULLARCH from the installed directory structure.
	Install executables to the top-level bin directory.

Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.436
diff -u -r1.436 configure.in
--- configure.in	18 Oct 2005 07:20:09 -0000	1.436
+++ configure.in	23 Oct 2005 06:47:18 -0000
@@ -300,11 +300,11 @@
 		then
 			true
 		elif
-			test -f $LIBDIR/bin/$FULLARCH/mercury_compile ||
-			test -f $LIBDIR/bin/$FULLARCH/mercury_compile.exe
+			test -f $PREFIX/bin/mercury_compile ||
+			test -f $PREFIX/bin/mercury_compile.exe
 		then
 			AC_MSG_WARN(
-[using $LIBDIR/bin/$FULLARCH/mercury_compile to bootstrap])
+[using $PREFIX/bin/mercury_compile to bootstrap])
 		else
 			AC_MSG_ERROR(
 [You need a working Mercury compiler to bootstrap with])
Index: bindist/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/bindist/Mmakefile,v
retrieving revision 1.39
diff -u -r1.39 Mmakefile
--- bindist/Mmakefile	1 Mar 2003 06:34:48 -0000	1.39
+++ bindist/Mmakefile	23 Oct 2005 08:48:15 -0000
@@ -43,7 +43,7 @@
 		  ../scripts/canonical_grade \
 		  ../scripts/gud.el

-CGI_PROG	= $(INSTALL_LIB_DIR)/mercury/bin/$(FULLARCH)/mdprof_cgi
+CGI_PROG	= $(INSTALL_PREFIX)/bin/mdprof_cgi

 VIM_FILES	= ../vim/*

Index: bindist/bindist.Makefile.in
===================================================================
RCS file: /home/mercury1/repository/mercury/bindist/bindist.Makefile.in,v
retrieving revision 1.32
diff -u -r1.32 bindist.Makefile.in
--- bindist/bindist.Makefile.in	3 Mar 2003 14:30:22 -0000	1.32
+++ bindist/bindist.Makefile.in	23 Oct 2005 06:33:13 -0000
@@ -180,7 +180,7 @@
 .PHONY: install_gac
 install_gac:
 	if test -d $(INSTALL_LIBDIR)/lib/ilc/ ; then 		\
-		cd $(INSTALL_LIBDIR)/lib/ilc/$(FULLARCH) &&	\
+		cd $(INSTALL_LIBDIR)/lib/ilc &&			\
 		$(GACUTIL) -i mercury.dll ; 			\
 	fi
 else
Index: compiler/compile_target_code.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/compile_target_code.m,v
retrieving revision 1.71
diff -u -r1.71 compile_target_code.m
--- compiler/compile_target_code.m	12 Oct 2005 23:51:34 -0000	1.71
+++ compiler/compile_target_code.m	23 Oct 2005 06:37:43 -0000
@@ -1379,17 +1379,16 @@
             globals__io_lookup_string_option(TraceFlagsOpt, TraceOpts, !IO)
         ),

-        % Pass either `-llib' or `PREFIX/lib/GRADE/FULLARCH/liblib.a',
+        % Pass either `-llib' or `PREFIX/lib/GRADE/liblib.a',
         % depending on whether we are linking with static or shared
         % Mercury libraries.

         globals__io_lookup_accumulating_option(
             mercury_library_directories, MercuryLibDirs0, !IO),
-        globals__io_lookup_string_option(fullarch, FullArch, !IO),
         globals__io_get_globals(Globals, !IO),
         grade_directory_component(Globals, GradeDir),
         MercuryLibDirs = list__map(
-            (func(LibDir) = LibDir/"lib"/GradeDir/FullArch),
+            (func(LibDir) = LibDir/"lib"/GradeDir),
             MercuryLibDirs0),
         globals__io_lookup_accumulating_option(link_libraries,
             LinkLibrariesList0, !IO),
@@ -1469,7 +1468,6 @@
     io::di, io::uo) is det.

 get_mercury_std_libs(TargetType, StdLibDir, StdLibs, !IO) :-
-    globals__io_lookup_string_option(fullarch, FullArch, !IO),
     globals__io_get_gc_method(GCMethod, !IO),
     globals__io_lookup_string_option(library_extension, LibExt, !IO),
     globals__io_get_globals(Globals, !IO),
@@ -1506,12 +1504,12 @@
             GCGrade = GCGrade0
         ),
         make_link_lib(TargetType, GCGrade, SharedGCLibs, !IO),
-        StaticGCLibs = quote_arg(StdLibDir/"lib"/FullArch/
+        StaticGCLibs = quote_arg(StdLibDir/"lib"/
             ("lib" ++ GCGrade ++ LibExt))
     ;
         GCMethod = mps,
         make_link_lib(TargetType, "mps", SharedGCLibs, !IO),
-        StaticGCLibs = quote_arg(StdLibDir/"lib"/FullArch/
+        StaticGCLibs = quote_arg(StdLibDir/"lib"/
             ("libmps" ++ LibExt) )
     ;
         GCMethod = accurate,
@@ -1526,13 +1524,13 @@
         SharedTraceLibs = ""
     ;
         StaticTraceLibs =
-            quote_arg(StdLibDir/"lib"/GradeDir/FullArch/
+            quote_arg(StdLibDir/"lib"/GradeDir/
                 ("libmer_trace" ++ LibExt)) ++
             " " ++
-            quote_arg(StdLibDir/"lib"/GradeDir/FullArch/
+            quote_arg(StdLibDir/"lib"/GradeDir/
                 ("libmer_browser" ++ LibExt)) ++
             " " ++
-            quote_arg(StdLibDir/"lib"/GradeDir/FullArch/
+            quote_arg(StdLibDir/"lib"/GradeDir/
                 ("libmer_mdbcomp" ++ LibExt)),
         make_link_lib(TargetType, "mer_trace", TraceLib, !IO),
         make_link_lib(TargetType, "mer_browser", BrowserLib, !IO),
@@ -1545,9 +1543,9 @@
     ( MercuryLinkage = "static" ->
         StdLibs = string__join_list(" ",
             [StaticTraceLibs,
-            quote_arg(StdLibDir/"lib"/GradeDir/FullArch/
+            quote_arg(StdLibDir/"lib"/GradeDir/
                 ("libmer_std" ++ LibExt)),
-            quote_arg(StdLibDir/"lib"/GradeDir/FullArch/
+            quote_arg(StdLibDir/"lib"/GradeDir/
                 ("libmer_rt" ++ LibExt)),
             StaticGCLibs])
     ; MercuryLinkage = "shared" ->
Index: compiler/handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.238
diff -u -r1.238 handle_options.m
--- compiler/handle_options.m	17 Oct 2005 07:43:21 -0000	1.238
+++ compiler/handle_options.m	23 Oct 2005 06:40:54 -0000
@@ -1387,13 +1387,13 @@
             globals__lookup_accumulating_option(!.Globals,
                 link_library_directories, LinkLibDirs0),
             globals__set_option(link_library_directories,
-                accumulating([StdLibDir/"lib"/FullArch | LinkLibDirs0]),
+                accumulating([StdLibDir/"lib" | LinkLibDirs0]),
                 !Globals),

             globals__lookup_accumulating_option(!.Globals,
                 runtime_link_library_directories, Rpath0),
             globals__set_option(runtime_link_library_directories,
-                accumulating([StdLibDir/"lib"/FullArch | Rpath0]), !Globals)
+                accumulating([StdLibDir/"lib" | Rpath0]), !Globals)

         ;
             MaybeStdLibDir = no
@@ -1445,7 +1445,7 @@
             MercuryLibDirs = [_ | _],
             ExtraLinkLibDirs = list__map(
                 (func(MercuryLibDir) =
-                    MercuryLibDir/"lib"/GradeString/FullArch
+                    MercuryLibDir/"lib"/GradeString
                 ), MercuryLibDirs),

             globals__lookup_accumulating_option(!.Globals,
@@ -1460,7 +1460,7 @@

             ExtraCIncludeDirs = list__map(
                 (func(MercuryLibDir) =
-                    MercuryLibDir/"lib"/GradeString/FullArch/"inc"
+                    MercuryLibDir/"lib"/GradeString/"inc"
                 ), MercuryLibDirs),
             globals__lookup_accumulating_option(!.Globals, c_include_directory,
                 CIncludeDirs),
Index: compiler/make.program_target.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make.program_target.m,v
retrieving revision 1.31
diff -u -r1.31 make.program_target.m
--- compiler/make.program_target.m	12 Oct 2005 23:51:36 -0000	1.31
+++ compiler/make.program_target.m	23 Oct 2005 06:42:21 -0000
@@ -749,13 +749,12 @@
         linked_target_file_name(ModuleName, java_archive, JarFileName, !IO),

         globals__io_lookup_string_option(install_prefix, Prefix, !IO),
-        globals__io_lookup_string_option(fullarch, FullArch, !IO),

         ( Grade = "java" ->
             GradeLibDir = Prefix/"lib"/"mercury"/"lib"/"java",
             install_file(JarFileName, GradeLibDir, LibsSucceeded, !IO)
         ;
-            GradeLibDir = Prefix/"lib"/"mercury"/"lib"/Grade/FullArch,
+            GradeLibDir = Prefix/"lib"/"mercury"/"lib"/Grade,
             install_file(LibFileName, GradeLibDir, LibSuccess, !IO),
             install_file(SharedLibFileName, GradeLibDir, SharedLibSuccess,
                 !IO),
@@ -781,7 +780,6 @@
     (
         MaybeImports = yes(Imports),
         globals__io_lookup_string_option(install_prefix, Prefix, !IO),
-        globals__io_lookup_string_option(fullarch, FullArch, !IO),
         LibDir = Prefix/"lib"/"mercury",

         globals__io_get_target(Target, !IO),
@@ -795,7 +793,7 @@
                 Imports ^ foreign_code = contains_foreign_code(_)
             )
         ->
-            GradeIncDir = LibDir/"lib"/Grade/FullArch/"inc",
+            GradeIncDir = LibDir/"lib"/Grade/"inc",
             install_subdir_file(LinkSucceeded, GradeIncDir, ModuleName, "mih",
                 HeaderSucceded1, !IO),

@@ -901,13 +899,12 @@

 make_grade_install_dirs(Grade, Result, LinkResult, !IO) :-
     globals__io_lookup_string_option(install_prefix, Prefix, !IO),
-    globals__io_lookup_string_option(fullarch, FullArch, !IO),
     LibDir = Prefix/"lib"/"mercury",

     GradeIntsSubdir = LibDir/"ints"/Grade/"Mercury",
     make_directory(GradeIntsSubdir, Result1, !IO),

-    GradeIncSubdir = LibDir/"lib"/Grade/FullArch/"inc"/"Mercury",
+    GradeIncSubdir = LibDir/"lib"/Grade/"inc"/"Mercury",
     make_directory(GradeIncSubdir, Result2, !IO),

     Results0 = [Result1, Result2],
Index: debian/rules
===================================================================
RCS file: /home/mercury1/repository/mercury/debian/rules,v
retrieving revision 1.6
diff -u -r1.6 rules
--- debian/rules	2 Sep 2005 05:28:42 -0000	1.6
+++ debian/rules	23 Oct 2005 08:53:21 -0000
@@ -100,7 +100,7 @@

 	cd build/mercury && \
 	  CC="$(CC)" \
-	  MERCURY_COMPILER="$(CURDIR)/debian/tmp/usr/lib/mercury/bin/`grep ^FULLARCH tmp_dir/scripts/Mmake.vars | sed -e 's/.*= //'`/mercury_compile" \
+	  MERCURY_COMPILER="$(CURDIR)/debian/tmp/usr/bin/mercury_compile" \
 	  $(MAKE) install INSTALL_PREFIX=$(CURDIR)/debian/tmp/usr $(MAKEFLAGS)

 	cp build/mercury/README build/mercury/README.DotNet \
Index: library/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.143
diff -u -r1.143 Mmakefile
--- library/Mmakefile	20 May 2005 06:15:12 -0000	1.143
+++ library/Mmakefile	23 Oct 2005 06:53:20 -0000
@@ -533,7 +533,7 @@
 install_library: jars
 	mkdir -p $(INSTALL_JAVA_LIBRARY_DIR)
 	cp $(JARS) $(INSTALL_JAVA_LIBRARY_DIR)
-	-cp $(NATIVE_SO) $(INSTALL_JAVA_LIBRARY_DIR)/$(FULLARCH)
+	-cp $(NATIVE_SO) $(INSTALL_JAVA_LIBRARY_DIR)

 else

Index: scripts/Mmake.vars.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.vars.in,v
retrieving revision 1.96
diff -u -r1.96 Mmake.vars.in
--- scripts/Mmake.vars.in	16 Aug 2005 15:51:30 -0000	1.96
+++ scripts/Mmake.vars.in	23 Oct 2005 08:55:07 -0000
@@ -20,10 +20,10 @@
 EXTRA_INT_DIRS		= $(patsubst %,%/ints,$(EXTRA_LIB_DIRS))
 MERCURY_EXTRA_INT_DIRS	= $(EXTRA_INT_DIRS)
 EXTRA_C_LIB_DIRS	= \
-	$(patsubst %,%/lib/$(GRADESTRING)/@FULLARCH@,$(EXTRA_LIB_DIRS)) \
-	$(patsubst %,%/lib/@FULLARCH@,$(EXTRA_LIB_DIRS))
+	$(patsubst %,%/lib/$(GRADESTRING),$(EXTRA_LIB_DIRS)) \
+	$(patsubst %,%/lib,$(EXTRA_LIB_DIRS))
 EXTRA_C_INCL_DIRS	= \
-	$(patsubst %,%/lib/$(GRADESTRING)/@FULLARCH@/inc,$(EXTRA_LIB_DIRS)) \
+	$(patsubst %,%/lib/$(GRADESTRING)/inc,$(EXTRA_LIB_DIRS)) \
 	$(patsubst %,%/inc,$(EXTRA_LIB_DIRS))
 EXTRA_INIT_DIRS		= $(patsubst %,%/modules,$(EXTRA_LIB_DIRS))
 MERCURY_EXTRA_INIT_DIRS = $(EXTRA_INIT_DIRS)
@@ -247,7 +247,7 @@

 # MERCURY_STDLIB_DIR should be set by the `mmake' script.
 MERC_C_INCL_DIR = $(MERCURY_STDLIB_DIR)/inc
-MERC_DLL_DIR    = $(MERCURY_STDLIB_DIR)/lib/$(GRADESTRING)/@FULLARCH@
+MERC_DLL_DIR    = $(MERCURY_STDLIB_DIR)/lib/$(GRADESTRING)

 # MS_ILASM is the Microsoft IL assembler, which turns IL assembly code
 # into bytecode.
@@ -740,14 +740,13 @@
 INSTALL_INC_DIR		= $(INSTALL_LIBDIR)/inc
 INSTALL_MMAKE_DIR	= $(INSTALL_LIBDIR)/mmake
 FULLARCH		= @FULLARCH@
-INSTALL_MERC_BIN_DIR	= $(INSTALL_LIBDIR)/bin/$(FULLARCH)
-INSTALL_MERC_GRADELESS_LIB_DIR = $(INSTALL_LIBDIR)/lib/$(FULLARCH)
-FINAL_INSTALL_MERC_GRADELESS_LIB_DIR = $(FINAL_INSTALL_LIBDIR)/lib/$(FULLARCH)
-INSTALL_MERC_LIB_DIR	= $(INSTALL_LIBDIR)/lib/$(GRADESTRING)/$(FULLARCH)
-INSTALL_GRADE_INC_DIR	= $(INSTALL_LIBDIR)/lib/$(GRADESTRING)/$(FULLARCH)/inc
+INSTALL_MERC_BIN_DIR	= $(INSTALL_PREFIX)/bin
+INSTALL_MERC_GRADELESS_LIB_DIR = $(INSTALL_LIBDIR)/lib
+FINAL_INSTALL_MERC_GRADELESS_LIB_DIR = $(FINAL_INSTALL_LIBDIR)/lib
+INSTALL_MERC_LIB_DIR	= $(INSTALL_LIBDIR)/lib/$(GRADESTRING)
+INSTALL_GRADE_INC_DIR	= $(INSTALL_LIBDIR)/lib/$(GRADESTRING)/inc
 INSTALL_GRADE_INC_SUBDIR = $(INSTALL_GRADE_INC_DIR)/Mercury/mihs
-FINAL_INSTALL_MERC_LIB_DIR = \
-		$(FINAL_INSTALL_LIBDIR)/lib/$(GRADESTRING)/$(FULLARCH)
+FINAL_INSTALL_MERC_LIB_DIR = $(FINAL_INSTALL_LIBDIR)/lib/$(GRADESTRING)

 ENABLE_DEEP_PROFILER	= @ENABLE_DEEP_PROFILER@

Index: scripts/mdprof.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mdprof.in,v
retrieving revision 1.2
diff -u -r1.2 mdprof.in
--- scripts/mdprof.in	9 Jul 2001 04:58:52 -0000	1.2
+++ scripts/mdprof.in	23 Oct 2005 07:10:09 -0000
@@ -15,6 +15,6 @@
 # unprocessed, which is what we want; the web servers breaks up QUERY_STRING
 # on boundaries inappropriate for us when computing the command line arguments.

-PATH=@prefix@/lib/mercury/bin/@FULLARCH@:$PATH
+PATH=@prefix@/bin:$PATH
 export PATH
 exec mdprof_cgi
Index: scripts/mercury.bat.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mercury.bat.in,v
retrieving revision 1.2
diff -u -r1.2 mercury.bat.in
--- scripts/mercury.bat.in	6 Aug 2003 12:38:14 -0000	1.2
+++ scripts/mercury.bat.in	23 Oct 2005 07:11:24 -0000
@@ -45,8 +45,8 @@

 :config_dir_set

-if "%MERCURY_COMPILER%"=="" set MERCURY_COMPILER="@LIBDIR@\bin\@FULLARCH@\mercury_compile"
-if "%MERCURY_COMPILER%"=="^%MERCURY_COMPILER^%" set MERCURY_COMPILER="@LIBDIR@\bin\@FULLARCH@\mercury_compile"
+if "%MERCURY_COMPILER%"=="" set MERCURY_COMPILER="@PREFIX@\bin\mercury_compile"
+if "%MERCURY_COMPILER%"=="^%MERCURY_COMPILER^%" set MERCURY_COMPILER="@PREFIX@\bin\mercury_compile"

 rem There is no equivalent of "$@" available on all Windows platforms.
 rem (Windows XP has `%*').
Index: scripts/mgnuc.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mgnuc.in,v
retrieving revision 1.111
diff -u -r1.111 mgnuc.in
--- scripts/mgnuc.in	19 Sep 2005 08:07:09 -0000	1.111
+++ scripts/mgnuc.in	23 Oct 2005 07:12:11 -0000
@@ -211,7 +211,7 @@
         # The option setting code above guarantees that if
         # `--mercury-stdlib-dir' is set, `--mercury-config-dir'
         # is also set.
-        MERC_ALL_C_INCL_DIRS="-I$mercury_config_dir/conf -I$mercury_stdlib_dir/inc -I$mercury_stdlib_dir/lib/$GRADE/$FULLARCH/inc"
+        MERC_ALL_C_INCL_DIRS="-I$mercury_config_dir/conf -I$mercury_stdlib_dir/inc -I$mercury_stdlib_dir/lib/$GRADE/inc"
         ;;
 esac

Index: scripts/ml.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/ml.in,v
retrieving revision 1.114
diff -u -r1.114 ml.in
--- scripts/ml.in	20 Sep 2005 04:26:49 -0000	1.114
+++ scripts/ml.in	23 Oct 2005 07:14:03 -0000
@@ -218,7 +218,7 @@
 	*)
 		LIBGC="-l$gc_grade"
 		LIBGC_STATIC=`$FIX_PATH_FOR_LINKER \
-			$LIBDIR/$FULLARCH/lib$gc_grade. at LIB_SUFFIX@`
+			$LIBDIR/lib$gc_grade. at LIB_SUFFIX@`
 		;;
 esac

@@ -235,11 +235,11 @@
 		TRACE_LIBS_SYSTEM="$TRACE_LIBS_SYSTEM $READLINE_LIBRARIES"
 		TRACE_STATIC_LIBS="\
 		  `$FIX_PATH_FOR_LINKER \
-		   $LIBDIR/$GRADE/$FULLARCH/lib$TRACE_LIB_NAME. at LIB_SUFFIX@` \
+		   $LIBDIR/$GRADE/lib$TRACE_LIB_NAME. at LIB_SUFFIX@` \
 		  `$FIX_PATH_FOR_LINKER \
-		   $LIBDIR/$GRADE/$FULLARCH/lib$BROWSER_LIB_NAME. at LIB_SUFFIX@` \
+		   $LIBDIR/$GRADE/lib$BROWSER_LIB_NAME. at LIB_SUFFIX@` \
 		  `$FIX_PATH_FOR_LINKER \
-		   $LIBDIR/$GRADE/$FULLARCH/lib$MDBCOMP_LIB_NAME. at LIB_SUFFIX@`"
+		   $LIBDIR/$GRADE/lib$MDBCOMP_LIB_NAME. at LIB_SUFFIX@`"
 		;;
 	false)	TRACE_LIBS=
 		TRACE_LIBS_SYSTEM=
@@ -334,8 +334,8 @@
 fi

 merc_libdir_opts="\
-	@LIB_LIBPATH@$LIBDIR/$GRADE/$FULLARCH
-	@LIB_LIBPATH@$LIBDIR/$FULLARCH
+	@LIB_LIBPATH@$LIBDIR/$GRADE
+	@LIB_LIBPATH@$LIBDIR
 "
 system_libdir_opts=
 for dir in $ALL_LOCAL_C_LIB_DIRS kludge_for_broken_shells; do
@@ -349,15 +349,15 @@
 	shared)
 		MERCURY_LIBS=${MERCURY_LIBS="$TRACE_LIBS -l$STD_LIB_NAME -l$RT_LIB_NAME $LIBGC"}
 		LIBS=${LIBS="$MERCURY_LIBS $TRACE_LIBS_SYSTEM $STDLIBS"}
-		merc_shlib_dirs="$merc_shlib_dirs $LIBDIR/$GRADE/$FULLARCH"
-		merc_shlib_dirs="$merc_shlib_dirs $LIBDIR/$FULLARCH"
+		merc_shlib_dirs="$merc_shlib_dirs $LIBDIR/$GRADE"
+		merc_shlib_dirs="$merc_shlib_dirs $LIBDIR"
 		;;
 	static)
 		MERCURY_LIBS=${MERCURY_LIBS="$TRACE_STATIC_LIBS
 		`$FIX_PATH_FOR_LINKER \
-		  $LIBDIR/$GRADE/$FULLARCH/lib$STD_LIB_NAME. at LIB_SUFFIX@` \
+		  $LIBDIR/$GRADE/lib$STD_LIB_NAME. at LIB_SUFFIX@` \
 		`$FIX_PATH_FOR_LINKER \
-		  $LIBDIR/$GRADE/$FULLARCH/lib$RT_LIB_NAME. at LIB_SUFFIX@` \
+		  $LIBDIR/$GRADE/lib$RT_LIB_NAME. at LIB_SUFFIX@` \
 		$LIBGC_STATIC"}
 		LIBS=${LIBS="$MERCURY_LIBS $TRACE_LIBS_SYSTEM $STDLIBS"}
 		merc_shlib_dirs=""
Index: scripts/mmc.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mmc.in,v
retrieving revision 1.38
diff -u -r1.38 mmc.in
--- scripts/mmc.in	4 Oct 2005 10:34:38 -0000	1.38
+++ scripts/mmc.in	23 Oct 2005 07:14:47 -0000
@@ -14,7 +14,7 @@
 # MERCURY_COMPILER, MERCURY_C_COMPILER, MERCURY_DEFAULT_GRADE,
 # MERCURY_DEFAULT_OPT_LEVEL.

-MERCURY_COMPILER=${MERCURY_COMPILER-'@LIBDIR@/bin/@FULLARCH@/mercury_compile'}
+MERCURY_COMPILER=${MERCURY_COMPILER-'@PREFIX@/bin/mercury_compile'}
 MERCURY_CONFIG_DIR=${MERCURY_CONFIG_DIR-${MERCURY_STDLIB_DIR-'@CONFIG_LIBDIR@'}}
 export MERCURY_COMPILER MERCURY_CONFIG_DIR

Index: scripts/mprof.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mprof.in,v
retrieving revision 1.5
diff -u -r1.5 mprof.in
--- scripts/mprof.in	27 Jul 1997 15:09:42 -0000	1.5
+++ scripts/mprof.in	23 Oct 2005 07:15:19 -0000
@@ -12,7 +12,7 @@
 #
 # Environment variables: MERCURY_PROFILER.

-MPROF=${MERCURY_PROFILER="@LIBDIR@/bin/@FULLARCH@/mercury_profile"}
+MPROF=${MERCURY_PROFILER="@PREFIX@/bin/mercury_profile"}

 case $# in
 	0) exec $MPROF ;;
Index: tools/run_all_tests_from_cron
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/run_all_tests_from_cron,v
retrieving revision 1.66
diff -u -r1.66 run_all_tests_from_cron
--- tools/run_all_tests_from_cron	14 Sep 2005 06:21:27 -0000	1.66
+++ tools/run_all_tests_from_cron	23 Oct 2005 07:17:14 -0000
@@ -161,7 +161,7 @@
 	echo
 	INSTALL_DIR=`tail $logfile | \
 		awk '/^Installation directory:/ { print $3; }' `
-	cd $INSTALL_DIR/lib/mercury/bin/$FULLARCH
+	cd $INSTALL_DIR/bin
 	ls -l mercury_compile
 	size mercury_compile
 	{
Index: tools/test_mercury
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/test_mercury,v
retrieving revision 1.259
diff -u -r1.259 test_mercury
--- tools/test_mercury	14 Sep 2005 14:03:57 -0000	1.259
+++ tools/test_mercury	23 Oct 2005 07:18:58 -0000
@@ -305,16 +305,16 @@
 # Version of the mercury compiler to use for bootstrapping
 # Normally we use the compiler from same location that we will install in.
 # But occasionally this setting will get overridden below.
-if test -x $INSTALL_DIR/lib/mercury/bin/$FULLARCH/mercury_compile
+if test -x $INSTALL_DIR/bin/mercury_compile
 then
-	BOOTSTRAP_MERCURY_COMPILER=$INSTALL_DIR/lib/mercury/bin/$FULLARCH/mercury_compile
+	BOOTSTRAP_MERCURY_COMPILER=$INSTALL_DIR/bin/mercury_compile
 fi

 # The following can be edited and uncommented if you need to use
 # a different bootstrap compiler to re-bootstrap a host which
 # has gotten too out-of-date.
 #case $HOST in mars)
-#	BOOTSTRAP_MERCURY_COMPILER=$TOPDIR/$INSTALL_DIR_NAME/$FULLARCH/lib/mercury/bin/$FULLARCH/mercury_compile
+#	BOOTSTRAP_MERCURY_COMPILER=$TOPDIR/$INSTALL_DIR_NAME/$FULLARCH/bin/mercury_compile
 #		;;
 #esac


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