If $(EXT_FOR_EXE) is not empty, add a phony target

Estimated hours taken: 0.5
Branches: main

If $(EXT_FOR_EXE) is not empty, add a phony target
`main_module' which depends on `main_module'$(EXT_FOR_EXE)
With this change, the command used to build an executable
is consistent across platforms.

compiler/make.m:
	Assume that a target on the command line which doesn't match
	any other file type is an executable, even if $(EXT_FOR_EXE)
	is not empty.

compiler/modules.m:
	Add the rule.

scripts/Mmake.vars.in:
	Add the name of each of the $(MERCURY_MAIN_MODULES) to
	the list of targets which should be made by `mmc --make'
	if mmake was invoked wih `--use-mmc-make'.
This commit is contained in:
Simon Taylor
2003-01-28 14:52:00 +00:00
parent 734d112008
commit d4ac368915
3 changed files with 20 additions and 28 deletions

View File

@@ -74,7 +74,8 @@ MERCURY_MAIN_MODULES =
# Files which should be built using `mmc --make' rather than `make'
# when `--use-mmc-make' is passed on the mmake command line.
#
ALL_MC_BUILD_FILES = $(MERCURY_MAIN_MODULES:%=%$(EXT_FOR_EXE)) \
ALL_MC_BUILD_FILES = $(MERCURY_MAIN_MODULES) \
$(MERCURY_MAIN_MODULES:%=%$(EXT_FOR_EXE)) \
$(MERCURY_MAIN_MODULES:%=lib%.$A) \
$(MERCURY_MAIN_MODULES:%=lib%.so) \
$(MERCURY_MAIN_MODULES:%=%.clean) \