[project @ 2001-04-03 13:18:34 by sewardj]
authorsewardj <unknown>
Tue, 3 Apr 2001 13:18:35 +0000 (13:18 +0000)
committersewardj <unknown>
Tue, 3 Apr 2001 13:18:35 +0000 (13:18 +0000)
Clean up the post-install-script mechanism a bit, so that the script
for project is <project>/mk/post-install-script.

For project ghc, don't install pkgconf unless BIN_DIST=1.

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

index cb75190..bd759ee 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -155,7 +155,7 @@ 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)
 #
 # binary dist'ing the documentation.  
 # Which documentation to build/install is hardcoded below.
index 0c7f1b6..0fd7727 100644 (file)
@@ -189,9 +189,9 @@ install :: config-pkgs install-dirs install-bin install-libs install-datas posti
 .PHONY: install-bin install-libs install-datas postinstall
 
 postinstall:
-       if test -x "bin/$(platform)/post-install-script" ; then \
+       if test -x "./post-install-script" ; then \
                echo "Running project-specific post-install script ..." ; \
-               bin/$(platform)/post-install-script $(platform) $(prefix) \
+               ./post-install-script $(platform) $(prefix) \
                        $(package)-$(version); \
                echo "Done" ; \
        fi
index ef11e08..f6a555d 100644 (file)
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# $Id: Makefile,v 1.60 2001/04/03 11:31:39 sewardj Exp $
+# $Id: Makefile,v 1.61 2001/04/03 13:18:35 sewardj Exp $
 #
 
 TOP=..
@@ -55,7 +55,10 @@ Package.o : ../utils/ghc-pkg/Package.hs
 
 override datadir = $(libdir)
 INSTALL_DATAS += package.conf ghc-usage.txt
-INSTALL_PROGS += pkgconf post-install-script
+
+ifeq "$(BIN_DIST)" "1"
+INSTALL_PROGS += pkgconf
+endif
 
 CLEAN_FILES += pkgconf package.conf.inplace package.conf
 
diff --git a/ghc/mk/post-install-script b/ghc/mk/post-install-script
new file mode 100644 (file)
index 0000000..02e1423
--- /dev/null
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# $1 is $(platform)
+# $2 is root of final installation tree
+# $3 is $(package)-$(version) ie ghc-4.11 
+
+###echo POST_INSTALL_SCRIPT $1 $2 $3
+
+bin/$1/pkgconf install "$1" "" "YES" "" "$2/lib/$3" "$2/lib/$3" "$2/lib/$3" "" "$2/lib/$3/include" "" > $2/lib/$3/package.conf