Files
mercury/scripts/final_grade_options.sh-subr
Julien Fischer 9602919bbe Added new compiler options to support the Java backend and
Estimated hours taken: 4

Added new compiler options to support the Java backend and
updated documentation to reflect this.

compiler/globals.m:
	Removed comment about Java backend not being implemented.
	Replaced it by one say that it is work in progress.

compiler/mercury_compile.m:
	If Target = java then call the Java backend.

compiler/options.m:
	Added new options for compiling Java files:
	`--java'
	`--java-only'
	`--java-compiler' ('--javac')
	`--java-flags'
	`--java-classpath'
	`--java-object-file-extension'

compiler/handle_options.m:
	If compiling to Java then don't link.
	Added "java" grade.

compiler/mlds_to_java.m
	New file.
	XXX Currently just prints an error message about
	    the Java backend not being implemented.

doc/user_guide.texi:
	Documented new options for compiling Java files.

scripts/init_grade_options.sh-subr:
scripts/parse_grade_options.sh-subr:
scripts/final_grade_options.sh-subr:
	Added support for "java" grade.
2001-01-29 01:55:08 +00:00

59 lines
1.7 KiB
Plaintext

#---------------------------------------------------------------------------#
# Copyright (C) 1998-2001 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.
#---------------------------------------------------------------------------#
#
# final_grade_options.sh-subr:
# An `sh' subroutine for handling implications between grade-related
# options. Used by the `ml', `mgnuc' and `c2init' scripts.
#
# The code here should be inserted after a script's option-parsing
# loop.
#
# IMPORTANT: any changes to the handling of grades here may also require
# changes to compiler/handle_options.m.
#
# This file should only use the shell variables initialized by
# init_grade_options.sh-subr.
#
#---------------------------------------------------------------------------#
#
# .tr grade is not compatible with .mm
# (see comment in runtime/mercury_tabling.c for rationale)
#
case $use_trail,$use_minimal_model in
true,true)
echo "trailing and minimal model tabling are not compatible" 1>&2
exit 1 ;;
esac
#
# .debug grade implies --use-trail in the absence of .mm
# (see comment in compiler/handle_options.m for rationale)
#
case $stack_trace,$require_tracing,$use_minimal_model in
true,true,false)
use_trail=true ;;
esac
#
# --target asm, IL or Java implies --high-level-code
#
case $target in asm|il|java)
highlevel_code=true ;;
esac
#
# --high-level-code disables the use of low-level gcc extensions
#
case $highlevel_code in true)
non_local_gotos=false
asm_labels=false
global_regs=false
;;
esac
#---------------------------------------------------------------------------#