Refactor, and improve error messages (cf Trac #3395)
[ghc-hetmet.git] / mk / config.mk.in
index ac00599..5e8e265 100644 (file)
@@ -107,7 +107,12 @@ GhcDebugged=NO
 GhcLibProfiled=$(if $(filter p,$(GhcLibWays)),YES,NO)
 
 # Build shared and/or static libs?
-BuildSharedLibs=@BuildSharedLibs@
+PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),i386-unknown-linux x86_64-unknown-linux),YES,NO)
+ifeq "$(PlatformSupportsSharedLibs)" "YES"
+BuildSharedLibs = YES
+else
+BuildSharedLibs = NO
+endif
 # ToDo later:
 # BuildStaticLibs=@BuildStaticLibs@
 
@@ -205,25 +210,6 @@ BeConservative = NO
 BuildingParallel=$(subst mp,YES,$(filter mp,$(WAYS)))
 BuildingGranSim=$(subst mg,YES,$(filter mg,$(WAYS)))
 
-# Interface file version (hi-boot files only)
-#
-# A GHC built with HscIfaceFileVersion=n will look for 
-#      M.hi-boot-n, and only then for 
-#      M.hi-boot.
-# (It'll be happy with the latter if the former doesn't exist.)
-#
-#
-# This variable is used ONLY for hi-boot files.  Its only purpose is
-# to allow you to have a single directory with multiple .hi-boot files
-# for the same module, each corresponding to a different version of
-# GHC.
-#
-# HscIfaceFileVersion is propagated to hsc via
-# compiler/main/Config.hs, which is automatically generated by
-# compiler/Makefile.
-
-HscIfaceFileVersion=6
-
 #------------------------------------------------------------------------------
 # Options for Libraries
 
@@ -513,13 +499,16 @@ INSTALL_GROUP =
 # Invocations of `install' for the four different classes
 # of targets:
 #
+CREATE_SCRIPT   = create () { touch $$1 && chmod 755 $$1 ; } && create
+CREATE_DATA     = create () { touch $$1 && chmod 644 $$1 ; } && create
 INSTALL_PROGRAM = $(INSTALL) -m 755
 INSTALL_SCRIPT  = $(INSTALL) -m 755
 INSTALL_SHLIB   = $(INSTALL) -m 755
 INSTALL_DATA    = $(INSTALL) -m 644
 INSTALL_HEADER  = $(INSTALL) -m 644
 INSTALL_MAN     = $(INSTALL) -m 644
-INSTALL_DIR     = $(MKDIRHIER)
+INSTALL_DOC     = $(INSTALL) -m 644
+INSTALL_DIR     = $(INSTALL) -m 755 -d
 
 #
 # runhaskell and hsc2hs are special, in that other compilers besides