[m-rev.] diff: fix LIB_DLL_H undefined Mmake warning
Fergus Henderson
fjh at cs.mu.OZ.AU
Fri Nov 14 17:39:17 AEDT 2003
Estimated hours taken: 0.5
Branches: main
runtime/Mmakefile:
Don't include $(LIB_DLL_H) in $(HDRS).
This fixes a warning from Mmake about LIB_DLL_H being undefined,
which occurred because Mmake.common (which needs to get included
before LIB_DLL_H is defined) refers to $(CHECK_HDRS) which refers
to $(HDRS).
Workspace: /home/jupiter/fjh/ws-jupiter/mercury
Index: runtime/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/Mmakefile,v
retrieving revision 1.106
diff -u -d -r1.106 Mmakefile
--- runtime/Mmakefile 25 Oct 2003 14:21:31 -0000 1.106
+++ runtime/Mmakefile 14 Nov 2003 06:35:49 -0000
@@ -4,10 +4,21 @@
# Public License - see the file COPYING in the Mercury distribution.
#-----------------------------------------------------------------------------#
+# This is the Mmakefile for the Mercury runtime library
+
+MAIN_TARGET=runtime
+
+#-----------------------------------------------------------------------------#
+
# All the headers in $(HDRS) should be syntactically well-formed
# header files, unlike the headers in $(BODY_HDRS).
# All the headers in $(HDRS) must also be in C (not C++).
+# Note that $(LIB_GLOBALS_H) cannot be part of $(HDRS), since it depends on
+# lib$(RT_LIB_NAME)$(DLL_DEF_LIB).$A, and $(OBJ) : $(HDRS) would create a
+# circular dependency. For similar but different reasons,
+# $(LIB_DLL_H) also cannot be part of $(HDRS).
+
# keep this list in alphabetical order, please
HDRS = \
mercury.h \
@@ -82,8 +93,7 @@
mercury_typeclass_info.h \
mercury_types.h \
mercury_univ.h \
- mercury_wrapper.h \
- $(LIB_DLL_H)
+ mercury_wrapper.h
# The headers in $(BODY_HDRS) contain code schemes included multiple times
# in one or more source files. Their dependencies must be explicitly listed.
@@ -106,10 +116,6 @@
mercury_ml_functor_body.h \
mercury_unify_compare_body.h
-# Note that $(LIB_GLOBALS_H) cannot be part of $(HDRS), since it depends on
-# lib$(RT_LIB_NAME)$(DLL_DEF_LIB).$A, and $(OBJ) : $(HDRS) would create a
-# circular dependency.
-
MACHHDRS = machdeps/no_regs.h \
machdeps/i386_regs.h \
machdeps/mips_regs.h \
@@ -177,13 +183,6 @@
#-----------------------------------------------------------------------------#
-# Mmake - Mmake file for the Mercury runtime library
-
-MAIN_TARGET=runtime
-
-# Specify which files to check for namespace cleanliness, and which name
-# prefixes are allowed.
-
CHECK_HDRS = $(HDRS)
CHECK_MHDRS =
CHECK_OBJS = $(CFILES:.c=.$O)
@@ -222,6 +221,7 @@
#-----------------------------------------------------------------------------#
# Stuff for Windows DLLs
+# This needs to come after the include of Mmake.common, which defines USE_DLLS.
ifeq ($(USE_DLLS),yes)
@@ -244,7 +244,7 @@
#-----------------------------------------------------------------------------#
-$(OBJS) $(PIC_OBJS): $(HDRS) $(MACHHDRS)
+$(OBJS) $(PIC_OBJS): $(HDRS) $(MACHHDRS) $(LIB_DLL_H)
mercury_builtin_types.$(O): mercury_hand_unify_compare_body.h
mercury_builtin_types.(O): mercury_hand_unify_body.h mercury_hand_compare_body.h
@@ -341,8 +341,8 @@
.PHONY: cs
cs: $(CFILES)
-tags: $(CFILES) $(HDRS) $(BODY_HDRS)
- ctags $(CFILES) $(HDRS) $(BODY_HDRS)
+tags: $(CFILES) $(HDRS) $(BODY_HDRS) $(LIB_DLL_H)
+ ctags $(CFILES) $(HDRS) $(BODY_HDRS) $(LIB_DLL_H)
#-----------------------------------------------------------------------------#
@@ -395,8 +395,10 @@
# mercury_conf.h needs to be in a separate directory so it can be
# overridden by a different configuration.
.PHONY: install_headers
-install_headers: $(HDRS) $(BODY_HDRS) $(MACHHDRS) $(LIB_GLOBALS_H) install_dirs
- cp `vpath_find $(HDRS) $(BODY_HDRS) $(LIB_GLOBALS_H)` $(INSTALL_INC_DIR)
+install_headers: $(HDRS) $(BODY_HDRS) $(MACHHDRS) \
+ $(LIB_DLL_H) $(LIB_GLOBALS_H) install_dirs
+ cp `vpath_find $(HDRS) $(BODY_HDRS) $(LIB_DLL_H) $(LIB_GLOBALS_H)` \
+ $(INSTALL_INC_DIR)
rm -f $(INSTALL_INC_DIR)/mercury_conf.h
cp `vpath_find mercury_conf.h` $(INSTALL_CONF_DIR)
-chmod u+w $(INSTALL_CONF_DIR)/mercury_conf.h
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list