mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-19 19:33:46 +00:00
tests/warnings/Mmakefile:
tests/warnings/format_call_multi.{m,exp}:
tests/warnings/m12.m:
As above.
162 lines
4.2 KiB
Makefile
162 lines
4.2 KiB
Makefile
#-----------------------------------------------------------------------------#
|
|
# vim: ts=8 sw=8 noexpandtab ft=make
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
TESTS_DIR = ..
|
|
THIS_DIR = warnings
|
|
MAYBE_J1 =
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
COMPILE_PROGS = \
|
|
arg_order_rearrangment \
|
|
foreign_term_invalid \
|
|
non_term_user_special \
|
|
pragma_term_conflict \
|
|
term_indirect_warning \
|
|
subtype_order \
|
|
warn_dead_procs \
|
|
warn_dead_procs_trace
|
|
|
|
ERRORCHECK_PROGS = \
|
|
abstract_type_decl \
|
|
ambiguous_overloading \
|
|
bug311 \
|
|
bug412 \
|
|
bug477 \
|
|
det_infer_warning \
|
|
disabled_warning \
|
|
double_underscore \
|
|
duplicate_call \
|
|
duplicate_const \
|
|
empty_interface \
|
|
foreign_singleton \
|
|
format_call_multi \
|
|
format_call_warning \
|
|
gh85 \
|
|
inconsistent_pred_order \
|
|
inf_recursion_lambda \
|
|
inference_test \
|
|
infinite_recursion \
|
|
inst_with_no_type \
|
|
missing_if \
|
|
non_contiguous_decls \
|
|
non_stratification \
|
|
obsolete_proc_pragma \
|
|
occurs \
|
|
pragma_source_file \
|
|
purity_warnings \
|
|
save \
|
|
simple_code \
|
|
singleton_test \
|
|
singleton_test_state_var \
|
|
spurious_obsolete \
|
|
state_vars_test \
|
|
suspicious_foreign_code \
|
|
suspicious_recursion \
|
|
table_with_inline \
|
|
unify_f_g \
|
|
unify_x_f_x \
|
|
unknown_warning \
|
|
unneeded_mode_specific_clause \
|
|
unsigned_zero_cmp \
|
|
unused_args_test \
|
|
unused_import \
|
|
unused_interface_import \
|
|
warn_contiguous_foreign \
|
|
warn_non_contiguous \
|
|
warn_non_contiguous_foreign \
|
|
warn_non_contiguous_foreign_group \
|
|
warn_return \
|
|
warn_self_import \
|
|
warn_stubs \
|
|
warn_succ_ind
|
|
|
|
# We don't yet pass (or even have a .exp file for) these tests.
|
|
# missing_singleton_warning
|
|
# trace_goal_dupl_defn
|
|
|
|
# We do not pass these two tests, which were intended to test the shadowing
|
|
# of standard library modules. Ironically, the reason why we compare the
|
|
# actual .err files of these test cases with their .exp files is that
|
|
# mmake finds what it thinks are *their* .err files in the stage2/library
|
|
# directory, and thus does not actually compile them. This leaves no .err
|
|
# file in *this* directory for the %.res_error rule to compare against
|
|
# the .exp file.
|
|
#
|
|
# profiling_builtin
|
|
# time
|
|
|
|
ifeq ($(MMAKE_USE_MMC_MAKE),yes)
|
|
ERRORCHECK_PROGS += unused_args_analysis
|
|
endif
|
|
|
|
PROGS = $(COMPILE_PROGS) $(ERRORCHECK_PROGS) up_to_date
|
|
|
|
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
|
|
|
|
# With `mmc --make', the errors should only go to the
|
|
# `.err' files, not stderr.
|
|
MCFLAGS += --output-compile-error-lines 0
|
|
|
|
MCFLAGS += --infer-all
|
|
|
|
$(COMPILE_PROGS:%=%.runtest): %.runtest: %.res_compile ;
|
|
|
|
$(ERRORCHECK_PROGS:%=%.runtest): %.runtest: %.res_error ;
|
|
|
|
# Build the `.analysis' file for unused_args_analysis2
|
|
# before building unused_args_analysis.c.
|
|
unused_args_analysis.c: unused_args_analysis2.c
|
|
unused_args_analysis.err: unused_args_analysis.c
|
|
|
|
# Check that `mmc --make up_to_date.m' generates a warning.
|
|
up_to_date.runtest:
|
|
$(MCM) up_to_date.m > up_to_date.err_make 2>&1
|
|
diff $(DIFF_OPTS) up_to_date.exp up_to_date.err_make \
|
|
> up_to_date.res_make || \
|
|
{ cat up_to_date.err_make; cat up_to_date.res_make; exit 1; }
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
%.res_error: %.exp %.err
|
|
-rm -f $@
|
|
diff $(DIFF_OPTS) $*.exp $*.err > $@ || \
|
|
{ [ -f $*.exp2 ] && \
|
|
diff $(DIFF_OPTS) $*.exp2 $*.err > $@; } || \
|
|
{ [ -f $*.exp3 ] && \
|
|
diff $(DIFF_OPTS) $*.exp3 $*.err > $@; } || \
|
|
{ [ -f $*.exp4 ] && \
|
|
diff $(DIFF_OPTS) $*.exp4 $*.err > $@; } || \
|
|
{ cat $*.err; cat $@; exit 1; }
|
|
|
|
%.res_compile: %.exp %.c
|
|
-rm -f $@
|
|
diff $(DIFF_OPTS) $*.exp $*.err > $@ || \
|
|
{ [ -f $*.exp2 ] && \
|
|
diff $(DIFF_OPTS) $*.exp2 $*.err > $@; } || \
|
|
{ [ -f $*.exp3 ] && \
|
|
diff $(DIFF_OPTS) $*.exp3 $*.err > $@; } || \
|
|
{ [ -f $*.exp4 ] && \
|
|
diff $(DIFF_OPTS) $*.exp4 $*.err > $@; } || \
|
|
{ cat $*.err; cat $@; exit 1; }
|
|
|
|
ifeq ($(MMAKE_USE_MMC_MAKE),yes)
|
|
%.c: %.m
|
|
$(MCM) $@ 2>&1 | grep -v "^Making" > $*.err
|
|
endif
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
clean_local: clean_err clean_res
|
|
|
|
clean_err:
|
|
rm -f *.err up_to_date.err_make
|
|
|
|
#-----------------------------------------------------------------------------#
|