]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Internationalization tests: prefer `make distdir' over `make dist'.
authorStefano Lattarini <stefano.lattarini@gmail.com>
Mon, 6 Sep 2010 14:52:25 +0000 (16:52 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 7 Sep 2010 10:37:37 +0000 (12:37 +0200)
Instead of running `make dist', then uncompressing the created
tarball, and then grepping the uncompressed tar archive, we can
simply run `make distdir' and analyze the contents of the created
distibution directory.  This is both faster and cleaner.

* tests/pot-msgidbugs.test: Test updated to use `make distdir'
instead of `make dist' where possible.
* tests/pot-no-linguas.test: Likewise.
* tests/pot-override1.test: Likewise.
* tests/pot-xgettext1.test: Likewise.
* tests/pot-xgettext2.test: Likewise.
* tests/pot-xgettext3.test: Likewise.
* tests/pot-xgettext4.test: Likewise.
* tests/pot-download1.test: Likewise, and check the created
distdir instead of the distribution tarball (which is not even
created anymore).
($distdir): New variable.
* tests/pot-format-csharp1.test: Likewise.
* tests/pot-format-java1.test: Likewise.
* tests/pot-format-java2.test: Likewise.
* tests/pot-format-qt1.test: Likewise.
* tests/pot-format-tcl1.test: Likewise.
* tests/pot-linguas.test: Likewise.
* tests/pot-noinst.test: Likewise.
* tests/pot-samedir.test: Likewise.
* tests/pot-topsrcdir.test: Likewise.

18 files changed:
ChangeLog
tests/pot-download1.test
tests/pot-format-csharp1.test
tests/pot-format-java1.test
tests/pot-format-java2.test
tests/pot-format-qt1.test
tests/pot-format-tcl1.test
tests/pot-linguas.test
tests/pot-msgidbugs.test
tests/pot-no-linguas.test
tests/pot-noinst.test
tests/pot-override1.test
tests/pot-samedir.test
tests/pot-topsrcdir.test
tests/pot-xgettext1.test
tests/pot-xgettext2.test
tests/pot-xgettext3.test
tests/pot-xgettext4.test

index 0246cbf6b62c19010dc210f6328c1f499ad68395..fbead47b79f9a8bf4a2ce5f982d731b53b7155cb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,32 @@
 2010-09-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Internationalization tests: prefer `make distdir' over `make dist'.
+       Instead of running `make dist', then uncompressing the created
+       tarball, and then grepping the uncompressed tar archive, we can
+       simply run `make distdir' and analyze the contents of the created
+       distibution directory.  This is both faster and cleaner.
+       * tests/pot-msgidbugs.test: Test updated to use `make distdir'
+       instead of `make dist' where possible.
+       * tests/pot-no-linguas.test: Likewise.
+       * tests/pot-override1.test: Likewise.
+       * tests/pot-xgettext1.test: Likewise.
+       * tests/pot-xgettext2.test: Likewise.
+       * tests/pot-xgettext3.test: Likewise.
+       * tests/pot-xgettext4.test: Likewise.
+       * tests/pot-download1.test: Likewise, and check the created
+       distdir instead of the distribution tarball (which is not even
+       created anymore).
+       ($distdir): New variable.
+       * tests/pot-format-csharp1.test: Likewise.
+       * tests/pot-format-java1.test: Likewise.
+       * tests/pot-format-java2.test: Likewise.
+       * tests/pot-format-qt1.test: Likewise.
+       * tests/pot-format-tcl1.test: Likewise.
+       * tests/pot-linguas.test: Likewise.
+       * tests/pot-noinst.test: Likewise.
+       * tests/pot-samedir.test: Likewise.
+       * tests/pot-topsrcdir.test: Likewise.
+
        Fixlets for internationalization tests.
        * tests/pot-copyright.test: Add trailing `:' command.  Use
        `$MAKE', not bare `make'.
index 01aead1709ff7dd88553192efb49159653540178..8198d7edb3836a03197fb8dcd0b57469ff94a83e 100755 (executable)
@@ -46,6 +46,8 @@ $ACLOCAL
 $AUTOMAKE -a
 $AUTOCONF
 
+distdir=$me-1.0
+
 for builddir in . sub; do
   if test $builddir = '.'; then
     sourcedir='.'
@@ -62,12 +64,10 @@ for builddir in . sub; do
   $MAKE install
   test -f "$instdir"/share/locale/de/LC_MESSAGES/clisp.mo
 
-  # Check that after "make dist", the tarball does not include the German
+  # Check that the distribution tarball does not include the German
   # translation.
-  $MAKE dist
-  gzip -d -c < pot-download1-1.0.tar.gz | tar tf - > filelist
-  grep '^pot-download1-1\.0/clisp-de\.po$' filelist && Exit 1
-  rm -f filelist
+  $MAKE distdir
+  test ! -r $distdir/clisp-de.po
 
   # Sanity check.
   $MAKE distcheck
index 1daf13f68e3d2df8fc5e5f2c381173ceded01c9c..7e85c4d18d650d2099f863ec95010c7479b126d5 100755 (executable)
@@ -113,6 +113,8 @@ msgid "Hello, world!"
 msgstr ""
 END
 
+distdir=$me-1.0
+
 for builddir in . sub; do
   for config_options in '' 'LINGUAS="es de"'; do
     if test $builddir = '.'; then
@@ -166,11 +168,11 @@ for builddir in . sub; do
     test ! -f "$instdir"/share/locale/fr_CA@latin/LC_MESSAGES/foo-bar.mo
     test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
 
-    # Check that "make dist" creates the expected .pot file.
+    # Check that "make distdir" creates the expected .pot file.
 
     rm -f $sourcedir/posub/foo-bar.pot
 
-    $MAKE dist
+    $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
     test $builddir = '.' || test ! -f posub/foo-bar.pot
@@ -189,17 +191,16 @@ for builddir in . sub; do
 
     # Check that the tarball contains posub/foo-bar-{de,fr}.{po,resources.dll}
     # but not the others, regardless whether LINGUAS was specified or not.
-    gzip -d -c < pot-format-csharp1-1.0.tar.gz | tar tf - > filelist
-    grep '^pot-format-csharp1-1\.0/posub/foo-bar-de\.po$' filelist
-    grep '^pot-format-csharp1-1\.0/posub/de/foo-bar\.resources\.dll$' filelist
-    grep '^pot-format-csharp1-1\.0/posub/foo-bar-fr_CA@latin\.po$' filelist
-    grep '^pot-format-csharp1-1\.0/posub/fr-CA-Latn/foo-bar\.resources\.dll$' filelist
-    grep '^pot-format-csharp1-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1
-    grep '^pot-format-csharp1-1\.0/posub/es/foo-bar\.resources\.dll$' filelist && Exit 1
-    grep '^pot-format-csharp1-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1
-    grep '^pot-format-csharp1-1\.0/posub/foo-bar-fr_CA@latin\.mo$' filelist && Exit 1
-    grep '^pot-format-csharp1-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1
-    rm -f filelist
+    test -d $distdir # sanity check
+    test -f $distdir/posub/foo-bar-de.po
+    test -f $distdir/posub/de/foo-bar.resources.dll
+    test -f $distdir/posub/foo-bar-fr_CA@latin.po
+    test -f $distdir/posub/fr-CA-Latn/foo-bar.resources.dll
+    test ! -r $distdir/posub/foo-bar-es.po
+    test ! -r $distdir/posub/es/foo-bar.resources.dll
+    test ! -r $distdir/posub/foo-bar-de.mo
+    test ! -r $distdir/posub/foo-bar-fr_CA@latin.mo
+    test ! -r $distdir/posub/foo-bar-es.mo
 
     # Sanity check.
     $MAKE distcheck
index e148d43b7b3554cd04549525f36a3ecb79c66745..c5fdfd48fb697e37f2072560ec2d3a93279bc9a0 100755 (executable)
@@ -114,6 +114,8 @@ msgid "Hello, world!"
 msgstr ""
 END
 
+distdir=$me-1.0
+
 for builddir in . sub; do
   for config_options in '' 'LINGUAS="es de"'; do
     if test $builddir = '.'; then
@@ -167,11 +169,11 @@ for builddir in . sub; do
     test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
     test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
 
-    # Check that "make dist" creates the expected .pot file.
+    # Check that "make distdir" creates the expected .pot file.
 
     rm -f $sourcedir/posub/foo-bar.pot
 
-    $MAKE dist
+    $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
     test $builddir = '.' || test ! -f posub/foo-bar.pot
@@ -190,17 +192,16 @@ for builddir in . sub; do
 
     # Check that the tarball contains posub/foo-bar-{de,fr}.{po,properties}
     # but not the others, regardless whether LINGUAS was specified or not.
-    gzip -d -c < pot-format-java1-1.0.tar.gz | tar tf - > filelist
-    grep '^pot-format-java1-1\.0/posub/foo-bar-de\.po$' filelist
-    grep '^pot-format-java1-1\.0/posub/foo-bar_de\.properties$' filelist
-    grep '^pot-format-java1-1\.0/posub/foo-bar-fr\.po$' filelist
-    grep '^pot-format-java1-1\.0/posub/foo-bar_fr\.properties$' filelist
-    grep '^pot-format-java1-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1
-    grep '^pot-format-java1-1\.0/posub/foo-bar_es\.properties$' filelist && Exit 1
-    grep '^pot-format-java1-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1
-    grep '^pot-format-java1-1\.0/posub/foo-bar-fr\.mo$' filelist && Exit 1
-    grep '^pot-format-java1-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1
-    rm -f filelist
+    test -d $distdir # sanity check
+    test -f $distdir/posub/foo-bar-de.po
+    test -f $distdir/posub/foo-bar_de.properties
+    test -f $distdir/posub/foo-bar-fr.po
+    test -f $distdir/posub/foo-bar_fr.properties
+    test ! -r $distdir/posub/foo-bar-es.po
+    test ! -r $distdir/posub/foo-bar_es.properties
+    test ! -r $distdir/posub/foo-bar-de.mo
+    test ! -r $distdir/posub/foo-bar-fr.mo
+    test ! -r $distdir/posub/foo-bar-es.mo
 
     # Sanity check.
     $MAKE distcheck
index ef60cf7fa9292279d52b50976c63fc8f9bc80ca8..644bc47fb5120bd6e4435e221f3fa41ec0612ff8 100755 (executable)
@@ -114,6 +114,8 @@ msgid "Hello, world!"
 msgstr ""
 END
 
+distdir=$me-1.0
+
 for builddir in . sub; do
   for config_options in '' 'LINGUAS="es de"'; do
     if test $builddir = '.'; then
@@ -167,11 +169,11 @@ for builddir in . sub; do
     test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
     test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
 
-    # Check that "make dist" creates the expected .pot file.
+    # Check that "make distdir" creates the expected .pot file.
 
     rm -f $sourcedir/posub/foo-bar.pot
 
-    $MAKE dist
+    $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
     test $builddir = '.' || test ! -f posub/foo-bar.pot
@@ -190,17 +192,16 @@ for builddir in . sub; do
 
     # Check that the tarball contains posub/foo-bar-{de,fr}.{po,class} but not
     # the others, regardless whether LINGUAS was specified or not.
-    gzip -d -c < pot-format-java2-1.0.tar.gz | tar tf - > filelist
-    grep '^pot-format-java2-1\.0/posub/foo-bar-de\.po$' filelist
-    grep '^pot-format-java2-1\.0/posub/foo-bar_de\.class$' filelist
-    grep '^pot-format-java2-1\.0/posub/foo-bar-fr\.po$' filelist
-    grep '^pot-format-java2-1\.0/posub/foo-bar_fr\.class$' filelist
-    grep '^pot-format-java2-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1
-    grep '^pot-format-java2-1\.0/posub/foo-bar_es\.class$' filelist && Exit 1
-    grep '^pot-format-java2-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1
-    grep '^pot-format-java2-1\.0/posub/foo-bar-fr\.mo$' filelist && Exit 1
-    grep '^pot-format-java2-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1
-    rm -f filelist
+    test -d $distdir # sanity check
+    test -f $distdir/posub/foo-bar-de.po
+    test -f $distdir/posub/foo-bar_de.class
+    test -f $distdir/posub/foo-bar-fr.po
+    test -f $distdir/posub/foo-bar_fr.class
+    test ! -r $distdir/posub/foo-bar-es.po
+    test ! -r $distdir/posub/foo-bar_es.class
+    test ! -r $distdir/posub/foo-bar-de.mo
+    test ! -r $distdir/posub/foo-bar-fr.mo
+    test ! -r $distdir/posub/foo-bar-es.mo
 
     # Sanity check.
     $MAKE distcheck
index ca6da0bc888f5e65363527192fc417ebaa16d4df..c88f6cd7fe40b9bf9501a18fc158736075155b46 100755 (executable)
@@ -139,6 +139,8 @@ msgid "Hello, world!"
 msgstr ""
 END
 
+distdir=$me-1.0
+
 for builddir in . sub; do
   for config_options in '' 'LINGUAS="es de"'; do
     if test $builddir = '.'; then
@@ -190,11 +192,11 @@ for builddir in . sub; do
     test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
     test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
 
-    # Check that "make dist" creates the expected .pot file.
+    # Check that "make distdir" creates the expected .pot file.
 
     rm -f $sourcedir/posub/foo-bar.pot
 
-    $MAKE dist
+    $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
     test $builddir = '.' || test ! -f posub/foo-bar.pot
@@ -211,17 +213,16 @@ for builddir in . sub; do
 
     # Check that the tarball contains posub/foo-bar-{de,fr}.{po,qm} but not
     # the others, regardless whether LINGUAS was specified or not.
-    gzip -d -c < pot-format-qt1-1.0.tar.gz | tar tf - > filelist
-    grep '^pot-format-qt1-1\.0/posub/foo-bar-de\.po$' filelist
-    grep '^pot-format-qt1-1\.0/posub/foo-bar-de\.qm$' filelist
-    grep '^pot-format-qt1-1\.0/posub/foo-bar-fr\.po$' filelist
-    grep '^pot-format-qt1-1\.0/posub/foo-bar-fr\.qm$' filelist
-    grep '^pot-format-qt1-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1
-    grep '^pot-format-qt1-1\.0/posub/foo-bar-es\.qm$' filelist && Exit 1
-    grep '^pot-format-qt1-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1
-    grep '^pot-format-qt1-1\.0/posub/foo-bar-fr\.mo$' filelist && Exit 1
-    grep '^pot-format-qt1-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1
-    rm -f filelist
+    test -d $distdir # sanity check
+    test -f $distdir/posub/foo-bar-de.po
+    test -f $distdir/posub/foo-bar-de.qm
+    test -f $distdir/posub/foo-bar-fr.po
+    test -f $distdir/posub/foo-bar-fr.qm
+    test ! -r $distdir/posub/foo-bar-es.po
+    test ! -r $distdir/posub/foo-bar-es.qm
+    test ! -r $distdir/posub/foo-bar-de.mo
+    test ! -r $distdir/posub/foo-bar-fr.mo
+    test ! -r $distdir/posub/foo-bar-es.mo
 
     # Sanity check.
     $MAKE distcheck
index 284b1ce1b13cf356883474a480f4697dd3753ca9..ab3d5ae9d2098020b7d59918872a7bc2e696c7a9 100755 (executable)
@@ -109,6 +109,8 @@ msgid "Hello, world!"
 msgstr ""
 END
 
+distdir=$me-1.0
+
 for builddir in . sub; do
   for config_options in '' 'LINGUAS="es de"'; do
     if test $builddir = '.'; then
@@ -162,11 +164,11 @@ for builddir in . sub; do
     test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
     test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
 
-    # Check that "make dist" creates the expected .pot file.
+    # Check that "make distdir" creates the expected .pot file.
 
     rm -f $sourcedir/posub/foo-bar.pot
 
-    $MAKE dist
+    $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
     test $builddir = '.' || test ! -f posub/foo-bar.pot
@@ -185,17 +187,16 @@ for builddir in . sub; do
 
     # Check that the tarball contains posub/foo-bar-{de,fr}.{po,msg} but not
     # the others, regardless whether LINGUAS was specified or not.
-    gzip -d -c < pot-format-tcl1-1.0.tar.gz | tar tf - > filelist
-    grep '^pot-format-tcl1-1\.0/posub/foo-bar-de\.po$' filelist
-    grep '^pot-format-tcl1-1\.0/posub/foo-bar/de\.msg$' filelist
-    grep '^pot-format-tcl1-1\.0/posub/foo-bar-fr_CA\.po$' filelist
-    grep '^pot-format-tcl1-1\.0/posub/foo-bar/fr_ca\.msg$' filelist
-    grep '^pot-format-tcl1-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1
-    grep '^pot-format-tcl1-1\.0/posub/foo-bar/es\.msg$' filelist && Exit 1
-    grep '^pot-format-tcl1-1\.0/posub/foo-bar-de\.mo$' filelist && Exit 1
-    grep '^pot-format-tcl1-1\.0/posub/foo-bar-fr_CA\.mo$' filelist && Exit 1
-    grep '^pot-format-tcl1-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1
-    rm -f filelist
+    test -d $distdir # sanity check
+    test -f $distdir/posub/foo-bar-de.po
+    test -f $distdir/posub/foo-bar/de.msg
+    test -f $distdir/posub/foo-bar-fr_CA.po
+    test -f $distdir/posub/foo-bar/fr_ca.msg
+    test ! -r $distdir/posub/foo-bar-es.po
+    test ! -r $distdir/posub/foo-bar/es.msg
+    test ! -r $distdir/posub/foo-bar-de.mo
+    test ! -r $distdir/posub/foo-bar-fr_CA.mo
+    test ! -r $distdir/posub/foo-bar-es.mo
 
     # Sanity check.
     $MAKE distcheck
index dd7bc94816d481dc3d74b827ecec43abb0003cb4..7557b876b613f940a0244a7d15a4bfb7044346ab 100755 (executable)
@@ -120,6 +120,8 @@ msgid "See the documentation for details."
 msgstr ""
 END
 
+distdir=$me-1.0
+
 for builddir in . sub; do
   for config_options in '' 'LINGUAS="es de"'; do
     if test $builddir = '.'; then
@@ -172,11 +174,11 @@ END
       test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
     fi
 
-    # Check that "make dist" creates the expected .pot file.
+    # Check that "make distdir" creates the expected .pot file.
 
     rm -f $sourcedir/posub/foo-bar.pot
 
-    $MAKE dist
+    $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
     test $builddir = '.' || test ! -f posub/foo-bar.pot
@@ -191,14 +193,12 @@ END
 
     # Check that the tarball contains posub/foo-bar-{de,fr}.{po,mo} but not
     # the others, regardless whether LINGUAS was specified or not.
-    gzip -d -c < pot-linguas-1.0.tar.gz | tar tf - > filelist
-    grep '^pot-linguas-1\.0/posub/foo-bar-de\.po$' filelist
-    grep '^pot-linguas-1\.0/posub/foo-bar-de\.mo$' filelist
-    grep '^pot-linguas-1\.0/posub/foo-bar-fr\.po$' filelist
-    grep '^pot-linguas-1\.0/posub/foo-bar-fr\.mo$' filelist
-    grep '^pot-linguas-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1
-    grep '^pot-linguas-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1
-    rm -f filelist
+    test -f $distdir/posub/foo-bar-de.po
+    test -f $distdir/posub/foo-bar-de.mo
+    test -f $distdir/posub/foo-bar-fr.po
+    test -f $distdir/posub/foo-bar-fr.mo
+    test ! -r $distdir/posub/foo-bar-es.po
+    test ! -r $distdir/posub/foo-bar-es.mo
 
     # Try modifying a source file.
     cat > $sourcedir/src/main.c << 'END'
@@ -245,7 +245,7 @@ END
     cmp $sourcedir/posub/foo-bar-es.pobak $sourcedir/posub/foo-bar-es.po
     cmp $sourcedir/posub/foo-bar-es.mobak $sourcedir/posub/foo-bar-es.mo
 
-    # Check that "make dist" updates the POT file, the PO files, and the
+    # Check that "make distdir" updates the POT file, the PO files, and the
     # MO files listed in the _LINGUAS variable, regardless whether LINGUAS
     # was specified or not.
     cp -p $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot
@@ -253,7 +253,7 @@ END
     cp -p $sourcedir/posub/foo-bar-de.mobak $sourcedir/posub/foo-bar-de.mo
     cp -p $sourcedir/posub/foo-bar-fr.pobak $sourcedir/posub/foo-bar-fr.po
     cp -p $sourcedir/posub/foo-bar-fr.mobak $sourcedir/posub/foo-bar-fr.mo
-    $MAKE dist
+    $MAKE distdir
     grep great $sourcedir/posub/foo-bar.pot
     # NOTE: This is *not* a useless use of cat.  See comments above.
     cat $sourcedir/posub/foo-bar-de.po | grep great
index 3b3b954ee91dfc6196e9ba7a66ee5c3a7d7d61d6..aba3df28c5b422f80d7643c08a8bcfa38f64ddd5 100755 (executable)
@@ -87,11 +87,11 @@ for builddir in . sub1; do
   $sourcedir/configure --prefix="$instdir"
   $MAKE
 
-  # Check that "make dist" creates the expected .pot file.
+  # Check that "make distdir" creates the expected .pot file.
   # (It is created under $sourcedir, because the .pot file is distributed.
   # Cf. the GNU standards, node "Makefile Basics".)
 
-  $MAKE dist
+  $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
   test $builddir = '.' || test ! -f posub/foo-bar.pot
@@ -150,11 +150,11 @@ for builddir in . sub2; do
   $sourcedir/configure --prefix="$instdir"
   $MAKE
 
-  # Check that "make dist" creates the expected .pot file.
+  # Check that "make distdir" creates the expected .pot file.
   # (It is created under $sourcedir, because the .pot file is distributed.
   # Cf. the GNU standards, node "Makefile Basics".)
 
-  $MAKE dist
+  $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
   test $builddir = '.' || test ! -f posub/foo-bar.pot
index 86039d82ddb7766d7cc6c34a80afe76170b2ad19..4f34264ee4b58bf96308a619592082a7e055ccfa 100755 (executable)
@@ -113,11 +113,11 @@ int main ()
 }
 END
 
