[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Add tests about support of wildcards in EXTRA_DIST
From: |
Stefano Lattarini |
Subject: |
[PATCH] Add tests about support of wildcards in EXTRA_DIST |
Date: |
Sat, 20 Feb 2010 16:49:37 +0100 |
User-agent: |
KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.2; i686; ; ) |
Hello automakers.
During a discussion on the Automake mailing list (the relevant part starts
here: http://lists.gnu.org/archive/html/automake/2010-02/msg00046.html),
it has been suggested by Ralf Wildenhues that the Automake's testsuite
should contain some tests checking that the use of wildcards in the
EXTRA_DIST special variable is supported. In fact, even if such a support
is not documented in the Automake manual, it seems to have been exploited
by some projects (try to search the regexp "EXTRA_DIST\ *=\ *.*\*" in google
codesearch), so that it should be preserved for backward-compatibility.
I've written a small patch adding some tests. Note that they are mostly
tentative, and might also be inclomplete, since I have always used the
"dist" features of Automake only in the most basic ways. But incomplete
is better than missing, I think.
Regards,
Stefano
From 5f22886459c360e43ecd762efb058c53c0691bbb Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Sat, 20 Feb 2010 16:41:56 +0100
Subject: [PATCH] Add tests about support of wildcards in EXTRA_DIST.
* tests/extra10.test: New test, check basic support of wildcards
in EXTRA_DIST.
* tests/extra11.test: New test, check more complex usage of
wildcards in EXTRA_DIST.
* tests/extra11.test: New test, check usage of wildcards in
EXTRA_DIST when $builddir != $srcdir.
* tests/Makefile.am (TESTS): Updated accordingly.
Necessity of these new tests suggested by Braden McDaniel
<address@hidden> and Ralf Wildenhues <address@hidden>
---
ChangeLog | 13 +++++++++
tests/Makefile.am | 3 ++
tests/Makefile.in | 3 ++
tests/extra10.test | 43 +++++++++++++++++++++++++++++++
tests/extra11.test | 72 ++++++++++++++++++++++++++++++++++++++++++++++++++++
tests/extra12.test | 52 +++++++++++++++++++++++++++++++++++++
6 files changed, 186 insertions(+), 0 deletions(-)
create mode 100755 tests/extra10.test
create mode 100755 tests/extra11.test
create mode 100755 tests/extra12.test
diff --git a/ChangeLog b/ChangeLog
index da01f8f..446125d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2010-02-20 Stefano Lattarini <address@hidden>
+
+ Add tests about support of wildcards in EXTRA_DIST.
+ * tests/extra10.test: New test, check basic support of wildcards
+ in EXTRA_DIST.
+ * tests/extra11.test: New test, check more complex usage of
+ wildcards in EXTRA_DIST.
+ * tests/extra11.test: New test, check usage of wildcards in
+ EXTRA_DIST when $builddir != $srcdir.
+ * tests/Makefile.am (TESTS): Updated accordingly.
+ Necessity of these new tests suggested by Braden McDaniel
+ <address@hidden> and Ralf Wildenhues <address@hidden>
+
2010-01-24 Ralf Wildenhues <address@hidden>
Fix silent-rules output for disabled dependency tracking.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index ec28566..de56d36 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -313,6 +313,9 @@ extra6.test \
extra7.test \
extra8.test \
extra9.test \
+extra10.test \
+extra11.test \
+extra12.test \
f90only.test \
flavor.test \
flibs.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 3393f06..fba9283 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -554,6 +554,9 @@ extra6.test \
extra7.test \
extra8.test \
extra9.test \
+extra10.test \
+extra11.test \
+extra12.test \
f90only.test \
flavor.test \
flibs.test \
diff --git a/tests/extra10.test b/tests/extra10.test
new file mode 100755
index 0000000..16d06a3
--- /dev/null
+++ b/tests/extra10.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/>.
+
+# Check that wildcards in EXTRA_DIST are honoured.
+# Suggested by observations from Braden McDaniel.
+
+. ./defs || Exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am <<'END'
+EXTRA_DIST=*.foo
+.PHONY: test
+test: distdir
+ diff a.foo $(distdir)/a.foo
+ diff b.foo $(distdir)/b.foo
+ test ! -r $(distdir)/c.bar
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+echo aaa > a.foo
+echo bbb > b.foo
+echo ccc > c.foo
+./configure
+$MAKE test
diff --git a/tests/extra11.test b/tests/extra11.test
new file mode 100755
index 0000000..14dda42
--- /dev/null
+++ b/tests/extra11.test
@@ -0,0 +1,72 @@
+#! /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/>.
+
+# Check for more complex usage of wildcards in EXTRA_DIST.
+# Suggested by observations from Braden McDaniel.
+
+. ./defs || Exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am <<'END'
+EXTRA_DIST = [!c-z].t d.t [ab].dir foo.* *zardoz*
+
+.PHONY: prereq
+prereq:
+ echo a > a.t
+ echo b > b.t
+ echo c > c.t
+ echo d > d.t
+ echo m > m.t
+ echo z > z.t
+ mkdir a.dir b.dir c.dir
+ echo a1 > a.dir/f1
+ echo a2 > a.dir/f2
+ echo bb > b.dir/f
+ echo cc > c.dir/x
+ echo 0 > foo
+ echo 1 > foo.x
+ echo 2 > foo.bar
+ echo foo > _zardoz_
+
+.PHONY: test
+test: distdir
+ diff a.t $(distdir)/a.t
+ diff b.t $(distdir)/b.t
+ test ! -r $(distdir)/c.t
+ diff d.t $(distdir)/d.t
+ test ! -r $(distdir)/m.t
+ test ! -r $(distdir)/z.t
+ diff a.dir/f1 $(distdir)/a.dir/f1
+ diff a.dir/f2 $(distdir)/a.dir/f2
+ diff b.dir/f $(distdir)/b.dir/f
+ test ! -r $(distdir)/c.dir
+ diff foo.x $(distdir)/foo.x
+ diff foo.bar $(distdir)/foo.bar
+ test ! -r $(distdir)/foo
+ diff _zardoz_ $(distdir)/_zardoz_
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+$MAKE prereq
+ls -l . *.dir
+$MAKE test
diff --git a/tests/extra12.test b/tests/extra12.test
new file mode 100755
index 0000000..72b918c
--- /dev/null
+++ b/tests/extra12.test
@@ -0,0 +1,52 @@
+#! /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/>.
+
+# Check that wildcards in elements of EXTRA_DIST are honoured when
+# $srcdir != $builddir, if properly declared.
+# Suggested by observations from Braden McDaniel.
+
+. ./defs || Exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+
+cat > Makefile.am <<'END'
+EXTRA_DIST = *.foo $(srcdir)/*.foo $(builddir)/*.bar $(srcdir)/*.bar
+
+.PHONY: test
+test: distdir
+ ls -l $(srcdir) $(builddir) $(distdir)
+ diff $(srcdir)/a.foo $(distdir)/a.foo
+ diff $(srcdir)/b.bar $(distdir)/b.bar
+ diff $(builddir)/c.foo $(distdir)/c.foo
+ diff $(builddir)/d.bar $(distdir)/d.bar
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+echo aaa > a.foo
+echo bbb > b.bar
+mkdir build
+echo ccc > build/c.foo
+echo ddd > build/d.bar
+
+cd build
+../configure
+$MAKE test
--
1.6.5
- [PATCH] Add tests about support of wildcards in EXTRA_DIST,
Stefano Lattarini <=