[project @ 2005-01-31 14:53:13 by simonpj]
[ghc-hetmet.git] / ghc / lib / compat / Makefile
index db90361..56220e9 100644 (file)
@@ -7,6 +7,7 @@ ALL_DIRS = \
        Distribution \
        Distribution/Compat \
        System \
+       System/Directory \
        cbits
 
 LIBRARY = libghccompat.a
@@ -16,13 +17,14 @@ MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
 
 UseGhcForCc = YES
 
-ghc_603_plus = $(shell if (test $(GhcCanonVersion) -ge 603); then echo YES; else echo NO; fi)
+# This library is linked to the compiler, at least in stage1, so we
+# better make sure it is built the same "way":
+SRC_HC_OPTS += $(GhcHcOpts)
 
-ifeq "$(ghc_603_plus)" "YES"
+ifeq "$(ghc_ge_603)" "YES"
 # These modules are all provided in GHC 6.3+
 EXCLUDED_SRCS += \
-       System/FilePath.hs \
-       Distribution/Compat/Error.hs \
+       System/Directory/Internals.hs \
        Distribution/Compat/ReadP.hs \
        Distribution/Extension.hs \
        Distribution/GetOpt.hs \
@@ -35,8 +37,7 @@ EXCLUDED_SRCS += \
 endif
 
 # Some explicit dependencies
-System/FilePath.$(way_)o : $(FPTOOLS_TOP)/libraries/base/System/FilePath.hs
-Distribution/Compat/Error.$(way_)o : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Compat/Error.hs
+System/Directory/Internals.$(way_)o : $(FPTOOLS_TOP)/libraries/base/System/Directory/Internals.hs
 Distribution/Compat/ReadP.$(way_) : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Compat/ReadP.hs
 Distribution/Extension.$(way_)o    : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/Extension.hs
 Distribution/GetOpt.$(way_)o    : $(FPTOOLS_TOP)/libraries/Cabal/Distribution/GetOpt.hs
@@ -65,4 +66,7 @@ boot :: depend
        $(MAKE) all
 endif
 
+# We don't ever want to build libghccompat as a shared library.
+GhcBuildDylibs=NO
+
 include $(TOP)/mk/target.mk