-  # Check that "make dist" creates the expected .pot file.
+  # Check that "make distdir" creates the expected .pot file.
   # (It is created under $sourcedir, because the .pot file is distributed.
   # Cf. the GNU standards, node "Makefile Basics".)
 
-  $MAKE dist
+  $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
   test $builddir = '.' || test ! -f posub/foo-bar.pot
@@ -156,8 +156,8 @@ END
   $MAKE
   diff $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot
 
-  # Check that "make dist" updates the POT file.
-  $MAKE dist
+  # Check that "make distdir" updates the POT file.
+  $MAKE distdir
   grep great $sourcedir/posub/foo-bar.pot
 
   # Check that "make install" updates the POT file.
index 047a3282d575bab6c0bb9bf6f9f1399d28e72aa3..37735838823799f67b88314b8f4a39ed09ae2803 100755 (executable)
@@ -117,6 +117,8 @@ msgid "See the documentation for details."
 msgstr ""
 END
 
+distdir=$me-1.0
+
 for builddir in . sub; do
   for config_options in '' 'LINGUAS="es de"'; do
     if test $builddir = '.'; then
@@ -153,12 +155,12 @@ END
     test ! -f "$instdir"/share/locale/fr/LC_MESSAGES/foo-bar.mo
     test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
 
