From f177a76010d19ce4a413640978a701fa244c4f9b Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Tue, 16 Jun 2009 14:06:40 +0000 Subject: avoid using lex/flex library, always define own yywrap() git-svn-id: svn://tug.org/texlive/trunk@13773 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/detex/ChangeLog | 4 ++ Build/source/texk/detex/Makefile.am | 2 +- Build/source/texk/detex/Makefile.in | 2 +- Build/source/texk/lacheck/ChangeLog | 4 ++ Build/source/texk/lacheck/Makefile.am | 2 - Build/source/texk/lacheck/Makefile.in | 3 -- Build/source/texk/web2c/omegafonts/ChangeLog | 4 ++ Build/source/texk/web2c/omegafonts/Makefile.am | 2 +- Build/source/texk/web2c/omegafonts/Makefile.in | 5 +- Build/source/texk/web2c/otps/ChangeLog | 5 ++ Build/source/texk/web2c/otps/Makefile.am | 12 ++--- Build/source/texk/web2c/otps/Makefile.in | 13 +++-- Build/source/texk/web2c/otps/otp-lexer.c | 66 ++++++++++++++------------ Build/source/texk/web2c/otps/otp-lexer.l | 6 +++ 14 files changed, 78 insertions(+), 52 deletions(-) diff --git a/Build/source/texk/detex/ChangeLog b/Build/source/texk/detex/ChangeLog index 6ebe6f86495..cc025cb7c9f 100644 --- a/Build/source/texk/detex/ChangeLog +++ b/Build/source/texk/detex/ChangeLog @@ -1,3 +1,7 @@ +2009-06-16 Peter Breitenlohner + + * Makefile.am: detex.l provides yywrap, no need for $(LEXLIB). + 2009-06-12 Peter Breitenlohner * Makefile.am (AM_CFLAGS): enable compiler warnings. diff --git a/Build/source/texk/detex/Makefile.am b/Build/source/texk/detex/Makefile.am index fd42c707fa5..22905568146 100644 --- a/Build/source/texk/detex/Makefile.am +++ b/Build/source/texk/detex/Makefile.am @@ -18,7 +18,7 @@ bin_PROGRAMS = detex detex_SOURCES = detex.h detex.l -LDADD = $(LEXLIB) $(KPATHSEA_LIBS) +LDADD = $(KPATHSEA_LIBS) detex_DEPENDENCIES = $(KPATHSEA_DEPEND) diff --git a/Build/source/texk/detex/Makefile.in b/Build/source/texk/detex/Makefile.in index 4b83d9d4719..a01c09a4a58 100644 --- a/Build/source/texk/detex/Makefile.in +++ b/Build/source/texk/detex/Makefile.in @@ -258,7 +258,7 @@ INCLUDES = $(KPATHSEA_INCLUDES) AM_CPPFLAGS = -DKPATHSEA AM_CFLAGS = $(WARNING_CFLAGS) detex_SOURCES = detex.h detex.l -LDADD = $(LEXLIB) $(KPATHSEA_LIBS) +LDADD = $(KPATHSEA_LIBS) detex_DEPENDENCIES = $(KPATHSEA_DEPEND) dist_man1_MANS = detex.man dist_check_SCRIPTS = detex.test diff --git a/Build/source/texk/lacheck/ChangeLog b/Build/source/texk/lacheck/ChangeLog index 31197858515..a181c05412b 100644 --- a/Build/source/texk/lacheck/ChangeLog +++ b/Build/source/texk/lacheck/ChangeLog @@ -1,3 +1,7 @@ +2009-06-16 Peter Breitenlohner + + * Makefile.am: lacheck.l provides yywrap, no need for $(LEXLIB). + 2009-06-12 Peter Breitenlohner * Makefile.am (AM_CFLAGS): enable compiler warnings. diff --git a/Build/source/texk/lacheck/Makefile.am b/Build/source/texk/lacheck/Makefile.am index 7954489146a..a3b9c05e491 100644 --- a/Build/source/texk/lacheck/Makefile.am +++ b/Build/source/texk/lacheck/Makefile.am @@ -11,8 +11,6 @@ bin_PROGRAMS = lacheck lacheck_SOURCES = lacheck.l -LDADD = $(LEXLIB) - nodist_man1_MANS = lacheck.1 lacheck.1: lacheck.man diff --git a/Build/source/texk/lacheck/Makefile.in b/Build/source/texk/lacheck/Makefile.in index 7b3cd43ea52..5263e497db1 100644 --- a/Build/source/texk/lacheck/Makefile.in +++ b/Build/source/texk/lacheck/Makefile.in @@ -74,8 +74,6 @@ PROGRAMS = $(bin_PROGRAMS) am_lacheck_OBJECTS = lacheck.$(OBJEXT) lacheck_OBJECTS = $(am_lacheck_OBJECTS) lacheck_LDADD = $(LDADD) -am__DEPENDENCIES_1 = -lacheck_DEPENDENCIES = $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp am__depfiles_maybe = depfiles @@ -254,7 +252,6 @@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I ../../m4 AM_CFLAGS = $(WARNING_CFLAGS) lacheck_SOURCES = lacheck.l -LDADD = $(LEXLIB) nodist_man1_MANS = lacheck.1 EXTRA_DIST = lacheck.man test.tex test.out lacheck.hlp make_vms.com CLEANFILES = lacheck.1 test.xout diff --git a/Build/source/texk/web2c/omegafonts/ChangeLog b/Build/source/texk/web2c/omegafonts/ChangeLog index b5d76862253..3bf7b5d35c7 100644 --- a/Build/source/texk/web2c/omegafonts/ChangeLog +++ b/Build/source/texk/web2c/omegafonts/ChangeLog @@ -1,3 +1,7 @@ +2009-06-16 Peter Breitenlohner + + * Makefile.am: pl-lexer.l provides yywrap, no need for $(LEXLIB). + 2009-06-02 Peter Breitenlohner * dimen_routines.c, manifests.h: rename INFINITY -> WEB_INFINITY, diff --git a/Build/source/texk/web2c/omegafonts/Makefile.am b/Build/source/texk/web2c/omegafonts/Makefile.am index ded304edd66..6fa46691067 100644 --- a/Build/source/texk/web2c/omegafonts/Makefile.am +++ b/Build/source/texk/web2c/omegafonts/Makefile.am @@ -62,7 +62,7 @@ omfonts_SOURCES = \ print_routines.c \ print_routines.h -LDADD = $(LEXLIB) $(proglib) $(KPATHSEA_LIBS) +LDADD = $(proglib) $(KPATHSEA_LIBS) DISTCLEANFILES = pl-parser.output diff --git a/Build/source/texk/web2c/omegafonts/Makefile.in b/Build/source/texk/web2c/omegafonts/Makefile.in index 55cd431787b..4e58397de99 100644 --- a/Build/source/texk/web2c/omegafonts/Makefile.in +++ b/Build/source/texk/web2c/omegafonts/Makefile.in @@ -87,8 +87,7 @@ am_omfonts_OBJECTS = char_routines.$(OBJEXT) dimen_routines.$(OBJEXT) \ omfonts_OBJECTS = $(am_omfonts_OBJECTS) omfonts_LDADD = $(LDADD) am__DEPENDENCIES_1 = -omfonts_DEPENDENCIES = $(am__DEPENDENCIES_1) $(proglib) \ - $(am__DEPENDENCIES_1) +omfonts_DEPENDENCIES = $(proglib) $(am__DEPENDENCIES_1) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/../../build-aux/depcomp am__depfiles_maybe = depfiles @@ -334,7 +333,7 @@ omfonts_SOURCES = \ print_routines.c \ print_routines.h -LDADD = $(LEXLIB) $(proglib) $(KPATHSEA_LIBS) +LDADD = $(proglib) $(KPATHSEA_LIBS) DISTCLEANFILES = pl-parser.output tests/Cherokee.tfm \ tests/OCherokee.ofm tests/OCherokee.opl tests/OCherokee.ovf \ tests/xCherokee.pl tests/xOCherokee.ofm tests/xOCherokee.opl \ diff --git a/Build/source/texk/web2c/otps/ChangeLog b/Build/source/texk/web2c/otps/ChangeLog index 57d0e5b981f..249d89de62b 100644 --- a/Build/source/texk/web2c/otps/ChangeLog +++ b/Build/source/texk/web2c/otps/ChangeLog @@ -1,3 +1,8 @@ +2009-06-16 Peter Breitenlohner + + * otp-lexer.l (yywrap): define as static function. + * Makefile.am: no more need for $(LEXLIB). + 2008-01-29 Peter Breitenlohner * Makefile.in: Add @configure_input@ line. diff --git a/Build/source/texk/web2c/otps/Makefile.am b/Build/source/texk/web2c/otps/Makefile.am index 5ecf9e13710..9629e5b1c22 100644 --- a/Build/source/texk/web2c/otps/Makefile.am +++ b/Build/source/texk/web2c/otps/Makefile.am @@ -8,11 +8,11 @@ AM_YFLAGS = -d -v proglib = ../lib/lib.a -## Automake automatically uses $(proglib)=../lib/lib.a as dependency. -## This does not work for the configure substitution $(KPATHSEA_LIBS), -## thus we let $(proglib) artificially depend on $(KPATHSEA_LIBS). +# Automake automatically uses $(proglib)=../lib/lib.a as dependency. +# This does not work for the configure substitution $(KPATHSEA_LIBS), +# thus we let $(proglib) artificially depend on $(KPATHSEA_LIBS). -## Rebuild $(proglib) +# Rebuild $(proglib) $(proglib): $(KPATHSEA_DEPEND) ${top_srcdir}/lib/*.c cd ../lib && $(MAKE) $(AM_MAKEFLAGS) @@ -38,14 +38,12 @@ otp2ocp_SOURCES = \ otp2ocp.c \ routines.c -otp2ocp_LDADD = $(LEXLIB) $(proglib) $(KPATHSEA_LIBS) - DISTCLEANFILES = otp-parser.output outocp_SOURCES = \ outocp.c -outocp_LDADD = $(proglib) $(KPATHSEA_LIBS) +LDADD = $(proglib) $(KPATHSEA_LIBS) ## Not used ## diff --git a/Build/source/texk/web2c/otps/Makefile.in b/Build/source/texk/web2c/otps/Makefile.in index 14bde755093..bd85265fe66 100644 --- a/Build/source/texk/web2c/otps/Makefile.in +++ b/Build/source/texk/web2c/otps/Makefile.in @@ -81,11 +81,12 @@ PROGRAMS = $(bin_PROGRAMS) am_otp2ocp_OBJECTS = otp-parser.$(OBJEXT) otp-lexer.$(OBJEXT) \ otp2ocp.$(OBJEXT) routines.$(OBJEXT) otp2ocp_OBJECTS = $(am_otp2ocp_OBJECTS) +otp2ocp_LDADD = $(LDADD) am__DEPENDENCIES_1 = -otp2ocp_DEPENDENCIES = $(am__DEPENDENCIES_1) $(proglib) \ - $(am__DEPENDENCIES_1) +otp2ocp_DEPENDENCIES = $(proglib) $(am__DEPENDENCIES_1) am_outocp_OBJECTS = outocp.$(OBJEXT) outocp_OBJECTS = $(am_outocp_OBJECTS) +outocp_LDADD = $(LDADD) outocp_DEPENDENCIES = $(proglib) $(am__DEPENDENCIES_1) am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -329,12 +330,11 @@ otp2ocp_SOURCES = \ otp2ocp.c \ routines.c -otp2ocp_LDADD = $(LEXLIB) $(proglib) $(KPATHSEA_LIBS) DISTCLEANFILES = otp-parser.output outocp_SOURCES = \ outocp.c -outocp_LDADD = $(proglib) $(KPATHSEA_LIBS) +LDADD = $(proglib) $(KPATHSEA_LIBS) all: all-am .SUFFIXES: @@ -709,6 +709,11 @@ uninstall-am: uninstall-binPROGRAMS uninstall-binSCRIPTS uninstall-binSCRIPTS +# Automake automatically uses $(proglib)=../lib/lib.a as dependency. +# This does not work for the configure substitution $(KPATHSEA_LIBS), +# thus we let $(proglib) artificially depend on $(KPATHSEA_LIBS). + +# Rebuild $(proglib) $(proglib): $(KPATHSEA_DEPEND) ${top_srcdir}/lib/*.c cd ../lib && $(MAKE) $(AM_MAKEFLAGS) diff --git a/Build/source/texk/web2c/otps/otp-lexer.c b/Build/source/texk/web2c/otps/otp-lexer.c index 0bbc4df5337..fbef4e283b8 100644 --- a/Build/source/texk/web2c/otps/otp-lexer.c +++ b/Build/source/texk/web2c/otps/otp-lexer.c @@ -607,7 +607,13 @@ along with Omega; if not, write to the Free Software Foundation, Inc., int line_number = 1; int i,j,last; extern YYSTYPE yylval; -#line 611 "otp-lexer.c" + +static int +yywrap (void) +{ + return 1; +} +#line 617 "otp-lexer.c" #define INITIAL 0 @@ -789,9 +795,9 @@ YY_DECL register char *yy_cp, *yy_bp; register int yy_act; -#line 44 "otp-lexer.l" +#line 50 "otp-lexer.l" -#line 795 "otp-lexer.c" +#line 801 "otp-lexer.c" if ( !(yy_init) ) { @@ -895,24 +901,24 @@ do_action: /* This label is used only to access EOF actions. */ { /* beginning of action switch */ case 1: YY_RULE_SETUP -#line 45 "otp-lexer.l" +#line 51 "otp-lexer.l" {} YY_BREAK case 2: /* rule 2 can match eol */ YY_RULE_SETUP -#line 46 "otp-lexer.l" +#line 52 "otp-lexer.l" { line_number++;} YY_BREAK case 3: /* rule 3 can match eol */ YY_RULE_SETUP -#line 47 "otp-lexer.l" +#line 53 "otp-lexer.l" { line_number++;} YY_BREAK case 4: YY_RULE_SETUP -#line 48 "otp-lexer.l" +#line 54 "otp-lexer.l" { yylval.yint=0; for (i=2; i