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

git at git.haskell.org git at git.haskell.org
Wed Feb 7 06:39:59 UTC 2018


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

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

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

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

    Adds distrib/Makefile from @alpmestan


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

41d9d2ec975de39bf74c69f6b12c25ac2cd59a4c
 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