-    # Check that "make dist" creates the expected .pot file, .po files
+    # Check that "make distdir" creates the expected .pot file, .po files
     # and .mo files.
     # (They are created under $sourcedir, because the files are distributed.
     # Cf. the GNU standards, node "Makefile Basics".)
 
-    $MAKE dist
+    $MAKE distdir
 
     test -f $sourcedir/posub/foo-bar.pot
     test $builddir = '.' || test ! -f posub/foo-bar.pot
@@ -173,14 +175,13 @@ END
 
     # Check that the tarball contains posub/foo-bar-{de,fr}.{po,mo} but not
     # the others, regardless whether LINGUAS was specified or not.
-    gzip -d -c < pot-noinst-1.0.tar.gz | tar tf - > filelist
-    grep '^pot-noinst-1\.0/posub/foo-bar-de\.po$' filelist
-    grep '^pot-noinst-1\.0/posub/foo-bar-de\.mo$' filelist
-    grep '^pot-noinst-1\.0/posub/foo-bar-fr\.po$' filelist
-    grep '^pot-noinst-1\.0/posub/foo-bar-fr\.mo$' filelist
-    grep '^pot-noinst-1\.0/posub/foo-bar-es\.po$' filelist && Exit 1
-    grep '^pot-noinst-1\.0/posub/foo-bar-es\.mo$' filelist && Exit 1
-    rm -f filelist
+    test -d $distdir # sanity check
+    test -f $distdir/posub/foo-bar-de.po
+    test -f $distdir/posub/foo-bar-de.mo
+    test -f $distdir/posub/foo-bar-fr.po
+    test -f $distdir/posub/foo-bar-fr.mo
+    test ! -r $distdir/posub/foo-bar-es.po
+    test ! -r $distdir/posub/foo-bar-es.mo
 
     # Try modifying a source file.
     cat > $sourcedir/src/main.c << 'END'
