summaryrefslogtreecommitdiff
path: root/mk
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-07-18 15:34:59 +0000
committerIan Lynagh <igloo@earth.li>2008-07-18 15:34:59 +0000
commit4d7ecf304ab398c4aed110822cd934cb6dc071e3 (patch)
treeb9520f76ea6d3fa8b48484b31ee676ecd11219f9 /mk
parent51cdf3e142be88be5cf89cc79124f65b032335c4 (diff)
downloadhaskell-4d7ecf304ab398c4aed110822cd934cb6dc071e3.tar.gz
More build system changes; hasktags is now built with Cabal
Diffstat (limited to 'mk')
-rw-r--r--mk/cabal.mk55
1 files changed, 55 insertions, 0 deletions
diff --git a/mk/cabal.mk b/mk/cabal.mk
new file mode 100644
index 0000000000..5e0de0d94d
--- /dev/null
+++ b/mk/cabal.mk
@@ -0,0 +1,55 @@
+
+include $(TOP)/mk/cabal-flags.mk
+
+# XXX We would like to turn this on, but Cabal generates paths files
+# that are not -Wall clean!
+# SRC_HC_OPTS += -Wall
+
+ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
+INSTALL_FLAGS =
+else
+ifeq "$(ENABLE_SHELL_WRAPPERS)" "YES"
+INSTALL_FLAGS = --enable-shell-wrappers
+else
+INSTALL_FLAGS =
+endif
+endif
+
+.PHONY: default all with-bootstrapping-compiler with-stage-1 clean distclean
+
+default all: with-bootstrapping-compiler
+
+with-bootstrapping-compiler:
+ $(CABAL) configure --distpref dist-inplace \
+ $(INPLACE_DIRS_CONFIGURE_FLAGS) \
+ $(USE_BOOT_CONFIGURE_FLAGS) \
+ $(COMMON_CONFIGURE_FLAGS)
+ $(CABAL) build --distpref dist-inplace $(BUILD_FLAGS)
+ $(CABAL) install --distpref dist-inplace $(INSTALL_FLAGS)
+
+with-stage-1:
+ $(CABAL) configure --distpref dist-install \
+ $(INSTALL_DIRS_CONFIGURE_FLAGS) \
+ $(USE_STAGE1_CONFIGURE_FLAGS) \
+ $(COMMON_CONFIGURE_FLAGS)
+ $(CABAL) build --distpref dist-install $(BUILD_FLAGS)
+
+install:
+ $(INSTALL_PACKAGE) install UNUSED UNUSED '$(DESTDIR)' '$(prefix)' \
+ '$(prefix)' '$(bindir)' '$(libdir)' \
+ '$(libexecdir)' '$(dynlibdir)' '$(datadir)' \
+ '$(docdir)' '$(htmldir)' '$(haddockdir)' \
+ --distpref dist-install \
+ $(INSTALL_FLAGS)
+
+clean: distclean
+
+distclean:
+ -$(CABAL) clean --distpref dist-inplace
+ -$(CABAL) clean --distpref dist-install
+ifneq "$(EXTRA_CLEAN)" ""
+ $(RM) -f $(EXTRA_CLEAN)
+endif
+
+# XXX fix binary-dist
+