Files
mercury/extras/exceptions/Mmakefile
Fergus Henderson 62da652a68 Add support for exception handling, in extras/exceptions.
Estimated hours taken: 80

Add support for exception handling, in extras/exceptions.

extras/exceptions/README:
	Describes the files in this directory.

extras/exceptions/exception.m:
	Contains the exception handling interface and implementation.

extras/exceptions/test_exceptions.m:
extras/exceptions/test_exceptions.exp:
extras/exceptions/test_uncaught_exception.m:
extras/exceptions/test_uncaught_exception.exp:
extras/exceptions/test_exceptions_func.m:
extras/exceptions/test_exceptions_func.exp:
	Test cases.

extras/exceptions/Mmakefile:
	The Mmakefile for building and running the test cases.
1998-07-22 14:32:02 +00:00

49 lines
1.3 KiB
Plaintext

#-----------------------------------------------------------------------------#
# Copyright (C) 1997-1998 The University of Melbourne.
# This file may only be copied under the terms of the GNU General
# Public Licence - see the file COPYING in the Mercury distribution.
#-----------------------------------------------------------------------------#
#
# These rules define the main targets: depend, all, check.
#
MAIN_TARGET = check
PROGS = test_exceptions.m test_uncaught_exception.m test_exceptions_func.m
depend: $(PROGS:.m=.depend)
all: $(PROGS:.m=)
check: $(PROGS:.m=.res)
#-----------------------------------------------------------------------------#
#
# the following lines are required for exception.m
# (see the comment at the top of exception.m)
#
RM_C=:
C2INITFLAGS=--extra-inits
$(PROGS:.m=_init.c): $(PROGS:.m=.c) exception.c
#-----------------------------------------------------------------------------#
#
# some rules for running test cases
#
%.out: %
./$< > $@
%.res: %.out %.exp
diff -c $*.out $*.exp > $@
clean:
rm -f *.out
realclean:
rm -f *.res
# test_uncaught_exception is *supposed* to return an error exit status
test_uncaught_exception.out: test_uncaught_exception
if ./$< > $@ 2>&1; then false; else true; fi
#-----------------------------------------------------------------------------#