@@ -221,10 +222,10 @@ END
     cmp $sourcedir/posub/foo-bar-es.pobak $sourcedir/posub/foo-bar-es.po
     cmp $sourcedir/posub/foo-bar-es.mobak $sourcedir/posub/foo-bar-es.mo
 
-    # Check that "make dist" updates the POT file, the PO files, and the
+    # Check that "make distdir" updates the POT file, the PO files, and the
     # MO files listed in the _LINGUAS variable, regardless whether LINGUAS
     # was specified or not.
-    $MAKE dist
+    $MAKE distdir
     grep great $sourcedir/posub/foo-bar.pot
     # NOTE: This is *not* a useless use of cat.  The *.po files can contain
     # non-ASCII characters, which might cause problems with some `grep'
index bf51b88027ecac0fe058f91c8201885f4b64879e..e2e4a77d305fa2f93f9559a0d159efa1f5133f73 100755 (executable)
@@ -90,11 +90,11 @@ int main ()
 }
 END
 
-  # Check that "make dist" creates the expected .pot file.
+  # Check that "make distdir" creates the expected .pot file.
   # (It is created under $sourcedir, because the .pot file is distributed.
   # Cf. the GNU standards, node "Makefile Basics".)
 
-  $MAKE dist
+  $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
   test $builddir = '.' || test ! -f posub/foo-bar.pot
