[project @ 1997-05-19 06:25:00 by sof]
[ghc-hetmet.git] / distrib / Makefile-bin.in
index 9243850..6cb90be 100644 (file)
@@ -22,7 +22,7 @@
 #     Note, if you specify /usr/foo/lib for libdir,
 #     the library files for your fptools package will be
 #     installed in  /usr/foo/lib/<package>-<version>, e.g.,
-#     /usr/foo/lib/ghc-2.02. If you don't want the package/version
+#     /usr/foo/lib/ghc-2.03. If you don't want the package/version
 #     directory appended, you'll have to modify $(real_libdir)
 #     below.
 #
@@ -78,11 +78,11 @@ real_libdir      = $(libdir)/$(package)-$(version)
 real_datadir     = $(datadir)/$(package)-$(version)
 
 package     = ghc
-version     = 2.02
+version     = 2.03
 PERL        = @PerlCmd@
 RM          = rm -f
 MV          = mv
-CP          = cp -f
+CP          = cp
 LN_S        = @LN_S@
 CHMOD       = chmod
 INSTALL            = @INSTALL@
@@ -91,7 +91,7 @@ INSTALL_DIR  = ./mkdirhier
 
 #
 # Set of package scripts for which you'd like a name-<version> symlink
-# to be created, i.e., create a symlink, ghc-2.02, pointing to ghc to
+# to be created, i.e., create a symlink, ghc-$(version), pointing to ghc to
 # avoid version vertigo.
 #
 VERSION_SYMLINKS_FOR=ghc
@@ -101,6 +101,7 @@ VERSION_SYMLINKS_FOR=ghc
 # local setup/install information prepended.
 #
 PACKAGE_SCRIPTS=ghc stat2resid hstags mkdependHS
+PACKAGE_LIB_SCRIPTS=hscpp
 
 # Binaries to install
 PACKAGE_BINS=$(PACKAGE_SCRIPTS) hp2ps
@@ -137,11 +138,26 @@ config-pkgs ::
           echo "      if $$""running_under_some_shell;"                  >> bin/$(platform)/$(package)-$(version)/$$i; \
           echo $$"bindir='$(bindir)';"                                   >> bin/$(platform)/$(package)-$(version)/$$i; \
           echo $$"libdir='$(real_libdir)';"                              >> bin/$(platform)/$(package)-$(version)/$$i; \
+          echo $$"libexecdir='$(real_libdir)';"                              >> bin/$(platform)/$(package)-$(version)/$$i; \
           echo $$"datadir='$(real_datadir)';"                            >> bin/$(platform)/$(package)-$(version)/$$i; \
           cat bin/$(platform)/$(package)-$(version)/$$i.prl              >> bin/$(platform)/$(package)-$(version)/$$i; \
           $(CHMOD) $(BIN_PERMS) bin/$(platform)/$(package)-$(version)/$$i; \
           echo "Done."; \
        done
+       @for i in $(PACKAGE_LIB_SCRIPTS); do \
+          echo "Creating a configured version of $$i .."; \
+          $(RM) lib/$(platform)/$(package)-$(version)/$$i.bak; \
+          test -f lib/$(platform)/$(package)-$(version)/$$i && $(MV) lib/$(platform)/$(package)-$(version)/$$i lib/$(platform)/$(package)-$(version)/$$i.bak; \
+          echo "eval 'exec $(PERL) -S $$$""0 $$""{1+\"$$$""@\"}'"         > lib/$(platform)/$(package)-$(version)/$$i; \
+          echo "      if $$""running_under_some_shell;"                  >> lib/$(platform)/$(package)-$(version)/$$i; \
+          echo $$"bindir='$(bindir)';"                                   >> lib/$(platform)/$(package)-$(version)/$$i; \
+          echo $$"libdir='$(real_libdir)';"                              >> lib/$(platform)/$(package)-$(version)/$$i; \
+          echo $$"libexecdir='$(real_libdir)';"                              >> lib/$(platform)/$(package)-$(version)/$$i; \
+          echo $$"datadir='$(real_datadir)';"                            >> lib/$(platform)/$(package)-$(version)/$$i; \
+          cat lib/$(platform)/$(package)-$(version)/$$i.prl              >> lib/$(platform)/$(package)-$(version)/$$i; \
+          $(CHMOD) $(BIN_PERMS) lib/$(platform)/$(package)-$(version)/$$i; \
+          echo "Done."; \
+       done
 
 #
 # The vaguely funky eval 'exec ...' echo line above *might* be
@@ -168,7 +184,7 @@ in-place ::
 install-dirs ::
        $(INSTALL_DIR) $(bindir)
        (cd lib/$(platform)/$(package)-$(version); find . -type d -exec sh -c '../../../$(INSTALL_DIR) $$0 $(real_libdir)/$$0' {} \; )
-       (cd share/$(package)-$(version); find . -type d -exec sh -c '../../$(INSTALL_DIR) $$0 $(real_datadir)/$$0' {} \; )
+       (cd share/$(package)-$(version); find . -type d -exec sh -c '../../$(INSTALL_DIR) $(real_datadir)/$$0' {} \; )
 
 install :: config-pkgs mk-version-symlinks install-dirs install-bin install-libs install-datas