From 0147f8cce1d6c972de066df2da627206bb8b2e8d Mon Sep 17 00:00:00 2001 From: sewardj Date: Tue, 3 Apr 2001 15:08:35 +0000 Subject: [PATCH] [project @ 2001-04-03 15:08:35 by sewardj] Fix up make-inplace for binary distribs. --- Makefile | 9 ++++++++- distrib/Makefile-bin.in | 6 ++++++ ghc/mk/post-inplace-script | 9 +++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) create mode 100644 ghc/mk/post-inplace-script diff --git a/Makefile b/Makefile index bd759ee..7036d7c 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 0fd7727..747a2fd 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 0000000..2fae09f --- /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 -- 1.7.10.4