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-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
(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.
WINDRES = @WINDRES@
YACC = @YACC@
ZIP = @ZIP@
+FLEXLEXER_PATH = @FLEXLEXER_PATH@
STEPMAKE_BISON(OPTIONAL, 1.29)
STEPMAKE_FLEX(REQUIRED)
STEPMAKE_FLEXLEXER(REQUIRED)
+STEPMAKE_FLEXLEXER_LOCATION
AC_LANG_C
STEPMAKE_LOCALE
STEPMAKE_GETTEXT
# guile executable for some scripts
STEPMAKE_GUILE(OPTIONAL)
+
# perl for help2man.
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)
# Gather requirements and generate output.
STEPMAKE_END
-
test -n "$CONFIGURATION" && mc=" conf=$CONFIGURATION" || mc=""
cat <<EOF
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
# 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
])
+
+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)