# -----------------------------------------------------------------------------
-# $Id: Makefile,v 1.23 2002/04/11 12:03:43 simonpj Exp $
+# $Id: Makefile,v 1.29 2002/05/31 12:22:33 panne Exp $
TOP=..
include $(TOP)/mk/boilerplate.mk
Text/Html \
Text/PrettyPrint \
Text/ParserCombinators \
+ Text/ParserCombinators/Parsec \
Text/Regex \
Text/Show \
Text/Read
boot :: GHC/PrimopWrappers.hs
+EXTRA_SRCS += GHC/PrimopWrappers.hs
CLEAN_FILES += GHC/PrimopWrappers.hs
#-----------------------------------------------------------------------------
# -----------------------------------------------------------------------------
+# Doc building with Haddock
+
+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 >$@
+
+# -----------------------------------------------------------------------------
include $(TOP)/mk/target.mk
@touch HSbase.o
endif # TARGETPLATFORM = i386-unknown-mingw32
-