[commit: ghc] wip/angerman/llvmng: Adds distrib/Makefile from @alpmestan (ba302ba)

git at git.haskell.org git at git.haskell.org
Tue Jan 9 02:40:31 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/angerman/llvmng
Link       : http://ghc.haskell.org/trac/ghc/changeset/ba302ba1d317d18f87a29978345566d1d891845f/ghc

>---------------------------------------------------------------

commit ba302ba1d317d18f87a29978345566d1d891845f
Author: Moritz Angermann <moritz.angermann at gmail.com>
Date:   Fri Dec 8 12:58:53 2017 +0800

    Adds distrib/Makefile from @alpmestan


>---------------------------------------------------------------

ba302ba1d317d18f87a29978345566d1d891845f
 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