diff: fix Mmake uninitialized variable warnings/errors
Fergus Henderson
fjh at cs.mu.OZ.AU
Mon Mar 30 23:00:31 AEST 1998
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'.
cvs diff -N Mmakefile boehm_gc/Mmakefile compiler/Mmakefile library/Mmakefile runtime/Mmakefile scripts/Mmake.vars.in scripts/mmake.in
Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/Mmakefile,v
retrieving revision 1.20
diff -u -r1.20 Mmakefile
--- Mmakefile 1998/03/20 02:57:59 1.20
+++ Mmakefile 1998/03/29 23:49:00
@@ -15,6 +15,8 @@
SUBDIRS = scripts util boehm_gc runtime library compiler doc profiler
+MMAKEFLAGS =
+
SUBDIR_MMAKE = PATH=../scripts:../util:$$PATH \
MMAKE_VPATH=. \
MMAKE_DIR=../scripts \
@@ -22,6 +24,9 @@
#-----------------------------------------------------------------------------#
+PREINSTALL_HACK =
+POSTINSTALL_HACK =
+
# For Windows 95 or Windows NT, uncomment the following two lines:
# PREINSTALL_HACK = preinstall_hack_for_windows
# POSTINSTALL_HACK = postinstall_hack_for_windows
@@ -35,21 +40,21 @@
dep: dep_library dep_compiler dep_profiler
.PHONY: dep_library
-dep_library: library/$(dep_subdir)library.dep
+dep_library: library/$(deps_subdir)library.dep
library/library.dep:
cd library && $(SUBDIR_MMAKE) depend
.PHONY: dep_compiler
-dep_compiler: compiler/$(dep_subdir)mercury_compile.dep
+dep_compiler: compiler/$(deps_subdir)mercury_compile.dep
-compiler/$(dep_subdir)mercury_compile.dep: library/$(dep_subdir)library.dep
+compiler/$(deps_subdir)mercury_compile.dep: library/$(deps_subdir)library.dep
cd compiler && $(SUBDIR_MMAKE) depend
.PHONY: dep_profiler
-dep_profiler: profiler/$(dep_subdir)mercury_profile.dep
+dep_profiler: profiler/$(deps_subdir)mercury_profile.dep
-profiler/$(dep_subdir)mercury_profile.dep: library/$(dep_subdir)library.dep
+profiler/$(deps_subdir)mercury_profile.dep: library/$(deps_subdir)library.dep
cd profiler && $(SUBDIR_MMAKE) depend
# depend_library MUST be done before depend_compiler and depend_profiler
Index: boehm_gc/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/boehm_gc/Mmakefile,v
retrieving revision 1.4
diff -u -r1.4 Mmakefile
--- Mmakefile 1997/09/29 18:13:14 1.4
+++ Mmakefile 1998/03/29 23:57:15
@@ -6,6 +6,7 @@
# Mmake - Mmake file for Hans Boehm's conservative garbage collector.
+PROF=
MAIN_TARGET=libgc$(PROF)
MERCURY_DIR=..
@@ -58,6 +59,11 @@
LIBGC_DLL_H = libgc_dll.h
LIBGC_GLOBALS_H = libgc_globals.h
+
+else
+
+LIBGC_DLL_H =
+LIBGC_GLOBALS_H =
endif
#-----------------------------------------------------------------------------#
Index: compiler/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Mmakefile,v
retrieving revision 1.10
diff -u -r1.10 Mmakefile
--- Mmakefile 1998/03/20 02:58:06 1.10
+++ Mmakefile 1998/03/30 09:57:25
@@ -53,6 +53,7 @@
MNL = MERCURY_NU_LIB_DIR=$(LIBRARY_DIR) $(SCRIPTS_DIR)/mnl
MNLFLAGS = -u 6000
MTAGS = $(SCRIPTS_DIR)/mtags
+MTAGSFLAGS =
#-----------------------------------------------------------------------------#
Index: library/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.28
diff -u -r1.28 Mmakefile
--- Mmakefile 1998/03/27 16:36:50 1.28
+++ Mmakefile 1998/03/29 23:43:45
@@ -48,7 +48,11 @@
INTERMODULE_OPTS = --transitive-intermodule-optimization
ENABLE_TERM_OPTS = --enable-termination
-# CHECK_TERM_OPTS = --check-termination
+CHECK_TERM_OPTS =
+# If you want to actually check termination for the library, then you need
+# CHECK_TERM_OPTS = --check-termination
+# but that is not enabled by default because it probably just results in
+# spurious warnings.
else
Index: runtime/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/Mmakefile,v
retrieving revision 1.24
diff -u -r1.24 Mmakefile
--- Mmakefile 1998/03/27 08:34:17 1.24
+++ Mmakefile 1998/03/29 23:41:20
@@ -131,6 +131,7 @@
else
+DLL_CFLAGS =
LIBMER_DLL_H =
LIBMER_GLOBALS_H =
DLL_DEF_LIB =
Index: scripts/Mmake.vars.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/Mmake.vars.in,v
retrieving revision 1.18
diff -u -r1.18 Mmake.vars.in
--- Mmake.vars.in 1998/03/27 16:31:25 1.18
+++ Mmake.vars.in 1998/03/30 05:10:55
@@ -63,7 +63,8 @@
EXTRA_MLFLAGS =
MLOBJS =
MLPICOBJS = $(MLOBJS:.o=.$(EXT_FOR_PIC_OBJECTS))
-MLLIBS =
+MLLIBS = $(EXTRA_MLLIBS)
+EXTRA_MLLIBS =
MNC = mnc
MNCFLAGS = $(EXTRA_MNCFLAGS)
EXTRA_MNCFLAGS =
@@ -125,6 +126,7 @@
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/
@@ -147,6 +149,7 @@
nos_subdir=
qls_subdir=
deps_subdir=
+ds_subdir=
int0s_subdir=
ints_subdir=
int2s_subdir=
@@ -171,6 +174,8 @@
.SUFFIXES: # reset sufix list to be empty
#-----------------------------------------------------------------------------#
+
+MAIN_TARGET =
default_target: main_target
Index: scripts/mmake.in
===================================================================
RCS file: /home/mercury1/repository/mercury/scripts/mmake.in,v
retrieving revision 1.16
diff -u -r1.16 mmake.in
--- mmake.in 1998/03/27 08:34:23 1.16
+++ mmake.in 1998/03/29 23:54:00
@@ -157,7 +157,7 @@
# Enable checking for undefined variables -- but not when making the
# dependencies.
case "$@" in
- dep*|*.dep*)
+ dep*|' dep'*|*.dep*)
MMAKE_MAKE_OPTS=""
;;
*)
--
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