#-----------------------------------------------------------------------------#

main_target: check

include ../Mmake.common

#-----------------------------------------------------------------------------#

ifeq ($(HAVE_NUPROLOG),yes)
%.exp: %.nu
	{ [ -f $*.inp ] && cat $*.inp; } | ./$< > $@ 2>&1;
endif

#-----------------------------------------------------------------------------#

PROGS=		array_test \
		commit_bug \
		commit_bug_2 \
		disj_disj \
		dnf \
		hello_again \
		interpreter \
		nasty_nondet \
		nondet_disj \
		nondet_ite \
		nondet_ite_3 \
		nondet_ite_4 \
		nondetlive \
		partition \
		semidet_lambda \
		\
		arithmetic \
		det_complicated_unify \
		determinism_inlining \
		double_error \
		double_error2 \
		duplicate_label \
		environment \
		fail_detism \
		float_test \
		frameopt_mkframe_bug \
		higher_order \
		liveness \
		liveness2 \
		mode_inf_bug \
		mu \
		parse_list \
		petdr1 \
		prune_switch \
		semidet_map \
		set_test \
		string__format_test \
		string_test \
		string_test_2 \
		univ \
		unreachable \
		nondet_ite_2

# space.m does not work, due to an unfixed bug in code generation.
NOT_WORKING =	space

# mode_inf_bug needs to be compiled with `--infer-all'.
MCFLAGS-mode_inf_bug = --infer-all

DEPENDS=$(PROGS:%=%.depend)
OUTS=	$(PROGS:%=%.out)
EXPS=	$(PROGS:%=%.exp)
RESS=	$(PROGS:%=%.res)
MODS=	$(PROGS:%=%.mod)

depend: $(DEPENDS)

exp:	$(EXPS)

check:	$(OUTS) $(RESS)

mods:	$(MODS)

all:	$(PROGS)

#-----------------------------------------------------------------------------#
