Files
mercury/tests/Mmake.common
Fergus Henderson 3f3c542d3d Add $(GRADEFLAGS-$@) as well as $(GRADEFLAGS-$*) to GRADEFLAGS.
Estimated hours taken: 0.25

tests/Mmake.common:
	Add $(GRADEFLAGS-$@) as well as $(GRADEFLAGS-$*) to GRADEFLAGS.
	When doing the final link step, $@ is set but $* is not,
	so this change is necessary for the setting of `GRADEFLAGS-foo'
	to get passed to `ml' when linking `foo'.
	Also add some comments.
1998-01-15 02:05:51 +00:00

51 lines
1.2 KiB
Plaintext

#-----------------------------------------------------------------------------#
#
# You can override MCFLAGS for a particular file by setting MCFLAGS-foo.
# You can override GRADEFLAGS for a particular file by setting both
# GRADEFLAGS-foo and (for compiling the foo_init.c file) GRADEFLAGS-foo_init.
#
GRADEFLAGS = --grade $(GRADE) $(GRADEFLAGS-$*) $(GRADEFLAGS-$@) \
$(EXTRA_GRADEFLAGS)
MCFLAGS = $(MCFLAGS-$*) $(EXTRA_MCFLAGS)
MGNUCFLAGS = -g $(EXTRA_MGNUCFLAGS) $(EXTRA_CFLAGS)
MLFLAGS = $(MLFLAGS-$@) $(EXTRA_MLFLAGS)
# override this with `mmake HAVE_NUPROLOG=yes'
# if you want to rebuild the `.exp' files.
HAVE_NUPROLOG=no
#-----------------------------------------------------------------------------#
# .PRECIOUS: %.mod %.c %.o %_init.c %.no %.nu %_init.nl %_init.no
%_init.c: Entry
%.out: %
{ [ -f $*.inp ] && cat $*.inp; } | ./$< > $@ 2>&1;
%.res: %.exp %.out
-rm -f $@
diff -c $*.exp $*.out > $@
#-----------------------------------------------------------------------------#
clean: clean_out clean_res
clean_mc: clean_c clean_o clean_out clean_res
clean_out:
rm -f *.out
clean_exp:
rm -f *.exp
clean_res:
rm -f *.res
#-----------------------------------------------------------------------------#
test:
@echo $(HAVE_NUPROLOG)