2 # This library contains modules only available in versions of GHC
3 # newer than the current one. They are implemented as stubs that
4 # #include the actual code from fptools/libraries.
6 # The idea is to ease the task of writing portable code in GHC and its
7 # tools: the client can link with libghccompat.a and assume that all
8 # the modules are available. In this way we can add modules to the library
9 # and start using them right away in GHC, as long as the new library modules
10 # can be compiled using older versions of GHC.
14 include $(TOP)/mk/boilerplate.mk
23 LIBRARY = libghccompat.a
25 # Just to silence warnings
26 MKDEPENDC_OPTS += -I$(GHC_INCLUDE_DIR)
30 ghc_603_plus = $(shell if (test $(GhcCanonVersion) -ge 603); then echo YES; else echo NO; fi)
32 ifeq "$(ghc_603_plus)" "YES"
33 # These modules are all provided in GHC 6.3+
36 Distribution/Compat/Error.hs \
37 Distribution/Compat/ReadP.hs \
38 Distribution/Extension.hs \
39 Distribution/InstalledPackageInfo.hs \
40 Distribution/License.hs \
41 Distribution/Package.hs \
42 Distribution/ParseUtils.hs \
43 Distribution/Setup.hs \
44 Distribution/Version.hs
47 # Make the #includes in the stubs independent of the current location
48 SRC_HC_OPTS += -I$(FPTOOLS_TOP)/libraries
50 SRC_HC_OPTS += -fglasgow-exts
52 include $(TOP)/mk/target.mk