mirror of
https://github.com/Mercury-Language/mercury.git
synced 2025-12-17 14:57:03 +00:00
Estimated hours taken: 1 Add support for a new `GRADEFLAGS' variable to Mmake, so that you can use the more readable (and more portable) `GRADEFLAGS = --profiling' rather than e.g. `GRADEFLAGS = asm_fast.gc.prof'. scripts/Mmake.vars.in: Add GRADEFLAGS variable, defaulting to `--grade $(GRADE)'. scripts/Mmake.rules: Change various rules to use `$(GRADEFLAGS)' instead of `--grade $(GRADE)'. compiler/modules.m: Change various rules in the generated `.dep' files to use `$(GRADEFLAGS)' instead of `--grade $(GRADE)'. doc/user_guide.texi: Modify the documentation to reflect the above changes.
103 lines
3.2 KiB
Plaintext
103 lines
3.2 KiB
Plaintext
#-----------------------------------------------------------------------------#
|
|
#-----------------------------------------------------------------------------#
|
|
# Copyright (C) 1996-1997 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)
|
|
|
|
MC = mmc
|
|
MCS = $(MC) --split-c-files --compile-only
|
|
MCG = $(MC) --compile-to-c
|
|
MCD = $(MC) --generate-dependencies
|
|
MCI = $(MC) --make-interface
|
|
MCSI = $(MC) --make-short-interface
|
|
MCOI = $(MC) --make-optimization-interface
|
|
MCFLAGS = $(EXTRA_MCFLAGS)
|
|
MCIFLAGS = $(MCFLAGS)
|
|
MCSIFLAGS = $(MCFLAGS)
|
|
MCOIFLAGS = $(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)
|
|
MGNUC = mgnuc
|
|
MGNUCFLAGS = $(EXTRA_MGNUCFLAGS) $(EXTRA_CFLAGS)
|
|
ML = ml
|
|
MLFLAGS = $(EXTRA_MLFLAGS)
|
|
MNC = mnc
|
|
MNCFLAGS = $(EXTRA_MNCFLAGS)
|
|
MNL = mnl
|
|
MNLFLAGS = $(EXTRA_MNLFLAGS)
|
|
MNP = mnp
|
|
MNPFLAGS = $(EXTRA_MNPFLAGS)
|
|
MSC = msc
|
|
MSCFLAGS = $(EXTRA_MSCFLAGS)
|
|
MSL = msl
|
|
MSLFLAGS = $(EXTRA_MSLFLAGS)
|
|
MSP = msp
|
|
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
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
# This needs to go here so that user Mmake files can add new suffixes.
|
|
|
|
.SUFFIXES: # reset sufix list to be empty
|
|
|
|
#-----------------------------------------------------------------------------#
|
|
|
|
default_target: main_target
|
|
|
|
#-----------------------------------------------------------------------------#
|