diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2014-10-24 19:49:08 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2014-10-24 19:49:08 -0700 |
commit | 76aca0cdeb648421ebbbfc3c7e14c2d0d1878348 (patch) | |
tree | 8201351ec73e013a88381dd4ae99cb247c19a9ee | |
parent | 57276037c1357e54730a94fb1191362d4f694252 (diff) | |
download | txr-76aca0cdeb648421ebbbfc3c7e14c2d0d1878348.tar.gz txr-76aca0cdeb648421ebbbfc3c7e14c2d0d1878348.tar.bz2 txr-76aca0cdeb648421ebbbfc3c7e14c2d0d1878348.zip |
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.
-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); |