summaryrefslogtreecommitdiff
path: root/utils
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 /utils
parent51cdf3e142be88be5cf89cc79124f65b032335c4 (diff)
downloadhaskell-4d7ecf304ab398c4aed110822cd934cb6dc071e3.tar.gz
More build system changes; hasktags is now built with Cabal
Diffstat (limited to 'utils')
-rw-r--r--utils/Makefile9
-rw-r--r--utils/ghc-pkg/Makefile46
-rw-r--r--utils/hasktags/Makefile31
-rw-r--r--utils/hasktags/hasktags.cabal19
-rw-r--r--utils/hsc2hs/Makefile53
5 files changed, 34 insertions, 124 deletions
diff --git a/utils/Makefile b/utils/Makefile
index 4ecbd72b0c..9f2b1b05d1 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -3,12 +3,12 @@ include $(TOP)/mk/boilerplate.mk
ifeq "$(DOING_BIN_DIST)" "YES"
# We're doing a binary-dist, descend into a subset of the dirs.
-SUBDIRS = mkdirhier hasktags hp2ps parallel unlit runghc hpc pwd
+SUBDIRS = mkdirhier hp2ps parallel unlit runghc hpc pwd
else
ifeq "$(BootingFromHc)" "YES"
SUBDIRS = mkdependC mkdirhier runstdtest genapply genprimopcode unlit
else
-SUBDIRS = mkdependC mkdirhier runstdtest hasktags hp2ps \
+SUBDIRS = mkdependC mkdirhier runstdtest hp2ps \
installPackage parallel unlit genprimopcode genapply runghc hpc pwd
endif
ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
@@ -55,11 +55,14 @@ endif
WITH_BOOTSTRAPPING_COMPILER = ghc-pkg hsc2hs
-WITH_STAGE1 = ghc-pkg
+WITH_STAGE1 = ghc-pkg hasktags
ifneq "$(NO_INSTALL_HSC2HS)" "YES"
WITH_STAGE1 += hsc2hs
endif
+# sort removes duplicates - we don't actually care about the order
+WITH_EITHER = $(sort $(WITH_BOOTSTRAPPING_COMPILER) $(WITH_STAGE1))
+
with-bootstrapping-compiler: \
$(foreach P,$(WITH_BOOTSTRAPPING_COMPILER),with-bootstrapping-compiler.$P)
diff --git a/utils/ghc-pkg/Makefile b/utils/ghc-pkg/Makefile
index 6f62b6398e..61e4893d40 100644
--- a/utils/ghc-pkg/Makefile
+++ b/utils/ghc-pkg/Makefile
@@ -1,51 +1,13 @@
TOP=../..
-include $(TOP)/mk/boilerplate.mk
-include $(TOP)/mk/cabal-flags.mk
-
-SRC_HC_OPTS += -Wall
-
-ifeq "$(HOSTPLATFORM)" "i386-unknown-mingw32"
-INSTALL_FLAGS =
-else
-INSTALL_FLAGS = --enable-shell-wrappers
-endif
+ENABLE_SHELL_WRAPPERS = YES
+EXTRA_CLEAN = Version.hs
-default all: with-bootstrapping-compiler
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/cabal.mk
with-bootstrapping-compiler: Version.hs
- $(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: Version.hs
- $(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
- $(RM) -f Version.hs
-
-# XXX fix binary-dist
-
-##### Here down is unique to ghc-pkg
Version.hs: Makefile $(TOP)/mk/config.mk
$(RM) -f Version.hs
diff --git a/utils/hasktags/Makefile b/utils/hasktags/Makefile
index 20c52ba8d7..0f34de9174 100644
--- a/utils/hasktags/Makefile
+++ b/utils/hasktags/Makefile
@@ -1,32 +1,5 @@
+
TOP=../..
include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/cabal.mk
-# Beyond stage 1, honour any Mac OS X depolyment target options. If we use
-# these options in stage 1 we get a linker error if the bootstrap compiler is
-# for a more recent OS version
-ifeq "$(stage)" "2"
-SRC_CC_OPTS += $(MACOSX_DEPLOYMENT_CC_OPTS)
-SRC_HC_OPTS += $(addprefix -optc, $(MACOSX_DEPLOYMENT_CC_OPTS))
-SRC_LD_OPTS += $(addprefix -optl, $(MACOSX_DEPLOYMENT_LD_OPTS))
-endif
-
-# We have two version: the inplace version compiled by the bootstrap compiler
-# and the install version compiled by the stage 1 compiler
-ifeq "$(stage)" "2"
-HS_PROG = hasktags
-else
-HS_PROG = hasktags-inplace
-endif
-
-CLEAN_FILES += Main.hi
-
-SRC_HC_OPTS += -Wall
-
-INSTALL_PROGS += $(HS_PROG)
-
-binary-dist:
- $(INSTALL_DIR) $(BIN_DIST_DIR)/utils/hasktags
- $(INSTALL_DATA) Makefile $(BIN_DIST_DIR)/utils/hasktags/
- $(INSTALL_PROGRAM) $(HS_PROG) $(BIN_DIST_DIR)/utils/hasktags/
-
-include $(TOP)/mk/target.mk
diff --git a/utils/hasktags/hasktags.cabal b/utils/hasktags/hasktags.cabal
new file mode 100644
index 0000000000..045256d534
--- /dev/null
+++ b/utils/hasktags/hasktags.cabal
@@ -0,0 +1,19 @@
+Name: hasktags
+-- XXX version number:
+Version: 0.67
+Copyright: XXX
+License: BSD3
+-- XXX License-File: LICENSE
+Author: XXX
+Maintainer: XXX
+Synopsis: XXX
+Description:
+ XXX
+Category: Development
+build-type: Simple
+cabal-version: >=1.2
+
+Executable hasktags
+ Main-Is: HaskTags.hs
+ Build-Depends: haskell98, base
+
diff --git a/utils/hsc2hs/Makefile b/utils/hsc2hs/Makefile
index 66fb9deb6f..1856d27426 100644
--- a/utils/hsc2hs/Makefile
+++ b/utils/hsc2hs/Makefile
@@ -1,54 +1,7 @@
TOP=../..
-include $(TOP)/mk/boilerplate.mk
-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
-INSTALL_FLAGS = --enable-shell-wrappers
-endif
-
-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)
+ENABLE_SHELL_WRAPPERS = YES
-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
-
-# XXX fix:
-#binary-dist:
-# $(INSTALL_DIR) $(BIN_DIST_DIR)/utils/hsc2hs
-# $(INSTALL_DATA) Makefile $(BIN_DIST_DIR)/utils/hsc2hs/
-# $(INSTALL_DATA) hsc2hs.sh $(BIN_DIST_DIR)/utils/hsc2hs/
-# $(INSTALL_DATA) $(INSTALL_DATAS) $(BIN_DIST_DIR)/utils/hsc2hs/
-# $(INSTALL_PROGRAM) $(HS_PROG) $(BIN_DIST_DIR)/utils/hsc2hs/
+include $(TOP)/mk/boilerplate.mk
+include $(TOP)/mk/cabal.mk