]> git.donarmstrong.com Git - lilypond.git/commitdiff
* Documentation/topdocs/INSTALL.texi (Top): remove Flex
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 14 May 2005 23:58:43 +0000 (23:58 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sat, 14 May 2005 23:58:43 +0000 (23:58 +0000)
requirement.

* stepmake/aclocal.m4: STEPMAKE_FLEXLEXER_LOCATION: new
function. Figure out where FlexLexer.h lives

* lily/GNUmakefile (OUT_DIST_FILES): dist lexer.cc and FlexLexer.h

ChangeLog
Documentation/topdocs/INSTALL.texi
config.make.in
configure.in
lily/GNUmakefile
stepmake/aclocal.m4

index 3fee7dbd95164ebeade9c9004c9d3f920604ace7..24bca3cda16901c4129dabc6667593ef7f51d10a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2005-05-15  Han-Wen Nienhuys  <hanwen@xs4all.nl>
+
+       * Documentation/topdocs/INSTALL.texi (Top): remove Flex
+       requirement.
+
+       * stepmake/aclocal.m4: STEPMAKE_FLEXLEXER_LOCATION: new
+       function. Figure out where FlexLexer.h lives
+
+       * lily/GNUmakefile (OUT_DIST_FILES): dist lexer.cc and FlexLexer.h
+       
 2005-05-14  Jan Nieuwenhuizen  <janneke@gnu.org>
 
        * scripts/lilypond-invoke-editor.scm (dissect-uri): Handle URIs
index ab6195654f0d9ea4791d6f98e6ba0ce907fd2764..6055252f165bedb2c36c207afd0224ceca0416c7 100644 (file)
@@ -82,13 +82,6 @@ work.
 (version 1.6.5 or newer).  If you are installing binary packages, you
 may need to install guile-devel or guile-dev or libguile-dev too.
 
-@item @uref{http://www.gnu.org/software/flex/,Flex} (version 2.5.4a or newer).
-
-WARNING: plain Flex 2.5.4(a) generates invalid C++ code.  GCC 3.x
-chokes on this.  If you wish to use GCC 3.x, make sure that your
-distribution supports g++ 3.x and flex.  For workarounds, see
-lexer-gcc-3.1.sh in the source directory.
-
 @item @TeX{}.
 
 @TeX{} is used as an optional output backend.
index 7a56d7bdc3d443409cf497cc913d831d6b0ceebc..a5631d21f40469bd63a1e849163b2534878b2a20 100644 (file)
@@ -111,3 +111,4 @@ TTFTOOL_ENDIAN = @TTFTOOL_ENDIAN@
 WINDRES = @WINDRES@
 YACC = @YACC@
 ZIP = @ZIP@
+FLEXLEXER_PATH = @FLEXLEXER_PATH@
index 2f68128636df8a0d58bdbb67d5998ebcabd6b9f8..8507283289c64a4bbc637c7421cf9ddba2802577 100644 (file)
@@ -44,6 +44,7 @@ STEPMAKE_DLOPEN
 STEPMAKE_BISON(OPTIONAL, 1.29)
 STEPMAKE_FLEX(REQUIRED)
 STEPMAKE_FLEXLEXER(REQUIRED)
+STEPMAKE_FLEXLEXER_LOCATION
 AC_LANG_C
 STEPMAKE_LOCALE
 STEPMAKE_GETTEXT
@@ -91,6 +92,7 @@ STEPMAKE_WINDOWS
 
 # guile executable for some scripts
 STEPMAKE_GUILE(OPTIONAL)
+
 # perl for help2man.
 STEPMAKE_PERL(OPTIONAL)
 
@@ -100,7 +102,6 @@ STEPMAKE_PERL(OPTIONAL)
 # makeinfo -- but hopefully won't report makeinfo problems.
 STEPMAKE_PROGS(MAKEINFO, makeinfo, REQUIRED, 4.7)
 
-
 if test "$optimise_b" = yes; then
     DEFINES="$DEFINES -DSTRING_UTILS_INLINED"
     AC_DEFINE(STRINGS_UTILS_INLINED)
@@ -111,7 +112,6 @@ AC_DEFINE_UNQUOTED(FLOWER_VERSION, "${FULL_FLOWER_VERSION}")
 # Gather requirements and generate output.
 STEPMAKE_END
 
-
 test -n "$CONFIGURATION" && mc=" conf=$CONFIGURATION" || mc=""
 
 cat <<EOF
index 1e07662bacff13601de67884581daf47a4887ca0..8e8025db6dcab9ec2372cddd6d9b19905c24a444 100644 (file)
@@ -11,7 +11,7 @@ MODULE_CXXFLAGS=
 HELP2MAN_EXECS = lilypond
 STEPMAKE_TEMPLATES=c c++ executable po help2man
 
-OUT_DIST_FILES=$(addprefix $(outdir)/,parser.cc parser.hh)
+OUT_DIST_FILES=$(addprefix $(outdir)/,parser.cc parser.hh FlexLexer.h lexer.cc)
 
 include $(depth)/make/stepmake.make 
 
@@ -44,9 +44,14 @@ default:
 
 # force these: Make can't know these have to be generated in advance
 $(outdir)/lily-parser.o: $(outdir)/parser.hh
-$(outdir)/lily-lexer.o: $(outdir)/parser.hh
+$(outdir)/lily-lexer.o: $(outdir)/parser.hh $(outdir)/FlexLexer.h
 $(outdir)/lexer.o: $(outdir)/parser.hh $(outdir)/version.hh
 
+$(outdir)/FlexLexer.h: $(FLEXLEXER_PATH)/FlexLexer.h
+       cp $<  $@
+
+
+
 $(outdir)/general-scheme.o: $(outdir)/version.hh
 $(outdir)/kpath.o: $(outdir)/version.hh
 $(outdir)/lily-guile.o: $(outdir)/version.hh
index 6a6b2e3815af7996a545c28066e645f8b1419c09..e35b8625a1109df9035b63d2d18d7849e71e18b3 100644 (file)
@@ -410,6 +410,18 @@ class yy_flex_lexer: public yyFlexLexer
 ])
   
 
+
+AC_DEFUN(STEPMAKE_FLEXLEXER_LOCATION, [
+       AC_MSG_CHECKING([FlexLexer.h path])
+
+       # ugh. 
+       FLEXLEXER_PATH=`echo '#include <FlexLexer.h>' | $CXX -E - | \
+         sed 's!# 1 "\(.*\)FlexLexer.h"!@FLEXLEXER@\1@@!g' | grep '@@' | \
+         sed 's!.*@FLEXLEXER@\(.*\)@@.*$!\1!g' ` >& /dev/null
+       AC_SUBST(FLEXLEXER_PATH)
+        AC_MSG_RESULT($FLEXLEXER_PATH)
+])
+
 AC_DEFUN(STEPMAKE_GCC, [
     if test "$GCC" = "yes"; then
         STEPMAKE_CHECK_VERSION(CC, $1, $2)