[project @ 1997-10-13 09:44:11 by simonm]
[ghc-hetmet.git] / distrib / Makefile-bin.in
index 35744ef..5793879 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.03. If you don't want the package/version
+#     /usr/foo/lib/ghc-2.07. If you don't want the package/version
 #     directory appended, you'll have to modify $(real_libdir)
 #     below.
 #
@@ -78,14 +78,17 @@ real_libdir      = $(libdir)/$(package)-$(version)
 real_datadir     = $(datadir)/$(package)-$(version)
 
 package     = ghc
-version     = 2.07
+version     = 2.08
 PERL        = @PerlCmd@
+SH         = /bin/sh
 RM          = rm -f
 MV          = mv
 CP          = cp
 LN_S        = @LN_S@
 CHMOD       = chmod
 INSTALL            = @INSTALL@
+RAWCPP      = @RAWCPP@
+SED        = @SedCmd@
 # sigh
 INSTALL_DIR  = ./mkdirhier
 
@@ -101,10 +104,11 @@ VERSION_SYMLINKS_FOR=ghc
 # local setup/install information prepended.
 #
 PACKAGE_SCRIPTS=ghc stat2resid hstags mkdependHS
+PACKAGE_SH_SCRIPTS=happy
 PACKAGE_LIB_SCRIPTS=hscpp
 
 # Binaries to install
-PACKAGE_BINS=$(PACKAGE_SCRIPTS) hp2ps
+PACKAGE_BINS=$(PACKAGE_SCRIPTS) $(PACKAGE_SH_SCRIPTS) hp2ps
 
 #----------end of user-serviceable parts------------
 #
@@ -134,7 +138,7 @@ config-pkgs ::
           echo "Creating a configured version of $$i .."; \
           $(RM) bin/$(platform)/$(package)-$(version)/$$i.bak; \
           test -f bin/$(platform)/$(package)-$(version)/$$i && $(MV) bin/$(platform)/$(package)-$(version)/$$i bin/$(platform)/$(package)-$(version)/$$i.bak; \
-          echo "#! $(PERL)" > $$i.tmp ;                        > bin/$(platform)/$(package)-$(version)/$$i ; \
+          echo "#! $(PERL)"                                    > 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 ; \
@@ -152,10 +156,25 @@ config-pkgs ::
           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 ; \
+          echo $$"SED='$(SED)';"                >> lib/$(platform)/$(package)-$(version)/$$i ; \
+          echo $$"RAWCPP='$(RAWCPP)';"          >> 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
+       @for i in $(PACKAGE_SH_SCRIPTS); do \
+          echo "Creating a configured version of $$i .."; \
+          $(RM) bin/$(platform)/$(package)-$(version)/$$i.bak; \
+          test -f bin/$(platform)/$(package)-$(version)/$$i && $(MV) bin/$(platform)/$(package)-$(version)/$$i bin/$(platform)/$(package)-$(version)/$$i.bak; \
+          echo "#! $(SH)"                      > 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.sh >> bin/$(platform)/$(package)-$(version)/$$i; \
+          $(CHMOD) $(BIN_PERMS) bin/$(platform)/$(package)-$(version)/$$i; \
+          echo "Done."; \
+       done
 
 
 mk-version-symlinks ::
@@ -185,9 +204,13 @@ install-bin:
           $(INSTALL_BIN) bin/$(platform)/$(package)-$(version)/$$i $(bindir); \
        done;
        for i in $(VERSION_SYMLINKS_FOR) ""; do \
-          if [ "x$$i" != "x" ]; then \
-               ( cd $(bindir); $(LN_S) $$i $$i-$(version) ); \
-          fi; \
+          if [ "x$$i" != "x" ]; then           \
+               ( cd $(bindir);                 \
+                 $(RM) $$i-$(version);         \
+                 $(MV) $$i $$i-$(version);     \
+                 $(LN_S) $$i-$(version) $$i    \
+               );                              \
+          fi;                                  \
        done