@@ -125,8 +125,8 @@ END
   $MAKE
   diff $sourcedir/posub/foo-bar.potbak $sourcedir/posub/foo-bar.pot
 
-  # Check that "make dist" updates the POT file.
-  $MAKE dist
+  # Check that "make distdir" updates the POT file.
+  $MAKE distdir
   grep great $sourcedir/posub/foo-bar.pot
 
   # Check that "make install" updates the POT file.
index 6c321a96a1e093064a2288b8f5e01be8213fbc8b..ccdd41d18ed01803720530482bb839f218eafeda 100755 (executable)
@@ -147,6 +147,8 @@ msgid "See the documentation for details."
 msgstr ""
 END
 
+distdir=$me-1.0
+
 for builddir in . sub; do
   if test $builddir = '.'; then
     sourcedir='.'
@@ -194,24 +196,23 @@ for builddir in . sub; do
   cmp "$instdir"/share/locale/de/LC_MESSAGES/foo-bar.mo \
       "$instdir"/share/locale/de/LC_MESSAGES/foo-baz.mo && Exit 1
 
-  $MAKE dist
+  $MAKE distdir
 
   # Check that the tarball contains the .po files and .mo files for the
   # specified languages, but not more.
-  gzip -d -c < pot-samedir-1.0.tar.gz | tar tf - > filelist
-  grep '^pot-samedir-1\.0/posub/foo-bar-de\.po$' filelist
-  grep '^pot-samedir-1\.0/posub/foo-bar-de\.mo$' filelist
-  grep '^pot-samedir-1\.0/posub/foo-bar-fr\.po$' filelist
-  grep '^pot-samedir-1\.0/posub/foo-bar-fr\.mo$' filelist
-  grep '^pot-samedir-1\.0/posub/foo-bar-it\.po$' filelist && Exit 1
-  grep '^pot-samedir-1\.0/posub/foo-bar-it\.mo$' filelist && Exit 1
-  grep '^pot-samedir-1\.0/posub/foo-baz-de\.po$' filelist
-  grep '^pot-samedir-1\.0/posub/foo-baz-de\.mo$' filelist
-  grep '^pot-samedir-1\.0/posub/foo-baz-it\.po$' filelist
-  grep '^pot-samedir-1\.0/posub/foo-baz-it\.mo$' filelist
-  grep '^pot-samedir-1\.0/posub/foo-baz-fr\.po$' filelist && Exit 1
-  grep '^pot-samedir-1\.0/posub/foo-baz-fr\.mo$' filelist && Exit 1
-  rm -f filelist
+  test -d $distdir # sanity check
+  test -f $distdir/posub/foo-bar-de.po
+  test -f $distdir/posub/foo-bar-de.mo
+  test -f $distdir/posub/foo-bar-fr.po
+  test -f $distdir/posub/foo-bar-fr.mo
+  test -f $distdir/posub/foo-baz-de.po
+  test -f $distdir/posub/foo-baz-de.mo
+  test -f $distdir/posub/foo-baz-it.po
+  test -f $distdir/posub/foo-baz-it.mo
+  test ! -r $distdir/posub/foo-bar-it.po
+  test ! -r $distdir/posub/foo-bar-it.mo
+  test ! -r $distdir/posub/foo-baz-fr.po
+  test ! -r $distdir/posub/foo-baz-fr.mo
 
   # Sanity check.
   $MAKE distcheck
