mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 18:03:36 +00:00
Estimated hours taken: 1 Fix some Mmakefile errors that were diagnosed by `--warn-undefined-variables'. Also, make a small fix to mmake.in and add empty definitions for various Mmake variables to avoid spurious warnings. scripts/mmake.in: Add ` dep*' to the patterns for which we do not pass `--warn-undefined-variables'; previously it matched "$@" against `dep*', which did not catch the case of `mmake -k depend'. ^^^ scripts/Mmake.vars.in: Add definition for `ds_subdir'. Define `MLLIBS' as `$(EXTRA_MLLIBS)' rather than empty, and add empty definition for `EXTRA_MLLIBS'. Add empty definition for `MAIN_TARGET'. Mmakefile: Fix misspelling: `deps_subdir' not `dep_subdir'. Add empty definitions for `PREINSTALL_HACK', `POSTINSTALL_HACK', and `MMAKEFLAGS'. boehm_gc/Mmakefile: Add empty definition for `PROF'. runtime/Mmakefile: Add empty definition for `DLL_CFLAGS'. library/Mmakefile: Add empty definition for `CHECK_TERM_OPTS'. compiler/Mmakefile: Add empty definition for `MTAGSFLAGS'.
183 lines
4.8 KiB
Plaintext
183 lines
4.8 KiB
Plaintext
#-----------------------------------------------------------------------------#
|
|
# Copyright (C) 1996-1998 The University of Melbourne.
|
|
# This file may only be copied under the terms of the GNU General
|
|
# Public License - see the file COPYING in the Mercury distribution.
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
# Mmake.vars - variables for building Mercury programs
|
|
|
|
# This file gives the default values for certain variables.
|
|
# The values here can be overridden by individual Mmake files.
|
|
|
|
# Ensure that commands use /bin/sh not the user's shell
|
|
SHELL = /bin/sh
|
|
|
|
# Set the directory search path.
|
|
# (See the GNU Make manual for documentation about VPATH and GPATH.)
|
|
MMAKE_VPATH = $(MERCURY_INT_DIR)
|
|
VPATH = $(MMAKE_VPATH) # do not remove the `:' from this comment!!!
|
|
# the above comment works around a misfeature of
|
|
# autoconf which causes it to delete assignments to
|
|
# VPATH unless they contain a `:'
|
|
GPATH = $(VPATH)
|
|
|
|
DEFAULT_GRADE = $(MERCURY_DEFAULT_GRADE)
|
|
GRADE = $(DEFAULT_GRADE)
|
|
|
|
GRADEFLAGS = --grade $(GRADE) $(EXTRA_GRADEFLAGS)
|
|
EXTRA_GRADEFLAGS =
|
|
|
|
MC = mmc
|
|
MCS = $(MC) --split-c-files --compile-only
|
|
MCG = $(MC) --compile-to-c
|
|
MCD = $(MC) --generate-dependencies
|
|
MCI = $(MC) --make-interface
|
|
MCPI = $(MC) --make-private-interface
|
|
MCSI = $(MC) --make-short-interface
|
|
MCOI = $(MC) --make-optimization-interface
|
|
MCTOI = $(MC) --make-transitive-optimization-interface
|
|
MCFLAGS = $(EXTRA_MCFLAGS)
|
|
EXTRA_MCFLAGS =
|
|
MCIFLAGS = $(MCFLAGS)
|
|
MCPIFLAGS = $(MCFLAGS)
|
|
MCSIFLAGS = $(MCFLAGS)
|
|
MCOIFLAGS = $(MCFLAGS)
|
|
MCTOIFLAGS = $(MCFLAGS)
|
|
MCDFLAGS = $(MCFLAGS)
|
|
MCGFLAGS = $(MCFLAGS)
|
|
MCSFLAGS = $(MCFLAGS)
|
|
|
|
#
|
|
# The following variables hold the names of various programs and
|
|
# the options which should be passed to them.
|
|
#
|
|
C2INIT = c2init
|
|
C2INITFLAGS = $(EXTRA_C2INITFLAGS)
|
|
EXTRA_C2INITFLAGS =
|
|
MGNUC = mgnuc
|
|
MGNUCFLAGS = $(EXTRA_MGNUCFLAGS) $(EXTRA_CFLAGS)
|
|
EXTRA_MGNUCFLAGS =
|
|
EXTRA_CFLAGS =
|
|
ML = ml
|
|
MLFLAGS = $(EXTRA_MLFLAGS)
|
|
EXTRA_MLFLAGS =
|
|
MLOBJS =
|
|
MLPICOBJS = $(MLOBJS:.o=.$(EXT_FOR_PIC_OBJECTS))
|
|
MLLIBS = $(EXTRA_MLLIBS)
|
|
EXTRA_MLLIBS =
|
|
MNC = mnc
|
|
MNCFLAGS = $(EXTRA_MNCFLAGS)
|
|
EXTRA_MNCFLAGS =
|
|
MNL = mnl
|
|
MNLFLAGS = $(EXTRA_MNLFLAGS)
|
|
EXTRA_MNLFLAGS =
|
|
MNP = mnp
|
|
MNPFLAGS = $(EXTRA_MNPFLAGS)
|
|
EXTRA_MNPFLAGS =
|
|
MSC = msc
|
|
MSCFLAGS = $(EXTRA_MSCFLAGS)
|
|
EXTRA_MSCFLAGS =
|
|
MSL = msl
|
|
MSLFLAGS = $(EXTRA_MSLFLAGS)
|
|
EXTRA_MSLFLAGS =
|
|
MSP = msp
|
|
MSPFLAGS = $(EXTRA_MSPFLAGS)
|
|
EXTRA_MSPFLAGS =
|
|
|
|
AR = ar
|
|
ARFLAGS = cr
|
|
RANLIB = @RANLIB@
|
|
RANLIBFLAGS =
|
|
|
|
# $(CFLAGS_FOR_PIC) is passed to the C compiler when creating `.pic_o' files
|
|
# (We use `.pic_o' as the extension for `.o' files that must have
|
|
# position-independent code.)
|
|
CFLAGS_FOR_PIC = @CFLAGS_FOR_PIC@
|
|
|
|
# $(EXT_FOR_PIC_OBJECTS) will be either `.o', if $(CFLAGS_FOR_PIC) is empty,
|
|
# or `.pic_o', if special flags are required for compiling files that
|
|
# will be put in shared libraries.
|
|
EXT_FOR_PIC_OBJECTS = @EXT_FOR_PIC_OBJECTS@
|
|
|
|
# $(EXT_FOR_SHARED_LIB) will be the extension for shared libraries,
|
|
# if the system supports them (e.g. `.so'), or the extension used
|
|
# for non-shared libraries (e.g. `.a') if the system doesn't support
|
|
# shared libraries.
|
|
EXT_FOR_SHARED_LIB = @EXT_FOR_SHARED_LIB@
|
|
|
|
# Set `RM_C' to `:' if you want to keep the intermediate `.c' files.
|
|
RM_C = rm
|
|
|
|
# lists of targets that depend on $(MLOBJS) and $(MLPICOBJS)
|
|
MLOBJS_DEPS =
|
|
MLPICOBJS_DEPS =
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
#
|
|
# The following variables specify the names of the subdirectories used,
|
|
# so that you can write code which works both with and without the
|
|
# `--use-subdirs' option.
|
|
#
|
|
|
|
ifeq ($(MMAKE_USE_SUBDIRS),yes)
|
|
|
|
SUBDIR=Mercury/
|
|
|
|
nos_subdir=$(SUBDIR)nos/
|
|
qls_subdir=$(SUBDIR)qls/
|
|
deps_subdir=$(SUBDIR)deps/
|
|
ds_subdir=$(SUBDIR)ds/
|
|
int0s_subdir=$(SUBDIR)int0s/
|
|
ints_subdir=$(SUBDIR)ints/
|
|
int2s_subdir=$(SUBDIR)int2s/
|
|
int3s_subdir=$(SUBDIR)int3s/
|
|
opts_subdir=$(SUBDIR)opts/
|
|
trans_opts_subdir=$(SUBDIR)trans_opts/
|
|
date0s_subdir=$(SUBDIR)date0s/
|
|
dates_subdir=$(SUBDIR)dates/
|
|
date3s_subdir=$(SUBDIR)date3s/
|
|
optdates_subdir=$(SUBDIR)optdates/
|
|
trans_opt_dates_subdir=$(SUBDIR)trans_opt_dates/
|
|
cs_subdir=$(SUBDIR)cs/
|
|
os_subdir=$(SUBDIR)os/
|
|
dirs_subdir=$(SUBDIR)dirs/
|
|
|
|
else
|
|
|
|
SUBDIR=
|
|
|
|
nos_subdir=
|
|
qls_subdir=
|
|
deps_subdir=
|
|
ds_subdir=
|
|
int0s_subdir=
|
|
ints_subdir=
|
|
int2s_subdir=
|
|
int3s_subdir=
|
|
opts_subdir=
|
|
trans_opts_subdir=
|
|
date0s_subdir=
|
|
dates_subdir=
|
|
date3s_subdir=
|
|
optdates_subdir=
|
|
trans_opt_dates_subdir=
|
|
cs_subdir=
|
|
os_subdir=
|
|
dirs_subdir=
|
|
|
|
endif
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
# This needs to go here so that user Mmake files can add new suffixes.
|
|
|
|
.SUFFIXES: # reset sufix list to be empty
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
MAIN_TARGET =
|
|
|
|
default_target: main_target
|
|
|
|
#-----------------------------------------------------------------------------#
|