[project @ 2005-01-04 13:41:53 by simonmar]
authorsimonmar <unknown>
Tue, 4 Jan 2005 13:41:54 +0000 (13:41 +0000)
committersimonmar <unknown>
Tue, 4 Jan 2005 13:41:54 +0000 (13:41 +0000)
ghc/mk/config.mk was never being included in ordinary Makefiles.  It
was only included in the top-level fptools/Makefile for the purposes
of obtaining binary distribution settings.

This fixes that problem, and now as a side-effect $(GhcHasReadline)
will start working again.

Makefile
ghc/mk/boilerplate.mk
ghc/mk/config.mk.in

index d713142..53ee96f 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,7 +29,8 @@ ifneq "$(Project)" ""
                ProjectDirectory=$(Project)
        endif
    endif
-   include $(shell echo $(ProjectDirectory) | tr A-Z a-z)/mk/config.mk
+   -include $(shell echo $(ProjectDirectory) | tr A-Z a-z)/mk/config.mk
+   -include $(shell echo $(ProjectDirectory) | tr A-Z a-z)/mk/version.mk
 endif
 
 # -----------------------------------------------------------------------------
index 8d7b09f..0ab3f33 100644 (file)
@@ -1,22 +1,16 @@
-#################################################################################
-#
-#                          GHC boilerplate.mk
-#
-#              Boilerplate Makefile for an fptools project
-#
-#################################################################################
+# GHC boilerplate.mk
 
-# Begin by slurping in the boilerplate from one level up.
-# Remember, TOP is the top level of the innermost level
-# (FPTOOLS_TOP is the fptools top)
+GHC_TOP := $(TOP)
 
--include $(TOP)/mk/version.mk
+# Include this first, because the top-level .mk files might depend on
+# the values of $(ProjectXXX) variables.  (in fact they might/should not, 
+# but we're not brave enough to move this include later --SDM).
+-include $(GHC_TOP)/mk/version.mk
 
 # We need to set TOP to be the TOP that the next level up expects!
 # The TOP variable is reset after the inclusion of the fptools
 # boilerplate, so we stash TOP away first:
-GHC_TOP := $(TOP)
-TOP:=$(TOP)/..
+TOP:=$(GHC_TOP)/..
 
 include $(TOP)/mk/boilerplate.mk
 
@@ -28,6 +22,7 @@ TOP:=$(GHC_TOP)
 # augments or overrides previously set variables.
 # -----------------------------------------------------------------
 
--include $(TOP)/mk/paths.mk
--include $(TOP)/mk/opts.mk
--include $(TOP)/mk/suffix.mk
+-include $(GHC_TOP)/mk/config.mk
+-include $(GHC_TOP)/mk/paths.mk
+-include $(GHC_TOP)/mk/opts.mk
+-include $(GHC_TOP)/mk/suffix.mk
index ba6be78..b121518 100644 (file)
@@ -1,12 +1,11 @@
 # -*-makefile-*-
 # @configure_input@
+
 # -----------------------------------------------------------------------------
-#
-# GHC project configuration
-#
-# This file can only be included from the top of
-# an fptools/ build tree, since the version.mk 'include'
-# reaches in and grabs the project-specific settings.
+# GHC binary distribution configuration
+
+# These settings are used by the top-level Makefile when building
+# binary distributions.
 
 # what to include in a binary distribution
 GhcMainDir = ghc
@@ -23,10 +22,11 @@ GhcBinDistLibPrlScripts = ghc-asm ghc-split
 GhcBinDistBins = hp2ps ghcprof
 GhcBinDistLinks = ghc ghci ghc-pkg
 
+# -----------------------------------------------------------------------------
+# GHC-specific configuration settings
+
 # Set to YES if $(GHC) has the readline package installed
 GhcHasReadline = @GhcHasReadline@
 
 # GTK+
 GTK_CONFIG = @GTK_CONFIG@
-
-include $(GhcMainDir)/mk/version.mk