index 442ea56350742ff63be6fec31b21d156ce935838..23ebe67bf38dbf7402acf581db83404408453b2d 100755 (executable)
@@ -117,6 +117,8 @@ msgid "See the documentation for details."
 msgstr ""
 END
 
+distdir=$me-1.0
+
 for builddir in . sub; do
   for config_options in '' 'LINGUAS="es de"'; do
     if test $builddir = '.'; then
@@ -169,11 +171,11 @@ END
       test ! -f "$instdir"/share/locale/es/LC_MESSAGES/foo-bar.mo
     fi
 
-    # Check that "make dist" creates the expected .pot file.
+    # Check that "make distdir" creates the expected .pot file.
 
     rm -f $sourcedir/foo-bar.pot
 
-    $MAKE dist
+    $MAKE distdir
 
     test -f $sourcedir/foo-bar.pot
     test $builddir = '.' || test ! -f foo-bar.pot
@@ -188,14 +190,13 @@ END
 
     # Check that the tarball contains foo-bar-{de,fr}.{po,mo} but not
     # the others, regardless whether LINGUAS was specified or not.
-    gzip -d -c < pot-linguas-1.0.tar.gz | tar tf - > filelist
-    grep '^foo-bar-de\.po$' filelist
-    grep '^foo-bar-de\.mo$' filelist
-    grep '^foo-bar-fr\.po$' filelist
-    grep '^foo-bar-fr\.mo$' filelist
-    grep '^foo-bar-es\.po$' filelist && Exit 1
-    grep '^foo-bar-es\.mo$' filelist && Exit 1
-    rm -f filelist
+    test -d $distdir # sanity check
+    test -f $distdir/foo-bar-de.po
+    test -f $distdir/foo-bar-de.mo
+    test -f $distdir/foo-bar-fr.po
+    test -f $distdir/foo-bar-fr.mo
+    test ! -r $distdir/foo-bar-es.po
+    test ! -r $distdir/foo-bar-es.mo
 
     # Try modifying a source file.
     cat > $sourcedir/src/main.c << 'END'
