[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Extend tests on `nostdinc' automake option.
From: |
Stefano Lattarini |
Subject: |
[PATCH] Extend tests on `nostdinc' automake option. |
Date: |
Mon, 26 Apr 2010 14:05:19 +0200 |
User-agent: |
KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; ) |
FWIW, a minor improvement.
Regards,
Stefano
-*-*-
Extend tests on `nostdinc' automake option.
* tests/nostdinc.test: Make the grepping of the generated
Makefile.in slighty stricter. Enable `errexit' shell flag.
Related and unrelated minor changes.
Also, updated copyright years.
* tests/nostdinc2.test: New test.
* tests/Makefile.am (TESTS): Extended accordingly.
From c28ae289368b5cb8878a5618d5680f196ea48a55 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Mon, 26 Apr 2010 13:58:25 +0200
Subject: [PATCH] Extend tests on `nostdinc' automake option.
* tests/nostdinc.test: Make the grepping of the generated
Makefile.in slighty stricter. Enable `errexit' shell flag.
Related and unrelated minor changes.
Also, updated copyright years.
* tests/nostdinc2.test: New test.
* tests/Makefile.am (TESTS): Extended accordingly.
---
ChangeLog | 10 ++++++++++
tests/Makefile.am | 1 +
tests/Makefile.in | 1 +
tests/nostdinc.test | 14 +++++++-------
tests/nostdinc2.test | 43 +++++++++++++++++++++++++++++++++++++++++++
5 files changed, 62 insertions(+), 7 deletions(-)
create mode 100755 tests/nostdinc2.test
diff --git a/ChangeLog b/ChangeLog
index 71b0d9b..3335cdb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2010-04-26 Stefano Lattarini <address@hidden>
+
+ Extend tests on `nostdinc' automake option.
+ * tests/nostdinc.test: Make the grepping of the generated
+ Makefile.in slighty stricter. Enable `errexit' shell flag.
+ Related and unrelated minor changes.
+ Also, updated copyright years.
+ * tests/nostdinc2.test: New test.
+ * tests/Makefile.am (TESTS): Extended accordingly.
+
2010-04-25 Ralf Wildenhues <address@hidden>
Warning and error message formatting cleanups.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index cff34c5..24c469c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -509,6 +509,7 @@ noinst.test \
noinstdir.test \
nolink.test \
nostdinc.test \
+nostdinc2.test \
notrans.test \
number.test \
objc.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 3ff9012..46ff367 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -750,6 +750,7 @@ noinst.test \
noinstdir.test \
nolink.test \
nostdinc.test \
+nostdinc2.test \
notrans.test \
number.test \
objc.test \
diff --git a/tests/nostdinc.test b/tests/nostdinc.test
index 96e30c5..550ebad 100755
--- a/tests/nostdinc.test
+++ b/tests/nostdinc.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,9 +18,9 @@
. ./defs || Exit 1
-cat >> configure.in << 'END'
-AC_PROG_CC
-END
+set -e
+
+echo AC_PROG_CC >> configure.in
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = nostdinc
@@ -28,8 +28,8 @@ bin_PROGRAMS = foo
foo_SOURCES = foo.c
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
-$FGREP -e '-I.' Makefile.in && Exit 1
+grep '.*-I *\.' Makefile.in && Exit 1
Exit 0
diff --git a/tests/nostdinc2.test b/tests/nostdinc2.test
new file mode 100755
index 0000000..2c68f1a
--- /dev/null
+++ b/tests/nostdinc2.test
@@ -0,0 +1,43 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure nostdinc option works correctly.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = nostdinc
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+mkdir build
+cd build
+../configure
+
+$EGREP '.*-I *(\.|\$.srcdir.)' Makefile && Exit 1
+Exit 0
--
1.6.5
- [PATCH] Extend tests on `nostdinc' automake option.,
Stefano Lattarini <=