summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-10-24 19:49:08 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-10-24 19:49:08 -0700
commit76aca0cdeb648421ebbbfc3c7e14c2d0d1878348 (patch)
tree8201351ec73e013a88381dd4ae99cb247c19a9ee
parent57276037c1357e54730a94fb1191362d4f694252 (diff)
downloadtxr-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--ChangeLog13
-rw-r--r--Makefile2
-rwxr-xr-xconfigure6
-rw-r--r--parser.l9
4 files changed, 23 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a436101..e326e3de 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
diff --git a/Makefile b/Makefile
index a9d4331e..c3b1dd50 100644
--- a/Makefile
+++ b/Makefile
@@ -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)
diff --git a/configure b/configure
index 64177c21..0c60f899 100755
--- a/configure
+++ b/configure
@@ -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
diff --git a/parser.l b/parser.l
index 180f5fa4..e538b22c 100644
--- a/parser.l
+++ b/parser.l
@@ -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);