Files
mercury/scripts/mmc.in
Ian MacLarty 2e04ddc748 Remove the architecture string from the installed directory structure
Estimated hours taken: 1
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.
2005-10-25 10:17:29 +00:00

28 lines
1010 B
Bash

#! /bin/sh
# @configure_input@
#---------------------------------------------------------------------------#
# Copyright (C) 1994-1998, 2000-2005 The University of Melbourne.
# This file may only be copied under the terms of the GNU General
# Public License - see the file COPYING in the Mercury distribution.
#---------------------------------------------------------------------------#
#
# MMC - Melbourne Mercury Compiler.
#
# Use `mmc -h' for help.
#
# Environment variables: MERCURY_STDLIB_DIR, MERCURY_CONFIG_DIR,
# MERCURY_COMPILER, MERCURY_C_COMPILER, MERCURY_DEFAULT_GRADE,
# MERCURY_DEFAULT_OPT_LEVEL.
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
# Set the MACOSX_DEPLOYMENT_TARGET environment variable if needed.
@SET_MACOSX_DEPLOYMENT_TARGET@
case $# in
0) @MMC_INVOKE_CMD@ $MERCURY_COMPILER ;;
*) @MMC_INVOKE_CMD@ $MERCURY_COMPILER "$@" ;;
esac