[project @ 2003-02-18 20:15:15 by panne]
[ghc-base.git] / Makefile
index fab55a2..8820316 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 # -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.31 2002/06/08 13:11:27 panne Exp $
+# $Id: Makefile,v 1.40 2002/12/20 09:31:11 simonmar Exp $
 
 TOP=..
 include $(TOP)/mk/boilerplate.mk
@@ -15,22 +15,18 @@ ALL_DIRS = \
        Control/Monad/ST \
        Data \
        Data/Array \
-       Database \
+       Data/STRef \
        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 \
@@ -42,8 +38,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,7 +57,7 @@ SRC_HC_OPTS += -funbox-strict-fields
 # PrimOpWrappers
 
 GHC/PrimopWrappers.hs: $(GHC_COMPILER_DIR)/prelude/primops.txt
-       rm -f $@
+       @$(RM) $@
        $(GHC_GENPRIMOP) --make-haskell-wrappers < $< > $@
 
 boot :: GHC/PrimopWrappers.hs
@@ -104,23 +100,8 @@ EXCLUDED_HADDOCK_SRCS = \
        Data/Generics.hs \
        GHC/PArr.hs
 
-HS_PPS = $(addsuffix .raw-hs, $(basename $(filter-out $(EXCLUDED_HADDOCK_SRCS), $(HS_SRCS))))
-
-HADDOCK = $(FPTOOLS_TOP)/haddock/src/haddock-inplace
-
-# Urgh, hack needed to ensure that the value of HS_SRCS is computed in time for
-# the docs rule below.
-PRE_SRCS := $(ALL_SRCS)
-
-.PHONY: docs
-haddock-docs : $(HS_PPS)
-       $(HADDOCK) -t "Haskell Core Libraries" -h -s "." $(HS_PPS)
-
-%.raw-hs : %.lhs
-       $(GHC_INPLACE) $(HC_OPTS) -D__HADDOCK__ -E -cpp $< -o $<.tmp && sed -e 's/^#.*//' <$<.tmp >$@
-
-%.raw-hs : %.hs
-       $(GHC_INPLACE) $(HC_OPTS) -D__HADDOCK__ -E -cpp $< -o $<.tmp && sed -e 's/^#.*//' <$<.tmp >$@
+SRC_HADDOCK_OPTS += -t "Haskell Core Libraries (base package)" \
+       --no-implicit-prelude -p prologue.txt
 
 # -----------------------------------------------------------------------------