Generate PrimopWrappers.hs with Haddock docs
authorSimon Marlow <simonmar@microsoft.com>
Tue, 24 Jan 2006 13:11:21 +0000 (13:11 +0000)
committerSimon Marlow <simonmar@microsoft.com>
Tue, 24 Jan 2006 13:11:21 +0000 (13:11 +0000)
Patch originally from Dinko Tenev <dinko.tenev@gmail.com>, modified
to add log message by me.

Makefile

index 61ce5f2..cf5917c 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -56,14 +56,21 @@ SRC_CPP_OPTS += -I$(GHC_INCLUDE_DIR)
 SRC_CPP_OPTS += ${GhcCppOpts}
 
 ifeq "$(BootingFromHc)" "YES"
-GHC/PrimopWrappers.hs:
+GHC/PrimopWrappers.hs: GHC/Prim.hs
        touch GHC/PrimopWrappers.hs
 else
-GHC/PrimopWrappers.hs: $(GHC_COMPILER_DIR)/prelude/primops.txt
+GHC/PrimopWrappers.hs: $(GHC_COMPILER_DIR)/prelude/primops.txt GHC/Prim.hs
        @$(RM) $@
        $(GHC_GENPRIMOP) --make-haskell-wrappers < $< > $@
 endif
 
+GHC/Prim.hs: $(GHC_COMPILER_DIR)/prelude/primops.txt
+       @$(RM) $@
+       $(GHC_GENPRIMOP) --make-haskell-source < $< > $@
+
+EXCLUDED_SRCS = GHC/Prim.hs
+EXTRA_HADDOCK_SRCS = GHC/Prim.hs
+
 boot :: GHC/PrimopWrappers.hs
 
 EXTRA_SRCS  += GHC/PrimopWrappers.hs