summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2008-10-09 16:49:46 +0000
committerIan Lynagh <igloo@earth.li>2008-10-09 16:49:46 +0000
commitcb7f210f937bafb0f552259c23a28a037ddea4ce (patch)
treebc71f400528dbfc8bc859a0ec3c7d1bd94a8baab /driver
parentbad6e5e640ef86163afeace84628bde1e0716c74 (diff)
downloadhaskell-cb7f210f937bafb0f552259c23a28a037ddea4ce.tar.gz
Install a versioned ghc-pkg script; fixes trac #2662
Diffstat (limited to 'driver')
-rw-r--r--driver/Makefile2
-rw-r--r--driver/ghc-pkg/Makefile18
2 files changed, 19 insertions, 1 deletions
diff --git a/driver/Makefile b/driver/Makefile
index 5207214068..016eab2f44 100644
--- a/driver/Makefile
+++ b/driver/Makefile
@@ -7,7 +7,7 @@
TOP=..
include $(TOP)/mk/boilerplate.mk
-SUBDIRS = mangler split ghc ghci runhaskell
+SUBDIRS = mangler split ghc ghc-pkg ghci runhaskell
INPLACE_PKG_CONF = $(INPLACE_DATA_DIR)/package.conf
# Used to signal that we are inplace, as opposed to installed:
diff --git a/driver/ghc-pkg/Makefile b/driver/ghc-pkg/Makefile
new file mode 100644
index 0000000000..2ee42d56b1
--- /dev/null
+++ b/driver/ghc-pkg/Makefile
@@ -0,0 +1,18 @@
+TOP=../..
+include $(TOP)/mk/boilerplate.mk
+
+ifneq "$(TARGETPLATFORM)" "i386-unknown-mingw32"
+SCRIPT_DIR = $(DESTDIR)$(bindir)
+SCRIPT_BASE = ghc-pkg
+SCRIPT_VERSIONED_BASE = $(SCRIPT_BASE)-$(ProjectVersion)
+SCRIPT = $(SCRIPT_DIR)/$(SCRIPT_BASE)
+SCRIPT_VERSIONED = $(SCRIPT_DIR)/$(SCRIPT_VERSIONED_BASE)
+
+install::
+ mv $(SCRIPT) $(SCRIPT_VERSIONED)
+ ln -s $(SCRIPT_VERSIONED_BASE) $(SCRIPT)
+endif
+
+include $(TOP)/mk/bindist.mk
+
+include $(TOP)/mk/target.mk