@@ -242,7 +243,7 @@ END
     cmp $sourcedir/foo-bar-es.pobak $sourcedir/foo-bar-es.po
     cmp $sourcedir/foo-bar-es.mobak $sourcedir/foo-bar-es.mo
 
-    # Check that "make dist" updates the POT file, the PO files, and the
+    # Check that "make distdir" updates the POT file, the PO files, and the
     # MO files listed in the _LINGUAS variable, regardless whether LINGUAS
     # was specified or not.
     cp -p $sourcedir/foo-bar.potbak $sourcedir/foo-bar.pot
@@ -250,7 +251,7 @@ END
     cp -p $sourcedir/foo-bar-de.mobak $sourcedir/foo-bar-de.mo
     cp -p $sourcedir/foo-bar-fr.pobak $sourcedir/foo-bar-fr.po
     cp -p $sourcedir/foo-bar-fr.mobak $sourcedir/foo-bar-fr.mo
-    $MAKE dist
+    $MAKE distdir
     grep great $sourcedir/foo-bar.pot
     # NOTE: This is *not* a useless use of cat.  See comments above.
     cat $sourcedir/foo-bar-de.po | grep great
index 740968576a498d6ea72fd984caf1ac0358aaf696..d018fa74954c609926d1224cc97b333fe3375d50 100755 (executable)
@@ -84,11 +84,11 @@ for builddir in . sub; do
   $sourcedir/configure --prefix="$instdir"
   $MAKE
 
