Files
mercury/tests/stm/Mmakefile
Zoltan Somogyi 9fd51ae7af Add --deep-std-name option to control deep prof file names.
When this new runtime option is specified, the runtime system will use
Deep.{data,procrep} as the names of the files it writes out.

runtime/mercury_engine.h:
    Add a flag to the engine that records whether this option has been
    specified or not.

runtime/mercury_wrapper.c:
    Set the flag if/when we see the --deep-std-name option.

runtime/mercury_deep_profiling.c:
    If the new flag is set, use Deep.{data,procrep} as filenames.

doc/user_guide.texi:
    Document the new option.

tools/bootcheck:
    Specify the new option for bootchecks.

tests/debugger/Mmakefile:
tests/declarative_debugger/Mmakefile:
tests/hard_coded/Mmakefile:
tests/par_conj/Mmakefile:
tests/stm/Mmakefile:
    When specifying a value of MERCURY_OPTIONS that overrides the value
    set by tools/bootcheck, include --deep-std-name in that value.
2024-10-13 19:47:06 +11:00

136 lines
3.0 KiB
Makefile

#-----------------------------------------------------------------------------#
# vim: ts=8 sw=8 noexpandtab ft=make
#-----------------------------------------------------------------------------#
TESTS_DIR = ..
THIS_DIR = stm
MAYBE_J1 = -j1
#-----------------------------------------------------------------------------#
# please keep these lists sorted
VALID_PROGS = \
basic \
basic2 \
exception_propogate \
nested \
nested_or_else \
atomic_or_else \
atomic_or_else2 \
atomic_conj \
atomic_ite \
atomic_mvar \
atomic_scope \
par-asm_test7 \
par-asm_test8 \
par-asm_test9 \
par_test10 \
par_test8 \
par_test9 \
stmqueuetext
INVALID_PROGS =
# These tests require parallel execution with multiple engines.
MULTI_PROGS = \
conflict
# These tests require debugging, which hasn't been implemented for
# the MLDS backend.
#
LLDS_PROGS =
ifeq "$(filter hl% java% csharp%,$(GRADE))" ""
PROGS0 = $(LLDS_PROGS)
else
PROGS0 =
endif
ifneq "$(findstring par,$(GRADE))" ""
VALID_PROGS := $(VALID_PROGS) $(MULTI_PROGS)
endif
#ifneq "$(findstring decldebug,$(GRADE))" ""
# OBJ_PROGS =
# PROGS =
#else
OBJ_PROGS =
PROGS = $(VALID_PROGS) $(INVALID_PROGS)
#endif
# `mmc --make' doesn't expect subdirectories to appear in targets.
ifeq ($(MMAKE_USE_MMC_MAKE),yes)
OS_SUBDIR =
else
OS_SUBDIR = $(os_subdir)
endif
TARGET_OBJ_EXT = $(O)
TARGET_OBJ_SUBDIR = $(OS_SUBDIR)
OBJS = $(OBJ_PROGS:%=$(TARGET_OBJ_SUBDIR)%.$(TARGET_OBJ_EXT))
#-----------------------------------------------------------------------------#
TESTS = $(sort $(PROGS))
include ../Mmake.common
# Module-specific options should go in Mercury.options so they
# can be found by `mmc --make'.
include Mercury.options
$(VALID_PROGS:%=%.runtest): %.runtest: %.res ;
$(INVALID_PROGS:%=%.runtest): %.runtest: %.err_res ;
$(OBJ_PROGS:%=%.runtest): %.runtest: %.$(TARGET_OBJ_EXT) ;
ifneq ($(MMAKE_USE_MMC_MAKE),yes)
$(PROGS:%=%.err): %.err: %.m
if $(MC) --errorcheck-only $(ALL_GRADEFLAGS) $(ALL_MCFLAGS) $* \
> $*.err 2>&1; \
then false; \
else true; \
fi
else
% XXX: with `mmake --use-mmc-make' the ".DEFAULT:" rule seems to take
% precedence over "%.err: %.m" rules.
% XXX: the reason we run the $(MCM) command twice is to avoid
% doubled up error messages, once while making interface files,
% then the module proper. The second time the command is run
% only one set of error messages should appear.
$(PROGS:%=%.err):
-$(MCM) $@
if $(MCM) -r $@ > /dev/null 2>&1; \
then false; \
else true; \
fi
endif
# Exercise multiple Mercury engines in lowlevel grades.
ENGINES :=
ifeq "$(filter hl% java% csharp%,$(GRADE))" ""
ENGINES := MERCURY_OPTIONS="-P8 --deep-std-name"
endif
%.out: %
{ [ -f $*.inp ] && cat $*.inp; } | $(ENGINES) ./$< > $@ 2>&1 || \
{ grep . $@ /dev/null; exit 1; }
#-----------------------------------------------------------------------------#
printtests:
@echo $(PROGS)
printobjs:
@echo $(OBJS)
clean_local: clean_stm
clean_stm:
rm -f *.err *.h
#-----------------------------------------------------------------------------#