Files
mercury/tests/term/Mmakefile
Fergus Henderson 7ebc79e927 Fix some problems with the `--use-subdirs' option.
Estimated hours taken: 6

Fix some problems with the `--use-subdirs' option.
The compiler itself now compiles and bootstraps fine with --use-subdirs.

compiler/modules.m:
	Put `.h' files in the source directory, rather than
	in the `Mercury/hs' subdirectory.

compiler/mercury_compile.m:
scripts/Mmake.rules:
	If `--use-subdirs' is enabled, pass `-I.' to the C compiler,
	so that #include statements work relative to the source directory
	rather than relative to the `Mercury/cs' subdirectory.

scripts/Mmake.vars.in:
	Define $(cs_subdir), $(os_subdir) etc. variables;
	these are set to the directory to use for .c, .o, etc. files,
	(including the trailing `/'), or to the empty string,
	if --use-subdirs is not set.

scripts/Mmake.rules:
	Use $(cs_subdir), $(os_subdir) etc. to avoid the code
	duplication created by my previous change to handle
	--use-subdirs.
	Also add lots of comments, and reorder the code
	in a more logical order.

Mmakefile:
library/Mmakefile:
compiler/Mmakefile:
profiler/Mmakefile:
tests/term/Mmakefile:
tests/valid/Mmakefile:
	Use $(cs_subdir), $(os_subdir) etc. to fix a few hard-coded
	file-names (e.g. *.dep, *_init.[co], tree234.o) that were
	used in some of the rules.

library/Mmakefile:
	Add `rm -f tags' to the rule for `mmake realclean'.

tools/bootcheck:
	Add `--use-subdirs' option (defaults to setting of the
	MMAKE_USE_SUBDIRS environment variable).
	Change the code which compares the stage2 & stage3 C files
	to use the appropriate location for them based on the
	setting of this option.
1998-03-20 02:58:33 +00:00

89 lines
1.6 KiB
Plaintext

#-----------------------------------------------------------------------------#
main_target: check
include ../Mmake.common
#-----------------------------------------------------------------------------#
PROGS= \
ack \
append \
arit_exp \
associative \
dds1_2 \
dds3_13 \
dds3_14 \
dds3_15 \
dds3_17 \
dds3_8 \
fold \
my_list \
lte \
my_map \
member \
mergesort \
mergesort_ap \
mergesort_t \
mmatrix \
money \
naive_rev \
occur \
ordered \
overlap \
permutation \
pl1_1 \
pl1_2 \
pl2_3_1 \
pl3_1_1 \
pl3_5_6 \
pl3_5_6a \
pl4_01 \
pl4_4_3 \
pl4_4_6a \
pl4_5_2 \
pl4_5_3a \
pl5_2_2 \
pl6_1_1 \
pl7_2_9 \
pl7_6_2a \
pl7_6_2b \
pl7_6_2c \
pl8_2_1 \
pl8_2_1a \
pl8_3_1 \
pl8_3_1a \
pl8_4_1 \
pl8_4_2 \
queens \
quicksort \
select \
subset \
sum \
vangelder
DEPENDS = $(PROGS:%=%.depend)
TRANS_OPTS = $(PROGS:%=$(trans_opts_subdir)%.trans_opt)
TRANS_OPT_RESS = $(PROGS:%=%.trans_opt_res)
#-----------------------------------------------------------------------------#
MCTRANSOPTFLAGS = --enable-termination --term-single-arg 5 --term-norm simple
$(trans_opts_subdir)%.trans_opt: %.m
$(MC) $(MCFLAGS) --make-trans-opt $(MCTRANSOPTFLAGS) $< \
> $*.trans_opt_err 2>&1
%.trans_opt_res: %.trans_opt_exp $(trans_opts_subdir)%.trans_opt
diff -c $*.trans_opt_exp $(trans_opts_subdir)$*.trans_opt > $@
#-----------------------------------------------------------------------------#
depend: $(DEPENDS)
trans_opts: $(TRANS_OPTS)
check: $(TRANS_OPT_RESS)
#-----------------------------------------------------------------------------#