for review: fix undefined variable warnings
Fergus Henderson
fjh at cs.mu.OZ.AU
Wed Jul 29 14:40:58 AEST 1998
Hi,
Anyone care to review this one?
--------------------
Add Mmake support for target-specific MCFLAGS flags (MCFLAGS-foo, etc.)
using some tricky GNU Make hackery that avoids warning about undefined
variables.
Also define ALL_MCFLAGS = $(MCFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCFLAGS)
and use $(ALL_MCFLAGS) instead of $(MCFLAGS). This allows user Mmakefiles
to override MCFLAGS without suppressing the use of the TARGET_MCFLAGS
and EXTRA_MCFLAGS.
Similarly for the other *FLAGS variables.
scripts/Mmake.vars.in:
Define ALL_*FLAGS and TARGET_*FLAGS.
scripts/Mmake.rules:
Use ALL_*FLAGS instead of *FLAGS.
scripts/mmake.in:
Re-enable the warnings about undefined variables,
since we won't get too many spurious warnings now.
Mmake.common.in:
Delete `$(MCFLAGS-$*)' from the definition of `MCFLAGS', since this
is now done automatically by Mmake.
tests/Mmake.common:
Delete the definitions of MCFLAGS and GRADEFLAGS, since this stuff
is now done automatically by Mmake.
Index: Mmake.common.in
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmake.common.in,v
retrieving revision 1.27
diff -u -r1.27 Mmake.common.in
--- Mmake.common.in 1998/07/25 12:07:03 1.27
+++ Mmake.common.in 1998/07/29 01:20:53
@@ -169,7 +169,7 @@
UTIL_DIR = $(MERCURY_DIR)/util
# Options to pass to the Mercury compiler
-MCFLAGS = --no-infer-all --halt-at-warn $(MCFLAGS-$*) $(EXTRA_MCFLAGS)
+MCFLAGS = --no-infer-all --halt-at-warn
# Do we want to deal with intermodule information when building the library?
# By default yes, since this way we note immediately when intermodule
Index: scripts/Mmake.rules
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.rules,v
retrieving revision 1.63
diff -u -r1.63 Mmake.rules
--- Mmake.rules 1998/06/12 16:35:01 1.63
+++ Mmake.rules 1998/07/29 01:10:36
@@ -57,16 +57,16 @@
sicstus_conv $<
$(nos_subdir)%.no : %.m
- $(MNC) $(MNCFLAGS) -o $@ $<
+ $(MNC) $(ALL_MNCFLAGS) -o $@ $<
$(nos_subdir)%.no : %.nl
- $(MNC) $(MNCFLAGS) -o $@ $<
+ $(MNC) $(ALL_MNCFLAGS) -o $@ $<
$(qls_subdir)%.ql : %.m
- $(MSC) $(MSCFLAGS) -o $@ $<
+ $(MSC) $(ALL_MSCFLAGS) -o $@ $<
$(qls_subdir)%.ql : %.nl
- $(MSC) $(MSCFLAGS) -o $@ $<
+ $(MSC) $(ALL_MSCFLAGS) -o $@ $<
#-----------------------------------------------------------------------------#
#
@@ -82,7 +82,7 @@
# beware the code for `%.depend' and `%.dep' is duplicated
$(deps_subdir)%.dep:
- $(MCD) $(MCDFLAGS) $*
+ $(MCD) $(ALL_MCDFLAGS) $*
ifeq ($(MMAKE_USE_SUBDIRS),yes)
# the following mkdirs work around a bug in GNU Make
-[ -d Mercury/dates ] || mkdir Mercury/dates
@@ -94,7 +94,7 @@
# beware the code for `%.depend' and `%.dep' is duplicated
.PHONY: %.depend
%.depend :
- $(MCD) $(MCDFLAGS) $*
+ $(MCD) $(ALL_MCDFLAGS) $*
ifeq ($(MMAKE_USE_SUBDIRS),yes)
# the following mkdirs work around a bug in GNU Make
-[ -d Mercury/dates ] || mkdir Mercury/dates
@@ -121,19 +121,19 @@
#
$(date0s_subdir)%.date0 : %.m
- $(MCPI) $(MCPIFLAGS) $<
+ $(MCPI) $(ALL_MCPIFLAGS) $<
$(dates_subdir)%.date : %.m
- $(MCI) $(MCIFLAGS) $<
+ $(MCI) $(ALL_MCIFLAGS) $<
$(date3s_subdir)%.date3 : %.m
- $(MCSI) $(MCSIFLAGS) $<
+ $(MCSI) $(ALL_MCSIFLAGS) $<
$(optdates_subdir)%.optdate : %.m
- $(MCOI) $(MCOIFLAGS) $<
+ $(MCOI) $(ALL_MCOIFLAGS) $<
$(trans_opt_dates_subdir)%.trans_opt_date : %.m
- $(MCTOI) $(MCTOIFLAGS) $<
+ $(MCTOI) $(ALL_MCTOIFLAGS) $<
# Be very careful about changing the following rules.
# The `@:' is a silent do-nothing command.
@@ -168,7 +168,7 @@
$(cs_subdir)%.c : %.m
rm -f $(cs_subdir)$*.c
- $(MCG) $(GRADEFLAGS) $(MCGFLAGS) $< > $*.err 2>&1
+ $(MCG) $(ALL_GRADEFLAGS) $(ALL_MCGFLAGS) $< > $*.err 2>&1
# If we are removing the .c files, we need to tell Make that we're
# generating the .o files directly from the .m files, but
@@ -179,13 +179,15 @@
ifneq ($(RM_C),:)
$(os_subdir)%.o : %.m
- $(MMAKE_MAKE_CMD) $(MFLAGS) GRADEFLAGS="$(GRADEFLAGS)" $(cs_subdir)$*.c
- $(MGNUC) $(GRADEFLAGS) $(MGNUCFLAGS) -c $(cs_subdir)$*.c -o $@
+ $(MMAKE_MAKE_CMD) $(MFLAGS) GRADEFLAGS="$(GRADEFLAGS)" \
+ EXTRA_GRADEFLAGS="$(EXTRA_GRADEFLAGS)" $(cs_subdir)$*.c
+ $(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -c $(cs_subdir)$*.c -o $@
$(RM_C) $(cs_subdir)$*.c
$(os_subdir)%.pic_o : %.m
- $(MMAKE_MAKE_CMD) $(MFLAGS) GRADEFLAGS="$(GRADEFLAGS)" $(cs_subdir)$*.c
- $(MGNUC) $(GRADEFLAGS) $(MGNUCFLAGS) $(CFLAGS_FOR_PIC) \
+ $(MMAKE_MAKE_CMD) $(MFLAGS) GRADEFLAGS="$(GRADEFLAGS)" \
+ EXTRA_GRADEFLAGS="$(EXTRA_GRADEFLAGS)" $(cs_subdir)$*.c
+ $(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) $(CFLAGS_FOR_PIC) \
-c $(cs_subdir)$*.c -o $@
endif # RM_C != :
@@ -197,7 +199,7 @@
$(dirs_subdir)%.dir/*.o: %.m
rm -f $@
- $(MCS) $(GRADEFLAGS) $(MCSFLAGS) $<
+ $(MCS) $(ALL_GRADEFLAGS) $(ALL_MCSFLAGS) $<
# The `touch' is necessary, since otherwise if
# the old .err file was of size zero and
@@ -206,11 +208,11 @@
# (Is that a bug in unix? In bash?)
.m.err:
- $(MC) $(MCFLAGS) --errorcheck-only $< > $@ 2>&1
+ $(MC) $(ALL_MCFLAGS) --errorcheck-only $< > $@ 2>&1
@touch $@
.m.ugly:
- $(MC) --convert-to-mercury $(MCFLAGS) $<
+ $(MC) --convert-to-mercury $(ALL_MCFLAGS) $<
#-----------------------------------------------------------------------------#
#
@@ -218,19 +220,21 @@
#
.c.o:
- $(MGNUC) $(GRADEFLAGS) $(MGNUCFLAGS) -c $< -o $@
+ $(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -c $< -o $@
.c.pic_o:
- $(MGNUC) $(GRADEFLAGS) $(MGNUCFLAGS) $(CFLAGS_FOR_PIC) -c $< -o $@
+ $(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) $(CFLAGS_FOR_PIC) \
+ -c $< -o $@
.c.s:
- $(MGNUC) $(GRADEFLAGS) $(MGNUCFLAGS) -S $< -o $@
+ $(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -S $< -o $@
.c.pic_s:
- $(MGNUC) $(GRADEFLAGS) $(MGNUCFLAGS) $(CFLAGS_FOR_PIC) -S $< -o $@
+ $(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) $(CFLAGS_FOR_PIC) \
+ -S $< -o $@
.c.i:
- $(MGNUC) $(GRADEFLAGS) $(MGNUCFLAGS) -E $< > $@
+ $(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -E $< > $@
#-----------------------------------------------------------------------------#
#
@@ -243,19 +247,21 @@
ifneq ("$(cs_subdir)","")
$(os_subdir)%.o : $(cs_subdir)%.c
- $(MGNUC) $(GRADEFLAGS) $(MGNUCFLAGS) -c $< -o $@
+ $(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -c $< -o $@
$(os_subdir)%.pic_o : $(cs_subdir)%.c
- $(MGNUC) $(GRADEFLAGS) $(MGNUCFLAGS) $(CFLAGS_FOR_PIC) -c $< -o $@
+ $(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) $(CFLAGS_FOR_PIC) \
+ -c $< -o $@
%.s: $(cs_subdir)%.c
- $(MGNUC) $(GRADEFLAGS) $(MGNUCFLAGS) -S $< -o $@
+ $(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -S $< -o $@
%.pic_s: $(cs_subdir)%.c
- $(MGNUC) $(GRADEFLAGS) $(MGNUCFLAGS) $(CFLAGS_FOR_PIC) -S $< -o $@
+ $(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) $(CFLAGS_FOR_PIC) \
+ -S $< -o $@
%.i: $(cs_subdir)%.c
- $(MGNUC) $(GRADEFLAGS) $(MGNUCFLAGS) -E $< > $@
+ $(MGNUC) $(ALL_GRADEFLAGS) $(ALL_MGNUCFLAGS) -E $< > $@
endif # $(cs_subdir) != ""
@@ -278,15 +284,6 @@
$(MLOBJS_DEPS) : $(MLOBJS)
$(MLPICOBJS_DEPS) : $(MLPICOBJS)
-
-# The following is obsolete; I've kept it here only for
-# bootstrapping reasons and for compatibility with old `.dep' files.
-
-MLOBJS-%: $(MLOBJS)
- @
-
-MLPICOBJS-%: $(MLPICOBJS)
- @
#-----------------------------------------------------------------------------#
#
Index: scripts/Mmake.vars.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.vars.in,v
retrieving revision 1.19
diff -u -r1.19 Mmake.vars.in
--- Mmake.vars.in 1998/03/30 13:03:15 1.19
+++ Mmake.vars.in 1998/07/29 01:19:45
@@ -24,10 +24,15 @@
DEFAULT_GRADE = $(MERCURY_DEFAULT_GRADE)
GRADE = $(DEFAULT_GRADE)
-GRADEFLAGS = --grade $(GRADE) $(EXTRA_GRADEFLAGS)
+ALL_GRADEFLAGS = $(TARGET_GRADEFLAGS) $(EXTRA_GRADEFLAGS)
+GRADEFLAGS = --grade $(GRADE)
EXTRA_GRADEFLAGS =
MC = mmc
+ALL_MCFLAGS = $(MCFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCFLAGS)
+MCFLAGS =
+EXTRA_MCFLAGS =
+
MCS = $(MC) --split-c-files --compile-only
MCG = $(MC) --compile-to-c
MCD = $(MC) --generate-dependencies
@@ -36,8 +41,16 @@
MCSI = $(MC) --make-short-interface
MCOI = $(MC) --make-optimization-interface
MCTOI = $(MC) --make-transitive-optimization-interface
-MCFLAGS = $(EXTRA_MCFLAGS)
-EXTRA_MCFLAGS =
+
+ALL_MCIFLAGS = $(MCIFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCIFLAGS)
+ALL_MCPIFLAGS = $(MCPIFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCPIFLAGS)
+ALL_MCSIFLAGS = $(MCSIFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCSIFLAGS)
+ALL_MCOIFLAGS = $(MCOIFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCOIFLAGS)
+ALL_MCTOIFLAGS = $(MCTOIFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCTOIFLAGS)
+ALL_MCDFLAGS = $(MCDFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCDFLAGS)
+ALL_MCGFLAGS = $(MCGFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCGFLAGS)
+ALL_MCSFLAGS = $(MCSFLAGS) $(TARGET_MCFLAGS) $(EXTRA_MCSFLAGS)
+
MCIFLAGS = $(MCFLAGS)
MCPIFLAGS = $(MCFLAGS)
MCSIFLAGS = $(MCFLAGS)
@@ -47,47 +60,84 @@
MCGFLAGS = $(MCFLAGS)
MCSFLAGS = $(MCFLAGS)
+EXTRA_MCIFLAGS = $(EXTRA_MCFLAGS)
+EXTRA_MCPIFLAGS = $(EXTRA_MCFLAGS)
+EXTRA_MCSIFLAGS = $(EXTRA_MCFLAGS)
+EXTRA_MCOIFLAGS = $(EXTRA_MCFLAGS)
+EXTRA_MCTOIFLAGS= $(EXTRA_MCFLAGS)
+EXTRA_MCDFLAGS = $(EXTRA_MCFLAGS)
+EXTRA_MCGFLAGS = $(EXTRA_MCFLAGS)
+EXTRA_MCSFLAGS = $(EXTRA_MCFLAGS)
+
#
# The following variables hold the names of various programs and
# the options which should be passed to them.
#
C2INIT = c2init
-C2INITFLAGS = $(EXTRA_C2INITFLAGS)
+ALL_C2INITFLAGS = $(C2INITFLAGS) $(TARGET_C2INITFLAGS) $(EXTRA_C2INITFLAGS)
+C2INITFLAGS =
EXTRA_C2INITFLAGS =
+
MGNUC = mgnuc
-MGNUCFLAGS = $(EXTRA_MGNUCFLAGS) $(EXTRA_CFLAGS)
+ALL_MGNUCFLAGS = $(MGNUCFLAGS) $(TARGET_MGNUCFLAGS) $(EXTRA_MGNUCFLAGS) \
+ $(ALL_CFLAGS)
+MGNUCFLAGS =
EXTRA_MGNUCFLAGS =
+
+ALL_CFLAGS = $(CFLAGS) $(TARGET_CFLAGS) $(EXTRA_CFLAGS)
+CFLAGS =
EXTRA_CFLAGS =
+
ML = ml
+ALL_MLFLAGS = $(MLFLAGS) $(TARGET_MLFLAGS) $(EXTRA_MLFLAGS)
MLFLAGS = $(EXTRA_MLFLAGS)
EXTRA_MLFLAGS =
+
MLOBJS =
MLPICOBJS = $(MLOBJS:.o=.$(EXT_FOR_PIC_OBJECTS))
-MLLIBS = $(EXTRA_MLLIBS)
+ALL_MLLIBS = $(MLLIBS) $(TARGET_MLLIBS) $(EXTRA_MLLIBS)
+MLLIBS =
EXTRA_MLLIBS =
+
MNC = mnc
-MNCFLAGS = $(EXTRA_MNCFLAGS)
+ALL_MNCFLAGS = $(MNCFLAGS) $(TARGET_MNCFLAGS) $(EXTRA_MNCFLAGS)
+MNCFLAGS =
EXTRA_MNCFLAGS =
+
MNL = mnl
-MNLFLAGS = $(EXTRA_MNLFLAGS)
+ALL_MNLFLAGS = $(MNLFLAGS) $(TARGET_MNLFLAGS) $(EXTRA_MNLFLAGS)
+MNLFLAGS =
EXTRA_MNLFLAGS =
+
MNP = mnp
-MNPFLAGS = $(EXTRA_MNPFLAGS)
+ALL_MNPFLAGS = $(MNPFLAGS) $(TARGET_MNPFLAGS) $(EXTRA_MNPFLAGS)
+MNPFLAGS =
EXTRA_MNPFLAGS =
+
MSC = msc
-MSCFLAGS = $(EXTRA_MSCFLAGS)
+ALL_MSCFLAGS = $(MSCFLAGS) $(TARGET_MSCFLAGS) $(EXTRA_MSCFLAGS)
+MSCFLAGS =
EXTRA_MSCFLAGS =
+
MSL = msl
-MSLFLAGS = $(EXTRA_MSLFLAGS)
+ALL_MSLFLAGS = $(MSLFLAGS) $(TARGET_MSLFLAGS) $(EXTRA_MSLFLAGS)
+MSLFLAGS =
EXTRA_MSLFLAGS =
+
MSP = msp
-MSPFLAGS = $(EXTRA_MSPFLAGS)
+ALL_MSPFLAGS = $(MSPFLAGS) $(TARGET_MSPFLAGS) $(EXTRA_MSPFLAGS)
+MSPFLAGS =
EXTRA_MSPFLAGS =
AR = ar
+ALL_ARFLAGS = $(ARFLAGS) $(TARGET_ARFLAGS) $(EXTRA_ARFLAGS)
ARFLAGS = cr
+EXTRA_ARFLAGS =
+
RANLIB = @RANLIB@
+ALL_RANLIBFLAGS = $(RANLIBFLAGS) $(TARGET_RANLIBFLAGS) $(EXTRA_RANLIBFLAGS)
RANLIBFLAGS =
+EXTRA_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
@@ -111,6 +161,85 @@
# lists of targets that depend on $(MLOBJS) and $(MLPICOBJS)
MLOBJS_DEPS =
MLPICOBJS_DEPS =
+
+#-----------------------------------------------------------------------------#
+
+# `TARGET_<prog>FLAGS' is used to pass different flags to <prog> for
+# different targets. By setting MCFLAGS-foo, for example, you can add
+# extra values to TARGET_MCFLAGS that will used only for compiling foo.m.
+#
+# For each program <prog>, `TARGET_<prog>FLAGS' expands to
+# `$(<prog>FLAGS-$@)' and/or `$(<prog>FLAGS-$*)'.
+# $@ and $* are the builtin variables that expand to the
+# current target and (for pattern rules) the base name of the current target,
+# respectively. So $* is used for flags variables used by pattern rules,
+# whereas $@ is used for flags variables used by hard-coded rules,
+# including the ones in the generated .dep files.
+#
+# The code below uses some tricky GNU Make hacks to avoid expanding
+# <prog>FLAGS-$* and <prog>FLAGS-$@ if these vars are not defined,
+# so that we can avoid spurious warnings if the warning about
+# undefined variables is enabled.
+
+TARGET_GRADEFLAGS = \
+ $(maybe-base-GRADEFLAGS-$(findstring undefined,$(origin GRADEFLAGS-$*))) \
+ $(maybe-target-GRADEFLAGS-$(findstring undefined,$(origin GRADEFLAGS-$@)))
+maybe-base-GRADEFLAGS- = $(GRADEFLAGS-$*)
+maybe-base-GRADEFLAGS-undefined =
+maybe-target-GRADEFLAGS- = $(GRADEFLAGS-$@)
+maybe-target-GRADEFLAGS-undefined =
+
+TARGET_MCFLAGS = \
+ $(maybe-base-MCFLAGS-$(findstring undefined,$(origin MCFLAGS-$*)))
+maybe-base-MCFLAGS- = $(MCFLAGS-$*)
+maybe-base-MCFLAGS-undefined =
+
+TARGET_C2INITFLAGS = \
+ $(maybe-target-C2INITFLAGS-$(findstring undefined,$(origin C2INITFLAGS-$@)))
+maybe-target-C2INITFLAGS- = $(C2INITFLAGS-$@)
+maybe-target-C2INITFLAGS-undefined =
+
+TARGET_MGNUCFLAGS = \
+ $(maybe-base-MGNUCFLAGS-$(findstring undefined,$(origin MGNUCFLAGS-$*)))
+maybe-base-MGNUCFLAGS- = $(MGNUCFLAGS-$*)
+maybe-base-MGNUCFLAGS-undefined =
+
+TARGET_CFLAGS = \
+ $(maybe-base-CFLAGS-$(findstring undefined,$(origin CFLAGS-$*))) \
+ $(maybe-target-CFLAGS-$(findstring undefined,$(origin CFLAGS-$@)))
+maybe-base-CFLAGS- = $(CFLAGS-$*)
+maybe-base-CFLAGS-undefined =
+maybe-target-CFLAGS- = $(CFLAGS-$@)
+maybe-target-CFLAGS-undefined =
+
+TARGET_MLFLAGS = \
+ $(maybe-target-MLFLAGS-$(findstring undefined,$(origin MLFLAGS-$@)))
+maybe-target-MLFLAGS- = $(MLFLAGS-$@)
+maybe-target-MLFLAGS-undefined =
+
+TARGET_MLLIBS = \
+ $(maybe-target-MLLIBS-$(findstring undefined,$(origin MLLIBS-$@)))
+maybe-target-MLLIBS- = $(MLLIBS-$@)
+maybe-target-MLLIBS-undefined =
+
+TARGET_ARFLAGS = \
+ $(maybe-target-ARFLAGS-$(findstring undefined,$(origin ARFLAGS-$@)))
+maybe-target-ARFLAGS- = $(ARFLAGS-$@)
+maybe-target-ARFLAGS-undefined =
+
+TARGET_RANLIBFLAGS = \
+ $(maybe-target-RANLIBFLAGS-$(findstring undefined,$(origin RANLIBFLAGS-$@)))
+maybe-target-RANLIBFLAGS- = $(RANLIBFLAGS-$@)
+maybe-target-RANLIBFLAGS-undefined =
+
+# Support for compiling Mercury programs with Prolog will probably be
+# dropped one of these days, so it's probably not worth bothering with these.
+TARGET_MNCFLAGS =
+TARGET_MNLFLAGS =
+TARGET_MNPFLAGS =
+TARGET_MSCFLAGS =
+TARGET_MSLFLAGS =
+TARGET_MSPFLAGS =
#-----------------------------------------------------------------------------#
#
Index: scripts/mmake.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mmake.in,v
retrieving revision 1.26
diff -u -r1.26 mmake.in
--- mmake.in 1998/07/25 12:01:43 1.26
+++ mmake.in 1998/07/28 23:40:45
@@ -76,7 +76,7 @@
else
use_subdirs=${MMAKE_USE_SUBDIRS=no}
fi
-warn_undefined_vars=false
+warn_undefined_vars=true
while [ $# -gt 0 ]; do
case "$1" in
Index: tests/Mmake.common
===================================================================
RCS file: /home/mercury1/repository/tests/Mmake.common,v
retrieving revision 1.11
diff -u -r1.11 Mmake.common
--- Mmake.common 1998/01/15 02:05:51 1.11
+++ Mmake.common 1998/07/29 01:25:19
@@ -1,17 +1,12 @@
#-----------------------------------------------------------------------------#
#
-# 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.
+# Note: Mmake lets you override MCFLAGS for a particular file by setting
+# MCFLAGS-foo. Similarly, 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
@@ -45,6 +40,3 @@
rm -f *.res
#-----------------------------------------------------------------------------#
-
-test:
- @echo $(HAVE_NUPROLOG)
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh> | of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3 | -- the last words of T. S. Garp.
More information about the developers
mailing list