diff --git a/Makefile b/Makefile index bd759ee06bd95d8bb69ed3952287159c8f1df6fd..7036d7c0f871c9278b07b58182e3252a3fc9a701 100644 --- a/Makefile +++ b/Makefile @@ -155,7 +155,14 @@ binary-dist:: @echo "Generating a shippable configure script.." $(MV) $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/configure-bin.in $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME)/configure.in ( cd $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME); autoconf ) - cp $(BIN_DIST_MAIN_DIR)/mk/post-install-script $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) + if test -x $(BIN_DIST_MAIN_DIR)/mk/post-install-script ; then \ + cp $(BIN_DIST_MAIN_DIR)/mk/post-install-script \ + $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) ; \ + fi + if test -x $(BIN_DIST_MAIN_DIR)/mk/post-inplace-script ; then \ + cp $(BIN_DIST_MAIN_DIR)/mk/post-inplace-script \ + $(BIN_DIST_TMPDIR)/$(BIN_DIST_NAME) ; \ + fi # # binary dist'ing the documentation. # Which documentation to build/install is hardcoded below. diff --git a/distrib/Makefile-bin.in b/distrib/Makefile-bin.in index 0fd77273033b4e36251207aad75326f47a3c1a41..747a2fd27d001a1b0c5a9e1ef13673efd846c9bb 100644 --- a/distrib/Makefile-bin.in +++ b/distrib/Makefile-bin.in @@ -177,6 +177,12 @@ CURRENT_DIR = $(shell pwd | sed 's|^//\(.\)|\1:|' ) in-place :: $(MAKE) $(MFLAGS) config-pkgs bindir=$(CURRENT_DIR)/bin/$(platform) libdir=$(CURRENT_DIR)/lib/$(platform) datadir=$(CURRENT_DIR)/share + if test -x "./post-inplace-script" ; then \ + echo "Running project-specific post-inplace script ..." ; \ + ./post-inplace-script $(platform) $(CURRENT_DIR) \ + $(package)-$(version); \ + echo "Done" ; \ + fi @echo "Finished configuring..to use, add $(CURRENT_DIR)/bin/$(platform) to your PATH." install-dirs :: diff --git a/ghc/mk/post-inplace-script b/ghc/mk/post-inplace-script new file mode 100644 index 0000000000000000000000000000000000000000..2fae09f4e14067a30dff27032175e0c3da5d8297 --- /dev/null +++ b/ghc/mk/post-inplace-script @@ -0,0 +1,9 @@ +#!/bin/sh + +# $1 is $(platform) +# $2 is root of the unpacked tarfile tree +# $3 is $(package)-$(version) ie ghc-4.11 + +echo POST_INPLACE_SCRIPT $1 $2 $3 + +bin/$1/pkgconf install "$1" "" "YES" "" "$2/lib/$1" "$2/lib/$1" "$2/lib/$1" "" "$2/lib/$1/include" "" > $2/lib/$1/package.conf