[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-2058
From: |
Peter Rosin |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-2058-g6f4b08d |
Date: |
Tue, 06 Mar 2012 08:54:34 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=6f4b08da92043093e29deddfec005900d496ff98
The branch, master has been updated
via 6f4b08da92043093e29deddfec005900d496ff98 (commit)
from 5f624a6af8abbbd9695bee8d21d0713238ccba03 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 6f4b08da92043093e29deddfec005900d496ff98
Author: Peter Rosin <address@hidden>
Date: Tue Mar 6 09:50:09 2012 +0100
tests: explicitly state that our lexers do not require unistd.h
By default, GNU flex generates code that is dependent on unistd.h,
which is not portable to non-ANSI systems causing spurious test
failures.
* tests/cond35.test (tscan.l): Define YY_NO_UNISTD_H.
* tests/lex-clean.test (lexer.l): Likewise.
* tests/lex-depend.test (joe.l): Likewise.
* tests/lex-lib-external.test (foo.l): Likewise.
* tests/lex-lib.test (foo.l): Likewise.
* tests/lex-libobj.test (foo.l): Likewise.
* tests/lex-line.test (zardoz.l): Likewise.
* tests/lex-nodist.test (lexer.l): Likewise.
* tests/lex-noyywrap.test (foo.l): Likewise.
* tests/lex-pr204.test (lexer.l): Likewise.
* tests/lex-subobj-nodep.test (subl/sl.l): Likewise.
* tests/lex3.test (foo.l): Likewise.
* tests/lex5.test (foo/foo.l): Likewise.
* tests/lexvpath.test (lexer.l): Likewise.
* tests/silent-lex.test (foo.l): Likewise.
* tests/silent-many-gcc.test (foo5.l): Likewise.
* tests/silent-many-generic.test (foo5.l): Likewise.
* tests/lex-clean-cxx.test (parsefoo.lxx): Likewise. Also specify
the never-interactive option to prevent usage of the non-ANSI
function isatty(3) (from unistd.h).
* tests/lex-depend-cxx.test (joe.ll): Likewise.
* tests/README: Describe these quirks.
-----------------------------------------------------------------------
Summary of changes:
tests/README | 12 ++++++++++++
tests/cond35.test | 3 +++
tests/lex-clean-cxx.test | 4 ++++
tests/lex-clean.test | 3 +++
tests/lex-depend-cxx.test | 4 ++++
tests/lex-depend.test | 3 +++
tests/lex-lib-external.test | 3 +++
tests/lex-lib.test | 3 +++
tests/lex-libobj.test | 3 +++
tests/lex-line.test | 3 +++
tests/lex-nodist.test | 3 +++
tests/lex-noyywrap.test | 3 +++
tests/lex-pr204.test | 3 +++
tests/lex-subobj-nodep.test | 3 +++
tests/lex3.test | 3 +++
tests/lex5.test | 3 +++
tests/lexvpath.test | 9 +++++++++
tests/silent-lex.test | 3 +++
tests/silent-many-gcc.test | 3 +++
tests/silent-many-generic.test | 3 +++
20 files changed, 77 insertions(+), 0 deletions(-)
diff --git a/tests/README b/tests/README
index 42afa2c..33a653c 100644
--- a/tests/README
+++ b/tests/README
@@ -263,6 +263,18 @@ Do
directory, but use '$am_scriptdir' instead. The complete list of
such "$am_...dir" variables can be found in tests/defs-static.in.
+ When writing input for lex, include the following in the definitions
+ section:
+ %{
+ #define YY_NO_UNISTD_H 1
+ %}
+ to accomodate non-ANSI systems, since GNU flex generates code that
+ includes unistd.h otherwise. Also add:
+ %option never-interactive
+ to the definitions section if the generated code is to be compiled
+ by a C++ compiler, for similar reasons (i.e., the isatty(3) function
+ from that same unistd.h header would be required otherwise).
+
Before commit: make sure the test is executable, add the tests to
TESTS in Makefile.am, add it to XFAIL_TESTS in addition if needed,
write a ChangeLog entry, send the diff to <address@hidden>.
diff --git a/tests/cond35.test b/tests/cond35.test
index 97b4c8f..043b3b0 100755
--- a/tests/cond35.test
+++ b/tests/cond35.test
@@ -58,6 +58,9 @@ $FGREP 'tparse.h' Makefile.in # For debugging.
test `$FGREP -c 'tparse.h:' Makefile.in` = 1
cat > tscan.l << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"END" return EOF;
%%
diff --git a/tests/lex-clean-cxx.test b/tests/lex-clean-cxx.test
index 4fbbfcc..b29bd40 100755
--- a/tests/lex-clean-cxx.test
+++ b/tests/lex-clean-cxx.test
@@ -55,6 +55,10 @@ LDADD = $(LEXLIB)
END
cat > parsefoo.lxx << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
+%option never-interactive
%%
"GOOD" return EOF;
.
diff --git a/tests/lex-clean.test b/tests/lex-clean.test
index 62ed6bb..6988f92 100755
--- a/tests/lex-clean.test
+++ b/tests/lex-clean.test
@@ -54,6 +54,9 @@ LDADD = $(LEXLIB)
END
cat > lexer.l << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"GOOD" return EOF;
.
diff --git a/tests/lex-depend-cxx.test b/tests/lex-depend-cxx.test
index e1560ee..2686a5e 100755
--- a/tests/lex-depend-cxx.test
+++ b/tests/lex-depend-cxx.test
@@ -48,6 +48,10 @@ test-obj-updated: joe.$(OBJEXT) moe.$(OBJEXT)
END
cat > joe.ll << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
+%option never-interactive
%%
"foo" return EOF;
.
diff --git a/tests/lex-depend.test b/tests/lex-depend.test
index 17f66e9..2982845 100755
--- a/tests/lex-depend.test
+++ b/tests/lex-depend.test
@@ -45,6 +45,9 @@ test-obj-updated: joe.$(OBJEXT)
END
cat > joe.l << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"foo" return EOF;
.
diff --git a/tests/lex-lib-external.test b/tests/lex-lib-external.test
index 399c652..21802c5 100755
--- a/tests/lex-lib-external.test
+++ b/tests/lex-lib-external.test
@@ -42,6 +42,9 @@ have-lexlib:
END
cat > foo.l <<'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"GOOD" return EOF;
.
diff --git a/tests/lex-lib.test b/tests/lex-lib.test
index e1cef76..0320f75 100755
--- a/tests/lex-lib.test
+++ b/tests/lex-lib.test
@@ -47,6 +47,9 @@ int yywrap (void)
END
cat > foo.l <<'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"END" return EOF;
.
diff --git a/tests/lex-libobj.test b/tests/lex-libobj.test
index a2b128d..3bc2981 100755
--- a/tests/lex-libobj.test
+++ b/tests/lex-libobj.test
@@ -45,6 +45,9 @@ int yywrap (void)
END
cat > foo.l <<'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"END" return EOF;
.
diff --git a/tests/lex-line.test b/tests/lex-line.test
index e5457cc..5888c51 100755
--- a/tests/lex-line.test
+++ b/tests/lex-line.test
@@ -60,6 +60,9 @@ dir/address@hidden@: dir/quux.c
END
cat > zardoz.l << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"END" return EOF;
.
diff --git a/tests/lex-nodist.test b/tests/lex-nodist.test
index c1f3b0c..70cd2f7 100755
--- a/tests/lex-nodist.test
+++ b/tests/lex-nodist.test
@@ -47,6 +47,9 @@ check-local: test-build test-dist
lexer.l:
rm -f $@ address@hidden
:; { : \
+ && echo '%{' \
+ && echo '#define YY_NO_UNISTD_H 1' \
+ && echo '%}' \
&& echo '%%' \
&& echo '"GOOD" return EOF;' \
&& echo '.'; \
diff --git a/tests/lex-noyywrap.test b/tests/lex-noyywrap.test
index 1640953..1c4a13b 100755
--- a/tests/lex-noyywrap.test
+++ b/tests/lex-noyywrap.test
@@ -37,6 +37,9 @@ END
cat > foo.l << 'END'
%option noyywrap
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"GOOD" return EOF;
.
diff --git a/tests/lex-pr204.test b/tests/lex-pr204.test
index 1ef6205..07b5644 100755
--- a/tests/lex-pr204.test
+++ b/tests/lex-pr204.test
@@ -51,6 +51,9 @@ distdirtest: distdir
EOF
cat > lexer.l << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"GOOD" return EOF;
.
diff --git a/tests/lex-subobj-nodep.test b/tests/lex-subobj-nodep.test
index 8bfc153..44c9776 100755
--- a/tests/lex-subobj-nodep.test
+++ b/tests/lex-subobj-nodep.test
@@ -38,6 +38,9 @@ END
mkdir sub1 sub2
cat >sub1/s1.l <<\END
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"END" return EOF;
.
diff --git a/tests/lex3.test b/tests/lex3.test
index 23e14c9..125152b 100755
--- a/tests/lex3.test
+++ b/tests/lex3.test
@@ -33,6 +33,9 @@ foo_SOURCES = foo.l
END
cat > foo.l << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"GOOD" return EOF;
.
diff --git a/tests/lex5.test b/tests/lex5.test
index dcccc2e..4b0663d 100755
--- a/tests/lex5.test
+++ b/tests/lex5.test
@@ -37,6 +37,9 @@ END
mkdir foo
cat > foo/foo.l << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"END" return EOF;
.
diff --git a/tests/lexvpath.test b/tests/lexvpath.test
index 4572fe5..c731692 100755
--- a/tests/lexvpath.test
+++ b/tests/lexvpath.test
@@ -44,6 +44,9 @@ END
# Original lexer, with a "foobar" comment
cat > lexer.l << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"END" return EOF;
.
@@ -86,6 +89,9 @@ $sleep
# New lexer, with 'fubar' comment.
cat > ../lexer.l << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"END" return EOF;
.
@@ -106,6 +112,9 @@ $sleep
# New lexer, with 'maude' comment.
cat > ../lexer.l << 'END'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"END" return EOF;
.
diff --git a/tests/silent-lex.test b/tests/silent-lex.test
index ff68eda..1855538 100755
--- a/tests/silent-lex.test
+++ b/tests/silent-lex.test
@@ -54,6 +54,9 @@ LDADD = $(LEXLIB)
EOF
cat > foo.l <<'EOF'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"END" return EOF;
.
diff --git a/tests/silent-many-gcc.test b/tests/silent-many-gcc.test
index 8cba837..8b457ca 100755
--- a/tests/silent-many-gcc.test
+++ b/tests/silent-many-gcc.test
@@ -157,6 +157,9 @@ cat > foo3.f <<'EOF'
end
EOF
cat > foo5.l <<'EOF'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"END" return EOF;
.
diff --git a/tests/silent-many-generic.test b/tests/silent-many-generic.test
index a3d3b81..3949009 100755
--- a/tests/silent-many-generic.test
+++ b/tests/silent-many-generic.test
@@ -184,6 +184,9 @@ cat > foo3.f <<'EOF'
end
EOF
cat > foo5.l <<'EOF'
+%{
+#define YY_NO_UNISTD_H 1
+%}
%%
"END" return EOF;
.
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-2058-g6f4b08d,
Peter Rosin <=