summaryrefslogtreecommitdiff
path: root/distrib
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2007-03-10 01:25:58 +0000
committerIan Lynagh <igloo@earth.li>2007-03-10 01:25:58 +0000
commitfd96f0f738a243a4e5964aa36753ec6c28f2444a (patch)
treed5f5992b40d1c9380b8aad8b42ce111078fb4b9e /distrib
parent80a290e38a1d53f8db2120dc40f362e5e4498ce6 (diff)
downloadhaskell-fd96f0f738a243a4e5964aa36753ec6c28f2444a.tar.gz
Make building binary dists work with cabalised libraries
Diffstat (limited to 'distrib')
-rw-r--r--distrib/Makefile (renamed from distrib/Makefile-bin.in)114
-rw-r--r--distrib/Makefile-bin-vars.in62
-rw-r--r--distrib/configure-bin.ac4
3 files changed, 66 insertions, 114 deletions
diff --git a/distrib/Makefile-bin.in b/distrib/Makefile
index 6df1e056d8..77b63e5adc 100644
--- a/distrib/Makefile-bin.in
+++ b/distrib/Makefile
@@ -1,115 +1,5 @@
-#
-# @configure_input@
-#
-# Instructions for configuring an fptools package.
-#
-# There are two ways you can get started with an fptools package, either
-# by using the unpacked distribution tree in-situ or by installing the
-# package.
-#
-# Using the package directly is easy, just do `make in-place'. (The
-# distribution will *not* work straight out of the box, you'll have to do
-# this first)
-#
-# To install the package, you'll have to set one or more of the
-# following variables:
-#
-# * bindir
-# path to directory of where you want the executables
-# to be installed.
-# * libdir
-# where you want the library archives to go.
-# Note, if you specify /usr/foo/lib for libdir,
-# the library files for your fptools package will be
-# installed in /usr/foo/lib/<package>-<version>, e.g.,
-# /usr/foo/lib/ghc-3.00. If you don't want the package/version
-# directory appended, you'll have to modify $(real_libdir)
-# below.
-#
-# * datadir
-# path to where the platform-independent files will go.
-# As for libdir, the effective path for the platform-indep
-# stuff is $(datadir)/<package>-<version>. If you want
-# complete control, see $(real_datadir)
-#
-# * platform
-# the platform you're installing for. The configure script
-# makes an educated guess, so you'll only have to set this
-# if it clashes with your reality, I guess.
-#
-# * htmldir
-# where to install the HTML documentation files.
-# * pdfdir
-# where to install the PDF documentation files.
-# * psdir
-# where to install the Postscript documentation files.
-#
-# For more complete instructions, consult the INSTALL file
-# that came with the bundle, and/or consult the installation
-# documentation in one of the document directories.
-#
-# Please report any bugs, problems etc. with installing and using this bundle
-# Makefile setup to glasgow-haskell-bugs@dcs.gla.ac.uk
-#
-
-# Where the different pieces of the bundle should go:
-bindir = @bindir@
-libdir = @libdir@/$(package)-$(version)
-datadir = @datadir@/$(package)-$(version)
-
-platform = @TargetPlatform@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-# default
-htmldir = $(datadir)/html
-psdir = $(datadir)
-pdfdir = $(datadir)
-
-PERL = @PerlCmd@
-SH = /bin/sh
-RM = rm -f
-MV = mv
-CP = cp
-LN_S = @LN_S@
-CHMOD = chmod
-INSTALL = @INSTALL@
-exeext = @exeext@
-SED = @SedCmd@
-DEFAULT_TMPDIR = /tmp
-
-# sigh
-INSTALL_DIR = ./mkdirhier
-
-#
-# Set of package scripts for which you'd like a name-<version> symlink
-# to be created, i.e., create a symlink, ghc-$(version), pointing to ghc to
-# avoid version vertigo.
-#
-VERSION_SYMLINKS_FOR=$(PACKAGE_LINKS)
-
-# Binaries to install
-PACKAGE_BIN_INSTALL=$(PACKAGE_PRL_SCRIPTS) $(PACKAGE_SH_SCRIPTS)
-
-#----------end of user-serviceable parts------------
-#
-#
-# How to install the different pieces
-#
-INSTALL_BIN = $(INSTALL) $(INSTALL_BIN_OPTS)
-INSTALL_LIB = $(INSTALL) $(INSTALL_LIB_OPTS)
-INSTALL_DATA = $(INSTALL) $(INSTALL_DATA_OPTS)
-
-# What's common to all installs
-INSTALL_OPTS= $(EXTRA_INSTALL_OPTS)
-
-BIN_PERMS = 755
-LIB_PERMS = 644
-
-INSTALL_BIN_OPTS = -m $(BIN_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_BIN_OPTS)
-INSTALL_LIB_OPTS = -m $(LIB_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_LIB_OPTS)
-INSTALL_DATA_OPTS = -m $(LIB_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_DATA_OPTS)
+include Makefile-vars
.PHONY: in-place config-pkgs mk-version-symlinks install-dirs install
@@ -248,9 +138,9 @@ install-bin:
fi; \
done
-
install-libs:
(cd lib/$(platform); find . -type f -exec sh -c '$(CP) $$0 $(libdir)/$$0' {} \; )
+ $(MAKE) -C libraries install IN_BIN_DIST=1
install-datas:
for i in `(cd share; find . -type f )`; do \
diff --git a/distrib/Makefile-bin-vars.in b/distrib/Makefile-bin-vars.in
new file mode 100644
index 0000000000..53c4163606
--- /dev/null
+++ b/distrib/Makefile-bin-vars.in
@@ -0,0 +1,62 @@
+
+# Where the different pieces of the bundle should go:
+bindir = @bindir@
+libdir = @libdir@/$(package)-$(version)
+datadir = @datadir@/$(package)-$(version)
+
+platform = @TargetPlatform@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+# default
+htmldir = $(datadir)/html
+psdir = $(datadir)
+pdfdir = $(datadir)
+
+
+PERL = @PerlCmd@
+SH = /bin/sh
+RM = rm -f
+MV = mv
+CP = cp
+LN_S = @LN_S@
+CHMOD = chmod
+INSTALL = @INSTALL@
+exeext = @exeext@
+SED = @SedCmd@
+DEFAULT_TMPDIR = /tmp
+
+# sigh
+INSTALL_DIR = ./mkdirhier
+
+#
+# Set of package scripts for which you'd like a name-<version> symlink
+# to be created, i.e., create a symlink, ghc-$(version), pointing to ghc to
+# avoid version vertigo.
+#
+VERSION_SYMLINKS_FOR=$(PACKAGE_LINKS)
+
+# Binaries to install
+PACKAGE_BIN_INSTALL=$(PACKAGE_PRL_SCRIPTS) $(PACKAGE_SH_SCRIPTS)
+
+#----------end of user-serviceable parts------------
+#
+#
+# How to install the different pieces
+#
+INSTALL_BIN = $(INSTALL) $(INSTALL_BIN_OPTS)
+INSTALL_LIB = $(INSTALL) $(INSTALL_LIB_OPTS)
+INSTALL_DATA = $(INSTALL) $(INSTALL_DATA_OPTS)
+INSTALL_SCRIPT = $(INSTALL) $(INSTALL_SCRIPT_OPTS)
+
+# What's common to all installs
+INSTALL_OPTS= $(EXTRA_INSTALL_OPTS)
+
+BIN_PERMS = 755
+LIB_PERMS = 644
+
+INSTALL_BIN_OPTS = -m $(BIN_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_BIN_OPTS)
+INSTALL_LIB_OPTS = -m $(LIB_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_LIB_OPTS)
+INSTALL_DATA_OPTS = -m $(LIB_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_DATA_OPTS)
+INSTALL_SCRIPT_OPTS = -m $(BIN_PERMS) $(INSTALL_OPTS) $(EXTRA_INSTALL_SCRIPT_OPTS)
+
diff --git a/distrib/configure-bin.ac b/distrib/configure-bin.ac
index cda2cffecf..e50a50e3fb 100644
--- a/distrib/configure-bin.ac
+++ b/distrib/configure-bin.ac
@@ -5,7 +5,7 @@ dnl
#
# Is it there?
-AC_INIT(Makefile.in)
+AC_INIT(Makefile-vars.in)
exeext=''
@@ -141,7 +141,7 @@ FP_HAVE_GCC
AC_PROG_CPP
#
-AC_OUTPUT(Makefile)
+AC_OUTPUT(Makefile-vars)
echo "****************************************************"
echo "Configuration done, ready to either 'make install'"