Files
mercury/tests/analysis_table/Mmakefile
Zoltan Somogyi 1f45f91886 Make "mmake runtests" work again.
My commit afe2887882 broke the ability
to run the test suite outside of a bootcheck by executing "mmake runtests"
in the tests directory. This diff fixes that.

tests/Mmake.common:
    Don't define "TESTS_DIR = ..". While every single tests/*/Mmakefile
    defined it as such, I overlooked the fact that tests/Mmakefile itself
    defined it ".", referring to the same directory from a different starting
    point. Document this easily-overlooked fact.

    Rename the old runtests target, which after afe2887 runs the tests
    in a single directory, as runtests_dir, to leave the target name
    "runtests" itself free for tests/Mmakefile to use.

tests/Mmakefile:
    Define "TESTS_DIR = .", and add a target "runtests" which invokes
    "mmake runtests_dir" in each test directory.

tools/bootcheck:
    Invoke "mmake runtests_dir" instead of "mmake runtests" in each
    test directory.

    Initialize a variable just before it is used.

tests/*/Mmakefile:
    Add back the definition "TESTS_DIR = .."
2020-06-10 01:05:15 +10:00

34 lines
927 B
Makefile

#-----------------------------------------------------------------------------#
# vim: ts=8 sw=8 noexpandtab ft=make
#-----------------------------------------------------------------------------#
TESTS_DIR = ..
THIS_DIR = analysis_table
MAYBE_J1 =
# Delete options which are incompatible with --intermodule-analysis.
# These are currently set for nightly tests.
override EXTRA_MCFLAGS := $(patsubst --intermodule-opt%,,$(EXTRA_MCFLAGS))
override EXTRA_MCFLAGS := $(patsubst --transitive-%,,$(EXTRA_MCFLAGS))
#-----------------------------------------------------------------------------#
ifdef WORKSPACE_HAS_SUBDIRS
TESTS = table_m1-nodepend
else
TESTS =
endif
include ../Mmake.common
table_m1.runtest:
MC=$(MC) ./table_runtest.sh
realclean_local: realclean_analysis_table
realclean_analysis_table:
$(RM) table_m1.m
$(RM) -r Mercury
#-----------------------------------------------------------------------------#