-  # Check that "make dist" creates the expected .pot file.
+  # Check that "make distdir" creates the expected .pot file.
   # (It is created under $sourcedir, because the .pot file is distributed.
   # Cf. the GNU standards, node "Makefile Basics".)
 
-  $MAKE dist
+  $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
   test $builddir = '.' || test ! -f posub/foo-bar.pot
index d7b81b0e9af787c83a6e514e7ee7ffa088de1476..0bd2407c753ebc797963d7e40276cb7fc047ca5b 100755 (executable)
@@ -84,11 +84,11 @@ for builddir in . sub; do
   $sourcedir/configure --prefix="$instdir"
   $MAKE
 
-  # Check that "make dist" creates the expected .pot file.
+  # Check that "make distdir" creates the expected .pot file.
   # (It is created under $sourcedir, because the .pot file is distributed.
   # Cf. the GNU standards, node "Makefile Basics".)
 
-  $MAKE dist
+  $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
   test $builddir = '.' || test ! -f posub/foo-bar.pot
index 65d2deaca604e922fcca5e1fe7b50932347d9173..ef5ad8bf095824f20916b2efee562706406e8744 100755 (executable)
@@ -99,11 +99,11 @@ for builddir in . sub; do
   $sourcedir/configure --prefix="$instdir"
   $MAKE
 
-  # Check that "make dist" creates the expected .pot file.
+  # Check that "make distdir" creates the expected .pot file.
   # (It is created under $sourcedir, because the .pot file is distributed.
   # Cf. the GNU standards, node "Makefile Basics".)
 
-  $MAKE dist
+  $MAKE distdir
 
   test -f $sourcedir/posub/foo-bar.pot
   test $builddir = '.' || test ! -f posub/foo-bar.pot
index 6fd1cd4e03ead6e55c8735d7e5c942aadfd4733a..61b59de59a6d5ef786f50784bf0ef730b5c181bd 100755 (executable)
@@ -94,11 +94,11 @@ for builddir in . sub; do
   $sourcedir/configure --prefix="$instdir"
   $MAKE
 
-  # Check that "make dist" creates the expected .pot file.
+  # Check that "make distdir" creates the expected .pot file.
   # (It is created under $sourcedir, because the .pot file is distributed.
   # Cf. the GNU standards, node "Makefile Basics".)
 
-  $MAKE dist
+  $MAKE distdir
 
   test -f $sourcedir/maude.pot
   test $builddir = '.' || test ! -f maude.pot