aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2009-07-05 16:50:35 +0000
committerIan Lynagh <igloo@earth.li>2009-07-05 16:50:35 +0000
commitf3d2dd5e9459683810c7292e39690f0472891224 (patch)
treea694464c6e3bced9b01d0f6e2a4075fecc482113 /Makefile
parent824a2fd3ee90c7e8d92b12fcc362bc81dd8af404 (diff)
Update Makefile for the new GHC build system
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile84
1 files changed, 15 insertions, 69 deletions
diff --git a/Makefile b/Makefile
index b08cea41..16e03bad 100644
--- a/Makefile
+++ b/Makefile
@@ -1,69 +1,15 @@
-
-TOP=../..
-include $(TOP)/mk/boilerplate.mk
-
-ENABLE_SHELL_WRAPPERS = YES
-EXTRA_INPLACE_CONFIGURE_FLAGS += --flags=in-ghc-tree
-EXTRA_STAGE2_CONFIGURE_FLAGS += --flags=in-ghc-tree
-EXTRA_STAGE2_CONFIGURE_FLAGS += --datasubdir=.
-# If we are profiling GHC then we didn't bother to build the GHC API for
-# profiling, so we need to use profiling when building haddock
-ifeq "$(GhcProfiled)" "YES"
-EXTRA_STAGE2_CONFIGURE_FLAGS += --disable-library-for-ghci
-EXTRA_STAGE2_CONFIGURE_FLAGS += --disable-library-vanilla
-EXTRA_STAGE2_CONFIGURE_FLAGS += --enable-library-profiling
-EXTRA_STAGE2_CONFIGURE_FLAGS += --enable-executable-profiling
-endif
-
-# Ideally we'd automatically find these from the .cabal file:
-BINDIST_EXTRAS += html/haddock-DEBUG.css \
- html/haddock.css \
- html/haddock-util.js \
- html/haskell_icon.gif \
- html/minus.gif \
- html/plus.gif
-
-include $(TOP)/mk/cabal.mk
-
-# bindist.mk isn't expecting a library to be in the same package as an
-# executable, so we have to help it out
-LIB_DIST_DIR = $(EXE_DIST_DIR)
-
-SRC_HC_OPTS += -w
-
-.PHONY: install-inplace
-
-INPLACE_PKG_CONF = $(INPLACE_DATA_DIR)/package.conf
-
-ifneq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
-INSTALL_INPLACE_FLAGS += --enable-shell-wrappers
-endif
-
-ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
-INPLACE_DATADIR = '$$prefix'
-else
-INPLACE_DATADIR = '$$prefix/share'
-endif
-
-
-ifeq "$(BuildSharedLibs)" "YES"
-DYN_FLAGS = --ghc-option=-dynamic
-endif
-
-install-inplace:
- $(INSTALL_PACKAGE) install '$(GHC_PKG_PROG)' '$(INPLACE_PKG_CONF)' '' \
- '$(FPTOOLS_TOP_ABS)/utils/haddock/install-inplace' \
- '$(FPTOOLS_TOP_ABS)/utils/haddock/install-inplace' \
- '$$prefix/bin' \
- '$$prefix/lib' \
- '$$prefix/libexec' \
- '$$prefix/dynlib' \
- $(INPLACE_DATADIR) \
- '$$prefix/doc' \
- '$$prefix/html' \
- '$$prefix/haddock' \
- --distpref dist-install \
- $(INSTALL_INPLACE_FLAGS)
-ifeq "$(BuildSharedLibs)" "YES"
- mv dist-install/build/haddock/haddock.dyn dist-install/build/haddock/haddock # remove the wrapper
-endif \ No newline at end of file
+# -----------------------------------------------------------------------------
+#
+# (c) 2009 The University of Glasgow
+#
+# This file is part of the GHC build system.
+#
+# To understand how the build system works and how to modify it, see
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Architecture
+# http://hackage.haskell.org/trac/ghc/wiki/Building/Modifying
+#
+# -----------------------------------------------------------------------------
+
+dir = utils/haddock
+TOP = ../..
+include $(TOP)/mk/sub-makefile.mk