#-----------------------------------------------------------------------------# main_target: check include ../Mmake.common RM_C=: #-----------------------------------------------------------------------------# # We suppress the printing of the banner, because different workspaces # may get different version numbers printed in it. This would otherwise be # the source of irrelevant difference between the actual and expected outputs. MDB = MERCURY_SUPPRESS_MDB_BANNER=yes mdb #-----------------------------------------------------------------------------# DEBUGGER_PROGS= \ browser_test \ debugger_regs \ existential_type_classes \ implied_instance \ interpreter \ mdb_command_test \ multi_parameter \ queens # The following tests are disabled, since currently they get some spurious # failures if readline support is enabled: # interactive MCFLAGS = --trace deep MLFLAGS = --trace C2INITFLAGS = --trace # We need to use shared libraries for interactive queries to work. # The following is necessary for shared libraries to work on Linux. MGNUCFLAGS-interactive = --pic-reg MLFLAGS-interactive = --shared # Base grades `jump' and `fast' cannot be used with # stack layouts (which are required for tracing). ifneq "$(findstring asm_,$(GRADE))" "" PROGS=$(DEBUGGER_PROGS) else ifneq "$(findstring jump,$(GRADE))" "" PROGS= else ifneq "$(findstring fast,$(GRADE))" "" PROGS= else PROGS=$(DEBUGGER_PROGS) endif endif endif #-----------------------------------------------------------------------------# browser_test.out: browser_test browser_test.inp $(MDB) ./browser_test < browser_test.inp > browser_test.out 2>&1 debugger_regs.out: debugger_regs debugger_regs.inp $(MDB) ./debugger_regs < debugger_regs.inp > debugger_regs.out 2>&1 existential_type_classes.out: existential_type_classes \ existential_type_classes.inp $(MDB) ./existential_type_classes < existential_type_classes.inp \ > existential_type_classes.out 2>&1 implied_instance.out: implied_instance implied_instance.inp $(MDB) ./implied_instance < implied_instance.inp \ > implied_instance.out 2>&1 interpreter.out: interpreter interpreter.inp $(MDB) ./interpreter interpreter.m < interpreter.inp \ > interpreter.out 2>&1 multi_parameter.out: multi_parameter multi_parameter.inp $(MDB) ./multi_parameter < multi_parameter.inp \ > multi_parameter.out 2>&1 queens.out: queens queens.inp $(MDB) ./queens < queens.inp > queens.out 2>&1 # Note that interactive.out.orig depends on $(interactive.ints) because # interactive.inp contains interactive queries that require interactive.ints # to have been built. interactive.out.orig: interactive interactive.inp $(interactive.ints) $(MDB) ./interactive < interactive.inp > interactive.out.orig 2>&1 # We pipe the output through sed to remove some spurious warnings that # `ld' issues. # XXX we should fix the spurious warnings about unresolved symbols. # (The spurious warnings about exception handling are due to a flaw # in the Digital Unix 3.2 linker, so that one is DEC's problem.) interactive.out: interactive.out.orig cat interactive.out.orig | \ sed \ -e '/\/usr\/bin\/ld:$$/N' \ -e 's/\/usr\/bin\/ld:.//' \ -e '/Warning: Linking some objects which contain exception information sections$$/N' \ -e 's/Warning: Linking some objects which contain exception information sections.//' \ -e '/ and some which do not. This may cause fatal runtime exception handling$$/N' \ -e 's/ and some which do not. This may cause fatal runtime exception handling.//' \ -e '/ problems (last obj encountered without exceptions was .*)\.$$/N' \ -e 's/ problems (last obj encountered without exceptions was .*)\..//' \ -e '/Warning: Unresolved:$$/N' \ -e 's/Warning: Unresolved:.//' \ -e '/$$/N' \ -e 's/.//' \ -e '/$$/N' \ -e 's/.//' \ -e '/__start$$/N' \ -e 's/__start.//' \ > queens.out # ignore egcs internal errors -- those are not our fault if grep 'gcc.*Internal compiler error' queens.out; then \ cp queens.exp queens.out; \ fi # We ignore the result of this action because # the exit status of grep is not useful in this case mdb_command_test.out: mdb_command_test mdb_command_test.inp -$(MDB) ./mdb_command_test < mdb_command_test.inp 2>&1 \ | egrep "internal error in the trace help system" \ > mdb_command_test.out #-----------------------------------------------------------------------------# DEPS= $(PROGS:%=$(deps_subdir)%.dep) DEPENDS= $(PROGS:%=%.depend) OUTS= $(PROGS:%=%.out) RESS= $(PROGS:%=%.res) dep_local: $(DEPS) depend_local: $(DEPENDS) check_local: $(OUTS) $(RESS) all_local: $(PROGS) #-----------------------------------------------------------------------------# SUBDIRS = declarative check_subdirs: for dir in $(SUBDIRS); do \ (cd $$dir && $(SUBDIR_MMAKE) check) || exit 1; \ done dep_subdirs: for dir in $(SUBDIRS); do \ (cd $$dir && $(SUBDIR_MMAKE) dep) || exit 1; \ done depend_subdirs: for dir in $(SUBDIRS); do \ (cd $$dir && $(SUBDIR_MMAKE) depend) || exit 1; \ done realclean_subdirs: for dir in $(SUBDIRS); do \ (cd $$dir && $(SUBDIR_MMAKE) realclean) || exit 1; \ done clean_subdirs: for dir in $(SUBDIRS); do \ (cd $$dir && $(SUBDIR_MMAKE) clean) || exit 1; \ done all_subdirs: for dir in $(SUBDIRS); do \ (cd $$dir && $(SUBDIR_MMAKE) all) || exit 1; \ done #-----------------------------------------------------------------------------#