diff options
-rw-r--r-- | ChangeLog | 13 | ||||
-rw-r--r-- | Makefile | 2 | ||||
-rwxr-xr-x | configure | 6 | ||||
-rw-r--r-- | parser.l | 9 |
4 files changed, 23 insertions, 7 deletions
@@ -1,5 +1,18 @@ 2014-10-24 Kaz Kylheku <kaz@kylheku.com> + GNU Flex's libfl library provides nothing. Let us not refer to it. It + only causes build issues on some systems where it is not provided + in the standard location, or is not cross-compiled properly. + + * Makefile (LEXLIB): Reference to variable removed. + + * configure (lexlib): Variable removed. + (LEXLIB): config.make variable not generated. + + * parser.l (yywrap): Provide this trivial function as inline. + +2014-10-24 Kaz Kylheku <kaz@kylheku.com> + * Makefile: Removing trailing spaces. (GREP_CHECK): New macro. (enforce): Rewritten using GREP_CHECK, with new checks. @@ -54,7 +54,7 @@ OBJS += $(MPI_OBJS) PROG := txr $(PROG): $(OBJS) $(OBJS-y) - $(CC) $(CFLAGS) -o $@ $^ -lm $(LEXLIB) + $(CC) $(CFLAGS) -o $@ $^ -lm VPATH := $(top_srcdir) @@ -90,7 +90,6 @@ intptr= exe= tool_prefix= lex='$(cross)$(tool_prefix)flex' -lexlib=-lfl yaccname_given= yaccname= yacc='$(cross)$(tool_prefix)$(yaccname)' @@ -320,10 +319,6 @@ lex [$lex] Specifies the program to use for compiling lex scanners to C. This must be compatible with GNU flex, since flex extensions are used. -lexlib [$lexlib] - - Specifies the linker flag to use for linking the lex library. - yaccname [$yaccname] Specifies just the name of the yacc program without the path. @@ -624,7 +619,6 @@ EXE := $exe CC := $cc LEX := $lex -LEXLIB := $lexlib YACC := $yacc NM := $nm @@ -79,6 +79,15 @@ int yylex_destroy(void) int yyget_column(yyscan_t); void yyset_column (int column_no, yyscan_t yyscanner); +/* The following function is all that libflex provides. + By providing it here, we eliminate the need to link libflex. */ +#define YY_SKIP_YYWRAP +INLINE int yywrap(yyscan_t scanner) +{ + (void) scanner; + return 1; +} + void yyerror(scanner_t *scanner, parser_t *parser, const char *s) { yyerrorf(scanner, lit("~a"), string_utf8(s), nao); |