[project @ 2003-02-12 22:17:04 by wolfgang]
[ghc-hetmet.git] / mk / paths.mk
index 50c26e1..fa0c27a 100644 (file)
@@ -182,8 +182,6 @@ HS_IFACES   = $(addsuffix .$(way_)hi,$(basename $(HS_SRCS)))
 
 HSC_C_OBJS  = $(addsuffix _hsc.$(way_)o,$(basename $(filter %.hsc,$(SRCS))))
 
-EXTRA_OBJS  = $(addsuffix .$(way_)o,$(basename $(EXTRA_SRCS)))
-
 # Always remove $(EXCLUDED_C_SRCS) from C_SRCS
 EXCLUDED_C_SRCS = $(patsubst %.lhs, %_stub.c, $(HS_SRCS)) \
                  $(patsubst %.hs,  %_stub.c, $(HS_SRCS))
@@ -229,7 +227,7 @@ MKDEPENDC_SRCS=$(C_SRCS)
 #
 # make TAGS defaults
 #
-# The default set of files for the dependency generators to work on
+# The default set of files for the TAGS file generators to work on
 # is just their source equivalents.
 #
 TAGS_HS_SRCS=$(HS_SRCS)
@@ -252,8 +250,13 @@ TAGS_C_SRCS=$(C_SRCS)
 #
 MOSTLY_CLEAN_FILES += $(HS_OBJS) $(C_OBJS) $(HSC_C_OBJS)
 CLEAN_FILES        += $(HS_PROG) $(C_PROG) $(SCRIPT_PROG) $(SCRIPT_LINK) \
-                     $(PROG) $(LIBRARY) $(HS_IFACES) a.out \
-                     $(DERIVED_HSC_SRCS)
+                     $(PROG) $(LIBRARY) a.out \
+                     $(DERIVED_HSC_SRCS) \
+                     $(patsubst %,%/*.$(way_)hi, . $(ALL_DIRS))
+
+# we delete *all* the .hi files we can find, rather than just
+# $(HS_IFACES), because stale interfaces left around by modules which
+# don't exist any more can screw up the build.
 
 # Don't clean the .hc files if we're bootstrapping
 ifneq "$(BootingFromHc)" "YES"