Add transitional rules for the alternative layout rule
[ghc-hetmet.git] / ghc.mk
diff --git a/ghc.mk b/ghc.mk
index f47aece..a8a4b70 100644 (file)
--- a/ghc.mk
+++ b/ghc.mk
@@ -269,6 +269,7 @@ include rules/build-perl.mk
 include rules/build-package.mk
 include rules/build-package-way.mk
 include rules/haddock.mk
+include rules/tags-package.mk
 
 # -----------------------------------------------------------------------------
 # Registering hand-written package descriptions (used in libffi and rts)
@@ -339,6 +340,8 @@ $(eval $(call addPackage,terminfo,($$(Windows),NO)))
 
 $(eval $(call addPackage,haskeline))
 
+$(foreach pkg,$(EXTRA_PACKAGES),$(eval $(call addPackage,$(pkg))))
+
 ifneq "$(BootingFromHc)" "YES"
 PACKAGES_STAGE2 += \
        dph/dph-base \
@@ -398,6 +401,7 @@ ghc/stage2/package-data.mk: compiler/stage2/package-data.mk
 utils/haddock/dist/package-data.mk: compiler/stage2/package-data.mk
 
 utils/hsc2hs/dist-install/package-data.mk: compiler/stage2/package-data.mk
+utils/compare_sizes/dist/package-data.mk: compiler/stage2/package-data.mk
 
 # add the final two package.conf dependencies: ghc-prim depends on RTS,
 # and RTS depends on libffi.
@@ -441,9 +445,8 @@ PRIMOPS_TXT = $(GHC_COMPILER_DIR)/prelude/primops.txt
 libraries/ghc-prim/dist-install/build/GHC/PrimopWrappers.hs : $(GENPRIMOP_INPLACE) $(PRIMOPS_TXT) | $$(dir $$@)/.
        "$(GENPRIMOP_INPLACE)" --make-haskell-wrappers <$(PRIMOPS_TXT) >$@
 
-libraries/ghc-prim/GHC/Prim.hs : $(GENPRIMOP_INPLACE) $(PRIMOPS_TXT)
-       "$(GENPRIMOP_INPLACE)" --make-haskell-source <$(PRIMOPS_TXT) >$@
-
+# Required so that Haddock documents the primops.
+libraries/ghc-prim_dist-install_EXTRA_HADDOCK_SRCS = libraries/ghc-prim/dist-install/build/autogen/GHC/Prim.hs
 
 # -----------------------------------------------------------------------------
 # Include build instructions from all subdirs
@@ -545,6 +548,7 @@ BUILD_DIRS += \
    compiler \
    $(GHC_HSC2HS_DIR) \
    $(GHC_PKG_DIR) \
+   utils/ghctags \
    utils/hpc \
    utils/runghc \
    ghc
@@ -553,6 +557,9 @@ BUILD_DIRS += \
    $(GHC_TOUCHY_DIR)
 endif
 
+BUILD_DIRS += utils/count_lines
+BUILD_DIRS += utils/compare_sizes
+
 ifneq "$(CLEANING)" "YES"
 # After compiler/, because these packages depend on it
 BUILD_DIRS += \
@@ -592,9 +599,11 @@ ifneq "$(findstring $(phase),0 1 2 3)" ""
 # In phases 0-3, we disable stage2-3, the full libraries and haddock
 utils/haddock_dist_DISABLE = YES
 utils/runghc_dist_DISABLE = YES
+utils/ghctags_dist_DISABLE = YES
 utils/hpc_dist_DISABLE = YES
 utils/hsc2hs_dist-install_DISABLE = YES
 utils/ghc-pkg_dist-install_DISABLE = YES
+utils/compare_sizes_dist_DISABLE = YES
 compiler_stage2_DISABLE = YES
 compiler_stage3_DISABLE = YES
 ghc_stage2_DISABLE = YES
@@ -724,7 +733,7 @@ install_perl : $(INPLACE_PERL)
 endif # Windows
 
 ifneq "$(BINDIST)" "YES"
-$(ghc-prim_HADDOCK_FILE): \
+$(ghc-prim-$(libraries/ghc-prim_dist-install_VERSION)_HADDOCK_FILE): \
     libraries/ghc-prim/dist-install/build/autogen/GHC/Prim.hs \
     libraries/ghc-prim/dist-install/build/autogen/GHC/PrimopWrappers.hs
 endif # BINDIST
@@ -739,6 +748,12 @@ libraries/ghc-prim/dist-install/build/autogen/GHC/PrimopWrappers.hs: \
                           | $$(dir $$@)/.
        "$(GENPRIMOP_INPLACE)" --make-haskell-wrappers < $< > $@
 
+.PHONY: tags
+tags: tags_compiler
+
+.PHONY: TAGS
+TAGS: TAGS_compiler
+
 # -----------------------------------------------------------------------------
 # Installation