[commit: ghc] wip/angerman/llvmng: Adds distrib/Makefile from @alpmestan (8cad12b)
git at git.haskell.org
git at git.haskell.org
Fri Dec 8 05:22:52 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : wip/angerman/llvmng
Link : http://ghc.haskell.org/trac/ghc/changeset/8cad12bb5778627b31a7d7d8794c04e6de7993a8/ghc
>---------------------------------------------------------------
commit 8cad12bb5778627b31a7d7d8794c04e6de7993a8
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date: Fri Dec 8 12:58:53 2017 +0800
Adds distrib/Makefile from @alpmestan
>---------------------------------------------------------------
8cad12bb5778627b31a7d7d8794c04e6de7993a8
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