[project @ 2003-07-28 15:03:05 by panne]
[ghc-base.git] / Makefile
index 03a812f..7ed06cb 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 # -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.33 2002/06/20 16:12:58 simonmar Exp $
+# $Id: Makefile,v 1.46 2003/07/24 13:53:20 simonmar Exp $
 
 TOP=..
 include $(TOP)/mk/boilerplate.mk
@@ -14,24 +14,21 @@ ALL_DIRS = \
        Control/Monad \
        Control/Monad/ST \
        Data \
+       Data/Generics \
        Data/Array \
+       Data/Array/IO \
        Data/STRef \
-       Database \
        Debug \
        Debug/QuickCheck \
-       FileFormat \
        Foreign \
        Foreign/C \
        Foreign/Marshal \
        GHC \
-       Hugs \
-       Language \
-       Network \
-       NHC \
        System \
        System/Console \
        System/Mem \
        System/IO \
+       System/Posix \
        Text \
        Text/Html \
        Text/PrettyPrint \
@@ -43,8 +40,8 @@ ALL_DIRS = \
 
 PACKAGE = base
 
-SRC_HC_OPTS += -fglasgow-exts -cpp -Iinclude
-SRC_HSC2HS_OPTS += -Iinclude
+SRC_HC_OPTS += -fglasgow-exts -cpp -Iinclude -\#include HsBase.h
+SRC_HSC2HS_OPTS += -Iinclude -I$(FPTOOLS_TOP)/ghc/includes
 
 # Make sure we can get hold of regex.h
 ifneq "$(HavePosixRegex)" "YES"
@@ -61,9 +58,18 @@ SRC_HC_OPTS += -funbox-strict-fields
 # -----------------------------------------------------------------------------
 # PrimOpWrappers
 
+# These two lines are required for pre-processing ghc/compiler/prelude/primops.txt
+SRC_CPP_OPTS += -I$(GHC_INCLUDE_DIR)
+SRC_CPP_OPTS += ${GhcCppOpts}
+
+ifeq "$(BootingFromHc)" "YES"
+GHC/PrimopWrappers.hs:
+       touch GHC/PrimopWrappers.hs
+else
 GHC/PrimopWrappers.hs: $(GHC_COMPILER_DIR)/prelude/primops.txt
-       rm -f $@
+       @$(RM) $@
        $(GHC_GENPRIMOP) --make-haskell-wrappers < $< > $@
+endif
 
 boot :: GHC/PrimopWrappers.hs
 
@@ -102,10 +108,11 @@ endif # OBJECT_FILEFORMAT = PEi
 # Doc building with Haddock
 
 EXCLUDED_HADDOCK_SRCS = \
-       Data/Generics.hs \
+       GHC/PrimopWrappers.hs \
        GHC/PArr.hs
 
-SRC_HADDOCK_OPTS += -t "Haskell Core Libraries"
+SRC_HADDOCK_OPTS += -t "Haskell Core Libraries (base package)" \
+       --no-implicit-prelude -p prologue.txt
 
 # -----------------------------------------------------------------------------