Sven Panne writes:
> After grabbing the 2.06 sources with happy-1.3 included, one has a classical
> hen-and-egg-problem: ghc-2.06 needs happy-1.3, but happy-1.3 needs ghc-2.06!
>
Yes, the happy/src/Makefile included (from the repository) was
unfortunately not 100% up-to-date. Apply the patch below and problem
solved (I hope.) The patch also includes fixes for a minor
configure problem related to happy.
> Other small glitches:
>
> * fptools/configure is only readable/executable, so autoconf can't overwrite
> it. Solution: "chmod +w fptools/configure" or even "rm fptools/configure"
>
Yes, no reason why it shouldn't be writeable.
> * Happy searches the *buildtree* for its templates. Excerpt from
> fptools/happy/src/Makefile: HAPPYLIB = $(FPTOOLS_TOP_ABS)/happy/templates
>
As long as you don't install, that should be cool...
--Sigbjorn (stealthily updating ghc-2.06-src.tar.gz to include these patches.)
*** fptools/happy/src/Makefile Fri Sep 12 11:25:52 1997
--- fptools/happy/src/Makefile Wed Sep 10 13:07:52 1997
***************
*** 38,43 ****
--- 38,49 ----
boot :: Version.hs
+ boot ::
+ if [ -d $(FPTOOLS_TOP)/ghc ]; then \
+ (cd $(FPTOOLS_TOP)/ghc/driver && $(MAKE) boot); \
+ (cd $(FPTOOLS_TOP)/ghc/utils/mkdependHS && $(MAKE) boot) \
+ fi
+
Version.hs : Makefile
@-rm -f Version.hs-NEW
@echo "module Version where" > Version.hs-NEW
*** fptools/aclocal.m4.~7~ Tue Sep 9 19:10:30 1997
--- fptools/aclocal.m4 Fri Sep 12 11:49:30 1997
***************
*** 104,109 ****
--- 104,115 ----
fi;
])
HappyVersion=$ac_cv_happy_version;
+ if test x"$HappyCmd" != x && expr "$HappyVersion" \< "1.3" 2>&1 >/dev/null; then
+ echo " Happy Version 1.3 or later is required to compile GHC."
+ echo " Using the Happy sources in the tree.";
+ HappyCmd=""
+ AC_SUBST(HappyCmd)
+ fi;
AC_SUBST(HappyVersion)
])
*** fptools/configure.in.~6~ Tue Sep 9 19:10:32 1997
--- fptools/configure.in Fri Sep 12 11:45:13 1997
***************
*** 388,398 ****
dnl ** check for installed happy binary + version
#
AC_HAPPY
- if expr $HappyVersion \< "1.3" >/dev/null; then
- echo " Happy Version 1.3 or later is required to compile GHC."
- echo " Using the Happy sources in the tree.";
- HappyCmd=""
- fi;
#
#
--- 388,393 ----