[commit: ghc] wip/angerman/llvmng: Adds distrib/Makefile from @alpmestan (833e689)
git at git.haskell.org
git at git.haskell.org
Fri Dec 8 05:31:57 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/angerman/llvmng
Link : http://ghc.haskell.org/trac/ghc/changeset/833e6890c515a2fd2668b87efbcec10d8762ed1e/ghc
>---------------------------------------------------------------
commit 833e6890c515a2fd2668b87efbcec10d8762ed1e
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date: Fri Dec 8 12:58:53 2017 +0800
Adds distrib/Makefile from @alpmestan
>---------------------------------------------------------------
833e6890c515a2fd2668b87efbcec10d8762ed1e
distrib/Makefile | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+)
diff --git a/distrib/Makefile b/distrib/Makefile
new file mode 100644
index 0000000..e806ff8
--- /dev/null
+++ b/distrib/Makefile
@@ -0,0 +1,34 @@
+MAKEFLAGS += --no-builtin-rules
+.SUFFIXES:
+
+ProjectVersion:=$(shell bin/ghc --numeric-version)
+
+include mk/install.mk
+
+define GHC_WRAPPER
+#!/bin/sh
+exec "$(libdir)/bin/ghc" -B"$(libdir)" $${1+"$$@"}
+endef
+
+export GHC_WRAPPER
+
+.PHONY: default
+default:
+ @echo 'Run "make install" to install'
+ @false
+
+.PHONY: install
+install:
+ @cp settings lib/
+ @echo $(prefix) $(bindir) $(libdir)
+ @mkdir -p $(prefix) $(libdir) $(bindir)
+ @cp -R lib/* $(libdir)/
+ # cp the rest to $(prefix) ? or maybe handle $(datadir) etc too?
+ @if [ "$(bindir)" = "$(prefix)/bin" ] || [ "$(libdir)" != "$(prefix)/lib" ]; then \
+ echo "custom bindir or libdir"; \
+ mkdir -p $(libdir)/bin; \
+ cp bin/* $(libdir)/bin/; \
+ echo "$$GHC_WRAPPER" > $(bindir)/ghc; \
+ fi
+ @echo "ghc available at $(bindir)/ghc"
+ @echo done
More information about the ghc-commits
mailing list