[project @ 2001-04-03 15:08:35 by sewardj]
authorsewardj <unknown>
Tue, 3 Apr 2001 15:08:35 +0000 (15:08 +0000)
committersewardj <unknown>
Tue, 3 Apr 2001 15:08:35 +0000 (15:08 +0000)
Fix up make-inplace for binary distribs.

Makefile
distrib/Makefile-bin.in
ghc/mk/post-inplace-script [new file with mode: 0644]

index bd759ee..7036d7c 100644 (file)
--- 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.
index 0fd7727..747a2fd 100644 (file)
@@ -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 (file)
index 0000000..2fae09f
--- /dev/null
@@ -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