]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
examples: Make 'check-example' more maintainable.
authorBruno Haible <bruno@clisp.org>
Sun, 20 Jul 2025 15:56:37 +0000 (17:56 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 20 Jul 2025 15:56:37 +0000 (17:56 +0200)
Some examples require specific sets of environment variables.
E.g. hello-go requires a PATH which uses GCC 13 or 14, not GCC 15,
due to <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119098>.

* gettext-tools/examples/check-examples: Rewrite to use one top-level function
per sample, instead of one top-level function for each check.

gettext-tools/examples/check-examples

index c3cea0c6d4dce4bba191025301c09764a5a35d09..bf8be17f8fb93fc664e42a271165ae7d9448fb7e 100755 (executable)
@@ -114,6 +114,8 @@ func_maintainerclean ()
 func_check_autoclean ()
 {
   sample="$1"
+  rm -f "$sample.out"
+
   rm -rf "$sample.bak"
   cp -a "$sample" "$sample.bak"
   func_autogen "$sample"
@@ -123,53 +125,10 @@ func_check_autoclean ()
     rm -f "$sample.out"
   fi
   rm -rf "$sample.bak"
-}
 
-func_check_autoclean_all ()
-{
-  rm -f hello-*.out
-  func_check_autoclean hello-c
-  func_check_autoclean hello-c-gnome2
-  func_check_autoclean hello-c-gnome3
-  func_check_autoclean hello-c-http
-  func_check_autoclean hello-c++
-  func_check_autoclean hello-c++20
-  func_check_autoclean hello-c++-qt
-  func_check_autoclean hello-c++-kde
-  func_check_autoclean hello-c++-gnome2
-  func_check_autoclean hello-c++-gnome3
-  func_check_autoclean hello-c++-wxwidgets
-  func_check_autoclean hello-objc
-  func_check_autoclean hello-objc-gnustep
-  func_check_autoclean hello-objc-gnome2
-  func_check_autoclean hello-python
-  func_check_autoclean hello-java
-  func_check_autoclean hello-java-awt
-  func_check_autoclean hello-java-swing
-  func_check_autoclean hello-java-qtjambi
-  func_check_autoclean hello-csharp
-  func_check_autoclean hello-csharp-forms
-  func_check_autoclean hello-guile
-  func_check_autoclean hello-clisp
-  func_check_autoclean hello-librep
-  func_check_autoclean hello-rust
-  func_check_autoclean hello-go
-  func_check_autoclean hello-go-http
-  func_check_autoclean hello-ruby
-  func_check_autoclean hello-sh
-  func_check_autoclean hello-gawk
-  func_check_autoclean hello-pascal
-  func_check_autoclean hello-modula2
-  func_check_autoclean hello-d
-  func_check_autoclean hello-smalltalk
-  func_check_autoclean hello-tcl
-  func_check_autoclean hello-tcl-tk
-  func_check_autoclean hello-perl
-  func_check_autoclean hello-php
-  func_check_autoclean hello-ycp
-  if (shopt -s failglob; echo hello-*.out) >/dev/null 2>/dev/null; then
-    echo "*** func_check_autoclean error: Leftover files:"
-    cat hello-*.out
+  if test -f "$sample.out"; then
+    echo "*** func_check_autoclean $sample error: Leftover files:"
+    cat "$sample.out"
     rm -f hello-*.out
     exit 1
   fi
@@ -190,6 +149,8 @@ func_check_autoclean_all ()
 func_check_distclean ()
 {
   sample="$1"
+  rm -f "$sample.log" "$sample.out"
+
   rm -rf "$sample.bak"
   func_autogen "$sample"
   cp -a "$sample" "$sample.bak"
@@ -203,58 +164,15 @@ func_check_distclean ()
     rm -f "$sample.out"
   fi
   rm -rf "$sample.bak"
-}
 
-func_check_distclean_all ()
-{
-  rm -f hello-*.log hello-*.out
-  func_check_distclean hello-c
- #func_check_distclean hello-c-gnome2
- #func_check_distclean hello-c-gnome3
-  func_check_distclean hello-c-http
-  func_check_distclean hello-c++
-  func_check_distclean hello-c++20
- #func_check_distclean hello-c++-qt
- #func_check_distclean hello-c++-kde
- #func_check_distclean hello-c++-gnome2
- #func_check_distclean hello-c++-gnome3
-  func_check_distclean hello-c++-wxwidgets
-  func_check_distclean hello-objc
-  func_check_distclean hello-objc-gnustep
- #func_check_distclean hello-objc-gnome2
-  func_check_distclean hello-python
-  func_check_distclean hello-java
-  func_check_distclean hello-java-awt
-  func_check_distclean hello-java-swing
-  func_check_distclean hello-java-qtjambi
-  func_check_distclean hello-csharp
-  func_check_distclean hello-csharp-forms
-  func_check_distclean hello-guile
-  func_check_distclean hello-clisp
-  func_check_distclean hello-librep
-  func_check_distclean hello-rust
-  func_check_distclean hello-go
-  func_check_distclean hello-go-http
-  func_check_distclean hello-ruby
-  func_check_distclean hello-sh
-  func_check_distclean hello-gawk
-  func_check_distclean hello-pascal
-  func_check_distclean hello-modula2
-  func_check_distclean hello-d
-  func_check_distclean hello-smalltalk
-  func_check_distclean hello-tcl
-  func_check_distclean hello-tcl-tk
-  func_check_distclean hello-perl
-  func_check_distclean hello-php
- #func_check_distclean hello-ycp
-  if (shopt -s failglob; echo hello-*.log) >/dev/null 2>/dev/null; then
-    echo "*** func_check_distclean error: 'configure' failures"
-    echo hello-*.log
+  if test -f "$sample.log"; then
+    echo "*** func_check_distclean $sample error: 'configure' failures"
+    echo "$sample.log"
     exit 1
   fi
-  if (shopt -s failglob; echo hello-*.out) >/dev/null 2>/dev/null; then
-    echo "*** func_check_distclean error: incomplete 'make distclean'"
-    echo hello-*.out
+  if test -f "$sample.out"; then
+    echo "*** func_check_distclean $sample error: incomplete 'make distclean'"
+    echo "$sample.out"
     exit 1
   fi
 }
@@ -268,6 +186,8 @@ func_check_distclean_all ()
 func_check_maintainerclean ()
 {
   sample="$1"
+  rm -f "$sample.log" "$sample.out"
+
   rm -rf "$sample.bak"
   func_autogen "$sample"
   cp -a "$sample" "$sample.bak"
@@ -285,58 +205,15 @@ func_check_maintainerclean ()
     rm -f "$sample.out"
   fi
   rm -rf "$sample.bak"
-}
 
-func_check_maintainerclean_all ()
-{
-  rm -f hello-*.log hello-*.out
-  func_check_maintainerclean hello-c
- #func_check_maintainerclean hello-c-gnome2
- #func_check_maintainerclean hello-c-gnome3
-  func_check_maintainerclean hello-c-http
-  func_check_maintainerclean hello-c++
-  func_check_maintainerclean hello-c++20
- #func_check_maintainerclean hello-c++-qt
- #func_check_maintainerclean hello-c++-kde
- #func_check_maintainerclean hello-c++-gnome2
- #func_check_maintainerclean hello-c++-gnome3
-  func_check_maintainerclean hello-c++-wxwidgets
-  func_check_maintainerclean hello-objc
-  func_check_maintainerclean hello-objc-gnustep
- #func_check_maintainerclean hello-objc-gnome2
-  func_check_maintainerclean hello-python
-  func_check_maintainerclean hello-java
-  func_check_maintainerclean hello-java-awt
-  func_check_maintainerclean hello-java-swing
- #func_check_maintainerclean hello-java-qtjambi
-  func_check_maintainerclean hello-csharp
-  func_check_maintainerclean hello-csharp-forms
-  func_check_maintainerclean hello-guile
-  func_check_maintainerclean hello-clisp
-  func_check_maintainerclean hello-librep
-  func_check_maintainerclean hello-rust
-  func_check_maintainerclean hello-go
-  func_check_maintainerclean hello-go-http
-  func_check_maintainerclean hello-ruby
-  func_check_maintainerclean hello-sh
-  func_check_maintainerclean hello-gawk
-  func_check_maintainerclean hello-pascal
-  func_check_maintainerclean hello-modula2
-  func_check_maintainerclean hello-d
-  func_check_maintainerclean hello-smalltalk
-  func_check_maintainerclean hello-tcl
-  func_check_maintainerclean hello-tcl-tk
-  func_check_maintainerclean hello-perl
-  func_check_maintainerclean hello-php
- #func_check_maintainerclean hello-ycp
-  if (shopt -s failglob; echo hello-*log) >/dev/null 2>/dev/null; then
-    echo "*** func_check_maintainerclean error: 'make' failures"
-    echo hello-*.log
+  if test -f "$sample.log"; then
+    echo "*** func_check_maintainerclean $sample error: 'make' failures"
+    echo "$sample.log"
     exit 1
   fi
-  if (shopt -s failglob; echo hello-*.out) >/dev/null 2>/dev/null; then
-    echo "*** func_check_maintainerclean error: incomplete 'make maintainer-clean'"
-    echo hello-*.out
+  if test -f "$sample.out"; then
+    echo "*** func_check_maintainerclean $sample error: incomplete 'make maintainer-clean'"
+    echo "$sample.out"
     exit 1
   fi
 }
@@ -347,6 +224,8 @@ func_check_maintainerclean_all ()
 func_check_maintainerclean_vpath ()
 {
   sample="$1"
+  rm -f "$sample.log" "$sample.out"
+
   case "$sample" in
     hello-objc-gnustep) ;;
     *)
@@ -370,58 +249,15 @@ func_check_maintainerclean_vpath ()
       rm -rf "$sample.bak"
       ;;
   esac
-}
 
-func_check_maintainerclean_vpath_all ()
-{
-  rm -f hello-*.log hello-*.out
-  func_check_maintainerclean_vpath hello-c
- #func_check_maintainerclean_vpath hello-c-gnome2
- #func_check_maintainerclean_vpath hello-c-gnome3
-  func_check_maintainerclean_vpath hello-c-http
-  func_check_maintainerclean_vpath hello-c++
-  func_check_maintainerclean_vpath hello-c++20
- #func_check_maintainerclean_vpath hello-c++-qt
- #func_check_maintainerclean_vpath hello-c++-kde
- #func_check_maintainerclean_vpath hello-c++-gnome2
- #func_check_maintainerclean_vpath hello-c++-gnome3
-  func_check_maintainerclean_vpath hello-c++-wxwidgets
-  func_check_maintainerclean_vpath hello-objc
-  func_check_maintainerclean_vpath hello-objc-gnustep
- #func_check_maintainerclean_vpath hello-objc-gnome2
-  func_check_maintainerclean_vpath hello-python
-  func_check_maintainerclean_vpath hello-java
-  func_check_maintainerclean_vpath hello-java-awt
-  func_check_maintainerclean_vpath hello-java-swing
- #func_check_maintainerclean_vpath hello-java-qtjambi
-  func_check_maintainerclean_vpath hello-csharp
-  func_check_maintainerclean_vpath hello-csharp-forms
-  func_check_maintainerclean_vpath hello-guile
-  func_check_maintainerclean_vpath hello-clisp
-  func_check_maintainerclean_vpath hello-librep
-  func_check_maintainerclean_vpath hello-rust
-  func_check_maintainerclean_vpath hello-go
-  func_check_maintainerclean_vpath hello-go-http
-  func_check_maintainerclean_vpath hello-ruby
-  func_check_maintainerclean_vpath hello-sh
-  func_check_maintainerclean_vpath hello-gawk
-  func_check_maintainerclean_vpath hello-pascal
-  func_check_maintainerclean_vpath hello-modula2
-  func_check_maintainerclean_vpath hello-d
-  func_check_maintainerclean_vpath hello-smalltalk
-  func_check_maintainerclean_vpath hello-tcl
-  func_check_maintainerclean_vpath hello-tcl-tk
-  func_check_maintainerclean_vpath hello-perl
-  func_check_maintainerclean_vpath hello-php
- #func_check_maintainerclean_vpath hello-ycp
-  if (shopt -s failglob; echo hello-*log) >/dev/null 2>/dev/null; then
-    echo "*** func_check_maintainerclean_vpath error: 'make' failures"
-    echo hello-*.log
+  if test -f "$sample.log"; then
+    echo "*** func_check_maintainerclean_vpath $sample error: 'make' failures"
+    echo "$sample.log"
     exit 1
   fi
-  if (shopt -s failglob; echo hello-*.out) >/dev/null 2>/dev/null; then
-    echo "*** func_check_maintainerclean_vpath error: incomplete 'make maintainer-clean'"
-    echo hello-*.out
+  if test -f "$sample.out"; then
+    echo "*** func_check_maintainerclean_vpath $sample error: incomplete 'make maintainer-clean'"
+    echo "$sample.out"
     exit 1
   fi
 }
@@ -432,6 +268,8 @@ func_check_maintainerclean_vpath_all ()
 func_check_dist ()
 {
   sample="$1"
+  rm -f "$sample.log" "$sample.out"
+
   case "$sample" in
     hello-objc-gnustep) ;;
     *)
@@ -462,58 +300,15 @@ func_check_dist ()
       fi
       ;;
   esac
-}
 
-func_check_dist_all ()
-{
-  rm -f hello-*.log hello-*.out
-  func_check_dist hello-c
- #func_check_dist hello-c-gnome2
- #func_check_dist hello-c-gnome3
-  func_check_dist hello-c-http
-  func_check_dist hello-c++
-  func_check_dist hello-c++20
- #func_check_dist hello-c++-qt
- #func_check_dist hello-c++-kde
- #func_check_dist hello-c++-gnome2
- #func_check_dist hello-c++-gnome3
-  func_check_dist hello-c++-wxwidgets
-  func_check_dist hello-objc
-  func_check_dist hello-objc-gnustep
- #func_check_dist hello-objc-gnome2
-  func_check_dist hello-python
-  func_check_dist hello-java
-  func_check_dist hello-java-awt
-  func_check_dist hello-java-swing
- #func_check_dist hello-java-qtjambi
-  func_check_dist hello-csharp
-  func_check_dist hello-csharp-forms
-  func_check_dist hello-guile
-  func_check_dist hello-clisp
-  func_check_dist hello-librep
-  func_check_dist hello-rust
-  func_check_dist hello-go
-  func_check_dist hello-go-http
-  func_check_dist hello-ruby
-  func_check_dist hello-sh
-  func_check_dist hello-gawk
-  func_check_dist hello-pascal
-  func_check_dist hello-modula2
-  func_check_dist hello-d
-  func_check_dist hello-smalltalk
-  func_check_dist hello-tcl
-  func_check_dist hello-tcl-tk
-  func_check_dist hello-perl
-  func_check_dist hello-php
- #func_check_dist hello-ycp
-  if (shopt -s failglob; echo hello-*log) >/dev/null 2>/dev/null; then
-    echo "*** func_check_dist error: 'make dist' failures"
-    echo hello-*.log
+  if test -f "$sample.log"; then
+    echo "*** func_check_dist $sample error: 'make dist' failures"
+    echo "$sample.log"
     exit 1
   fi
-  if (shopt -s failglob; echo hello-*.out) >/dev/null 2>/dev/null; then
-    echo "*** func_check_dist error: tarball created by 'make dist' does not contain the expected files"
-    echo hello-*.out
+  if test -f "$sample.out"; then
+    echo "*** func_check_dist $sample error: tarball created by 'make dist' does not contain the expected files"
+    echo "$sample.out"
     exit 1
   fi
 }
@@ -524,6 +319,8 @@ func_check_dist_all ()
 func_check_dist_vpath ()
 {
   sample="$1"
+  rm -f "$sample.log" "$sample.out"
+
   case "$sample" in
     hello-objc-gnustep) ;;
     *)
@@ -554,58 +351,15 @@ func_check_dist_vpath ()
       fi
       ;;
   esac
-}
 
-func_check_dist_vpath_all ()
-{
-  rm -f hello-*.log hello-*.out
-  func_check_dist_vpath hello-c
- #func_check_dist_vpath hello-c-gnome2
- #func_check_dist_vpath hello-c-gnome3
-  func_check_dist_vpath hello-c-http
-  func_check_dist_vpath hello-c++
-  func_check_dist_vpath hello-c++20
- #func_check_dist_vpath hello-c++-qt
- #func_check_dist_vpath hello-c++-kde
- #func_check_dist_vpath hello-c++-gnome2
- #func_check_dist_vpath hello-c++-gnome3
-  func_check_dist_vpath hello-c++-wxwidgets
-  func_check_dist_vpath hello-objc
-  func_check_dist_vpath hello-objc-gnustep
- #func_check_dist_vpath hello-objc-gnome2
-  func_check_dist_vpath hello-python
-  func_check_dist_vpath hello-java
-  func_check_dist_vpath hello-java-awt
-  func_check_dist_vpath hello-java-swing
- #func_check_dist_vpath hello-java-qtjambi
-  func_check_dist_vpath hello-csharp
-  func_check_dist_vpath hello-csharp-forms
-  func_check_dist_vpath hello-guile
-  func_check_dist_vpath hello-clisp
-  func_check_dist_vpath hello-librep
-  func_check_dist_vpath hello-rust
-  func_check_dist_vpath hello-go
-  func_check_dist_vpath hello-go-http
-  func_check_dist_vpath hello-ruby
-  func_check_dist_vpath hello-sh
-  func_check_dist_vpath hello-gawk
-  func_check_dist_vpath hello-pascal
-  func_check_dist_vpath hello-modula2
-  func_check_dist_vpath hello-d
-  func_check_dist_vpath hello-smalltalk
-  func_check_dist_vpath hello-tcl
-  func_check_dist_vpath hello-tcl-tk
-  func_check_dist_vpath hello-perl
-  func_check_dist_vpath hello-php
- #func_check_dist_vpath hello-ycp
-  if (shopt -s failglob; echo hello-*log) >/dev/null 2>/dev/null; then
-    echo "*** func_check_dist_vpath error: 'make dist' failures"
-    echo hello-*.log
+  if test -f "$sample.log"; then
+    echo "*** func_check_dist_vpath $sample error: 'make dist' failures"
+    echo "$sample.log"
     exit 1
   fi
-  if (shopt -s failglob; echo hello-*.out) >/dev/null 2>/dev/null; then
-    echo "*** func_check_dist_vpath error: tarball created by 'make dist' does not contain the expected files"
-    echo hello-*.out
+  if test -f "$sample.out"; then
+    echo "*** func_check_dist_vpath $sample error: tarball created by 'make dist' does not contain the expected files"
+    echo "$sample.out"
     exit 1
   fi
 }
@@ -620,6 +374,9 @@ instdir=/tmp/gtexinst
 func_check_install ()
 {
   sample="$1"
+  rm -f "$sample.log"
+  rm -rf "$instdir/$sample"
+
   case "$sample" in
     hello-objc-gnustep)
       # In this sample, you have to check the uninstalled binaries (see the INSTALL file).
@@ -637,54 +394,10 @@ func_check_install ()
       func_autoclean "$sample"
       ;;
   esac
-}
 
-func_check_install_all ()
-{
-  rm -f hello-*.log
-  rm -rf "$instdir/hello-*"
-  func_check_install hello-c
- #func_check_install hello-c-gnome2
- #func_check_install hello-c-gnome3
-  func_check_install hello-c-http
-  func_check_install hello-c++
-  func_check_install hello-c++20
- #func_check_install hello-c++-qt
- #func_check_install hello-c++-kde
- #func_check_install hello-c++-gnome2
- #func_check_install hello-c++-gnome3
-  func_check_install hello-c++-wxwidgets
-  func_check_install hello-objc
-  func_check_install hello-objc-gnustep
- #func_check_install hello-objc-gnome2
-  func_check_install hello-python
-  func_check_install hello-java
-  func_check_install hello-java-awt
-  func_check_install hello-java-swing
- #func_check_install hello-java-qtjambi
-  func_check_install hello-csharp
-  func_check_install hello-csharp-forms
-  func_check_install hello-guile
-  func_check_install hello-clisp
-  func_check_install hello-librep
-  func_check_install hello-rust
-  func_check_install hello-go
-  func_check_install hello-go-http
-  func_check_install hello-ruby
-  func_check_install hello-sh
-  func_check_install hello-gawk
-  func_check_install hello-pascal
-  func_check_install hello-modula2
-  func_check_install hello-d
-  func_check_install hello-smalltalk
-  func_check_install hello-tcl
-  func_check_install hello-tcl-tk
-  func_check_install hello-perl
-  func_check_install hello-php
- #func_check_install hello-ycp
-  if (shopt -s failglob; echo hello-*log) >/dev/null 2>/dev/null; then
-    echo "*** func_check_install error: 'make install' failures"
-    echo hello-*.log
+  if test -f "$sample.log"; then
+    echo "*** func_check_install $sample error: 'make install' failures"
+    echo "$sample.log"
     exit 1
   fi
 }
@@ -695,6 +408,9 @@ func_check_install_all ()
 func_check_uninstall ()
 {
   sample="$1"
+  rm -f "$sample.log" "$sample.out"
+  rm -rf "$instdir/$sample"
+
   case "$sample" in
     hello-objc-gnustep)
       # In this sample, you have to check the uninstalled binaries (see the INSTALL file).
@@ -718,59 +434,15 @@ func_check_uninstall ()
       fi
       ;;
   esac
-}
 
-func_check_uninstall_all ()
-{
-  rm -f hello-*.log hello-*.out
-  rm -rf "$instdir/hello-*"
-  func_check_uninstall hello-c
- #func_check_uninstall hello-c-gnome2
- #func_check_uninstall hello-c-gnome3
-  func_check_uninstall hello-c-http
-  func_check_uninstall hello-c++
-  func_check_uninstall hello-c++20
- #func_check_uninstall hello-c++-qt
- #func_check_uninstall hello-c++-kde
- #func_check_uninstall hello-c++-gnome2
- #func_check_uninstall hello-c++-gnome3
-  func_check_uninstall hello-c++-wxwidgets
-  func_check_uninstall hello-objc
-  func_check_uninstall hello-objc-gnustep
- #func_check_uninstall hello-objc-gnome2
-  func_check_uninstall hello-python
-  func_check_uninstall hello-java
-  func_check_uninstall hello-java-awt
-  func_check_uninstall hello-java-swing
- #func_check_uninstall hello-java-qtjambi
-  func_check_uninstall hello-csharp
-  func_check_uninstall hello-csharp-forms
-  func_check_uninstall hello-guile
-  func_check_uninstall hello-clisp
-  func_check_uninstall hello-librep
-  func_check_uninstall hello-rust
-  func_check_uninstall hello-go
-  func_check_uninstall hello-go-http
-  func_check_uninstall hello-ruby
-  func_check_uninstall hello-sh
-  func_check_uninstall hello-gawk
-  func_check_uninstall hello-pascal
-  func_check_uninstall hello-modula2
-  func_check_uninstall hello-d
-  func_check_uninstall hello-smalltalk
-  func_check_uninstall hello-tcl
-  func_check_uninstall hello-tcl-tk
-  func_check_uninstall hello-perl
-  func_check_uninstall hello-php
- #func_check_uninstall hello-ycp
-  if (shopt -s failglob; echo hello-*log) >/dev/null 2>/dev/null; then
-    echo "*** func_check_uninstall error: 'make uninstall' failures"
-    echo hello-*.log
+  if test -f "$sample.log"; then
+    echo "*** func_check_uninstall $sample error: 'make uninstall' failures"
+    echo "$sample.log"
     exit 1
   fi
-  if (shopt -s failglob; echo hello-*.out) >/dev/null 2>/dev/null; then
-    echo "*** func_check_uninstall error: left-over files"
-    echo hello-*.out
+  if test -f "$sample.out"; then
+    echo "*** func_check_uninstall $sample error: left-over files"
+    echo "$sample.out"
     exit 1
   fi
 }
@@ -781,6 +453,8 @@ func_check_uninstall_all ()
 func_check_distcheck ()
 {
   sample="$1"
+  rm -f "$sample.log"
+
   case "$sample" in
     hello-objc-gnustep) ;;
     *)
@@ -802,61 +476,16 @@ func_check_distcheck ()
       fi
       ;;
   esac
-}
 
-func_check_distcheck_all ()
-{
-  rm -f hello-*.log
-  func_check_distcheck hello-c
- #func_check_distcheck hello-c-gnome2
- #func_check_distcheck hello-c-gnome3
-  func_check_distcheck hello-c-http
-  func_check_distcheck hello-c++
-  func_check_distcheck hello-c++20
- #func_check_distcheck hello-c++-qt
- #func_check_distcheck hello-c++-kde
- #func_check_distcheck hello-c++-gnome2
- #func_check_distcheck hello-c++-gnome3
-  func_check_distcheck hello-c++-wxwidgets
-  func_check_distcheck hello-objc
-  func_check_distcheck hello-objc-gnustep
- #func_check_distcheck hello-objc-gnome2
-  func_check_distcheck hello-python
-  func_check_distcheck hello-java
-  func_check_distcheck hello-java-awt
-  func_check_distcheck hello-java-swing
- #func_check_distcheck hello-java-qtjambi
-  func_check_distcheck hello-csharp
-  func_check_distcheck hello-csharp-forms
-  func_check_distcheck hello-guile
-  func_check_distcheck hello-clisp
-  func_check_distcheck hello-librep
-  func_check_distcheck hello-rust
-  func_check_distcheck hello-go
-  func_check_distcheck hello-go-http
-  func_check_distcheck hello-ruby
-  func_check_distcheck hello-sh
-  func_check_distcheck hello-gawk
-  func_check_distcheck hello-pascal
-  func_check_distcheck hello-modula2
-  func_check_distcheck hello-d
-  func_check_distcheck hello-smalltalk
-  func_check_distcheck hello-tcl
-  func_check_distcheck hello-tcl-tk
-  func_check_distcheck hello-perl
-  func_check_distcheck hello-php
- #func_check_distcheck hello-ycp
-  if (shopt -s failglob; echo hello-*log) >/dev/null 2>/dev/null; then
-    echo "*** func_check_distcheck error: 'make distcheck' failures"
-    echo hello-*.log
+  if test -f "$sample.log"; then
+    echo "*** func_check_distcheck $sample error: 'make distcheck' failures"
+    echo "$sample.log"
     exit 1
   fi
 }
 
 
-# If you want to extend this script:
-
-# A check function for a single sample.
+# A check function for a single sample, when there are no problems.
 func_check ()
 {
   func_check_autoclean "$1"
@@ -870,59 +499,314 @@ func_check ()
   func_check_distcheck "$1"
 }
 
-# Complete list of samples.
-func_check_all ()
+# A check function for each sample.
+
+func_check__hello_c ()
 {
   func_check hello-c
-  func_check hello-c-gnome2
-  func_check hello-c-gnome3
+}
+
+func_check__hello_c_gnome2 ()
+{
+  func_check_autoclean hello-c-gnome2
+ #func_check_distclean hello-c-gnome2
+ #func_check_maintainerclean hello-c-gnome2
+ #func_check_maintainerclean_vpath hello-c-gnome2
+ #func_check_dist hello-c-gnome2
+ #func_check_dist_vpath hello-c-gnome2
+ #func_check_install hello-c-gnome2
+ #func_check_uninstall hello-c-gnome2
+ #func_check_distcheck hello-c-gnome2
+}
+
+func_check__hello_c_gnome3 ()
+{
+  func_check_autoclean hello-c-gnome3
+ #func_check_distclean hello-c-gnome3
+ #func_check_maintainerclean hello-c-gnome3
+ #func_check_maintainerclean_vpath hello-c-gnome3
+ #func_check_dist hello-c-gnome3
+ #func_check_dist_vpath hello-c-gnome3
+ #func_check_install hello-c-gnome3
+ #func_check_uninstall hello-c-gnome3
+ #func_check_distcheck hello-c-gnome3
+}
+
+func_check__hello_c_http ()
+{
   func_check hello-c-http
+}
+
+func_check__hello_cxx ()
+{
   func_check hello-c++
+}
+
+func_check__hello_cxx20 ()
+{
   func_check hello-c++20
-  func_check hello-c++-qt
-  func_check hello-c++-kde
-  func_check hello-c++-gnome2
-  func_check hello-c++-gnome3
+}
+
+func_check__hello_cxx_qt ()
+{
+  func_check_autoclean hello-c++-qt
+ #func_check_distclean hello-c++-qt
+ #func_check_maintainerclean hello-c++-qt
+ #func_check_maintainerclean_vpath hello-c++-qt
+ #func_check_dist hello-c++-qt
+ #func_check_dist_vpath hello-c++-qt
+ #func_check_install hello-c++-qt
+ #func_check_uninstall hello-c++-qt
+ #func_check_distcheck hello-c++-qt
+}
+
+func_check__hello_cxx_kde ()
+{
+  func_check_autoclean hello-c++-kde
+ #func_check_distclean hello-c++-kde
+ #func_check_maintainerclean hello-c++-kde
+ #func_check_maintainerclean_vpath hello-c++-kde
+ #func_check_dist hello-c++-kde
+ #func_check_dist_vpath hello-c++-kde
+ #func_check_install hello-c++-kde
+ #func_check_uninstall hello-c++-kde
+ #func_check_distcheck hello-c++-kde
+}
+
+func_check__hello_cxx_gnome2 ()
+{
+  func_check_autoclean hello-c++-gnome2
+ #func_check_distclean hello-c++-gnome2
+ #func_check_maintainerclean hello-c++-gnome2
+ #func_check_maintainerclean_vpath hello-c++-gnome2
+ #func_check_dist hello-c++-gnome2
+ #func_check_dist_vpath hello-c++-gnome2
+ #func_check_install hello-c++-gnome2
+ #func_check_uninstall hello-c++-gnome2
+ #func_check_distcheck hello-c++-gnome2
+}
+
+func_check__hello_cxx_gnome3 ()
+{
+  func_check_autoclean hello-c++-gnome3
+ #func_check_distclean hello-c++-gnome3
+ #func_check_maintainerclean hello-c++-gnome3
+ #func_check_maintainerclean_vpath hello-c++-gnome3
+ #func_check_dist hello-c++-gnome3
+ #func_check_dist_vpath hello-c++-gnome3
+ #func_check_install hello-c++-gnome3
+ #func_check_uninstall hello-c++-gnome3
+ #func_check_distcheck hello-c++-gnome3
+}
+
+func_check__hello_cxx_wxwidgets ()
+{
   func_check hello-c++-wxwidgets
+}
+
+func_check__hello_objc ()
+{
   func_check hello-objc
+}
+
+func_check__hello_objc_gnustep ()
+{
   func_check hello-objc-gnustep
-  func_check hello-objc-gnome2
+}
+
+func_check__hello_objc_gnome2 ()
+{
+  func_check_autoclean hello-objc-gnome2
+ #func_check_distclean hello-objc-gnome2
+ #func_check_maintainerclean hello-objc-gnome2
+ #func_check_maintainerclean_vpath hello-objc-gnome2
+ #func_check_dist hello-objc-gnome2
+ #func_check_dist_vpath hello-objc-gnome2
+ #func_check_install hello-objc-gnome2
+ #func_check_uninstall hello-objc-gnome2
+ #func_check_distcheck hello-objc-gnome2
+}
+
+func_check__hello_python ()
+{
   func_check hello-python
+}
+
+func_check__hello_java ()
+{
   func_check hello-java
+}
+
+func_check__hello_java_awt ()
+{
   func_check hello-java-awt
+}
+
+func_check__hello_java_swing ()
+{
   func_check hello-java-swing
-  func_check hello-java-qtjambi
+}
+
+func_check__hello_java_qtjambi ()
+{
+  func_check_autoclean hello-java-qtjambi
+  func_check_distclean hello-java-qtjambi
+ #func_check_maintainerclean hello-java-qtjambi
+ #func_check_maintainerclean_vpath hello-java-qtjambi
+ #func_check_dist hello-java-qtjambi
+ #func_check_dist_vpath hello-java-qtjambi
+ #func_check_install hello-java-qtjambi
+ #func_check_uninstall hello-java-qtjambi
+ #func_check_distcheck hello-java-qtjambi
+}
+
+func_check__hello_csharp ()
+{
   func_check hello-csharp
+}
+
+func_check__hello_csharp_forms ()
+{
   func_check hello-csharp-forms
+}
+
+func_check__hello_guile ()
+{
   func_check hello-guile
+}
+
+func_check__hello_clisp ()
+{
   func_check hello-clisp
+}
+
+func_check__hello_librep ()
+{
   func_check hello-librep
+}
+
+func_check__hello_rust ()
+{
   func_check hello-rust
+}
+
+func_check__hello_go ()
+{
   func_check hello-go
+}
+
+func_check__hello_go_http ()
+{
   func_check hello-go-http
+}
+
+func_check__hello_ruby ()
+{
   func_check hello-ruby
+}
+
+func_check__hello_sh ()
+{
   func_check hello-sh
+}
+
+func_check__hello_gawk ()
+{
   func_check hello-gawk
+}
+
+func_check__hello_pascal ()
+{
   func_check hello-pascal
+}
+
+func_check__hello_modula2 ()
+{
   func_check hello-modula2
+}
+
+func_check__hello_d ()
+{
   func_check hello-d
+}
+
+func_check__hello_smalltalk ()
+{
   func_check hello-smalltalk
+}
+
+func_check__hello_tcl ()
+{
   func_check hello-tcl
+}
+
+func_check__hello_tcl_tk ()
+{
   func_check hello-tcl-tk
+}
+
+func_check__hello_perl ()
+{
   func_check hello-perl
+}
+
+func_check__hello_php ()
+{
   func_check hello-php
-  func_check hello-ycp
+}
+
+func_check__hello_ycp ()
+{
+  func_check_autoclean hello-ycp
+ #func_check_distclean hello-ycp
+ #func_check_maintainerclean hello-ycp
+ #func_check_maintainerclean_vpath hello-ycp
+ #func_check_dist hello-ycp
+ #func_check_dist_vpath hello-ycp
+ #func_check_install hello-ycp
+ #func_check_uninstall hello-ycp
+ #func_check_distcheck hello-ycp
 }
 
 
 # Top-level code.
 
-func_check_autoclean_all
-func_check_distclean_all
-func_check_maintainerclean_all
-func_check_maintainerclean_vpath_all
-func_check_dist_all
-func_check_dist_vpath_all
-func_check_install_all
-func_check_uninstall_all
-func_check_distcheck_all
+func_check__hello_c
+func_check__hello_c_gnome2
+func_check__hello_c_gnome3
+func_check__hello_c_http
+func_check__hello_cxx
+func_check__hello_cxx20
+func_check__hello_cxx_qt
+func_check__hello_cxx_kde
+func_check__hello_cxx_gnome2
+func_check__hello_cxx_gnome3
+func_check__hello_cxx_wxwidgets
+func_check__hello_objc
+func_check__hello_objc_gnustep
+func_check__hello_objc_gnome2
+func_check__hello_python
+func_check__hello_java
+func_check__hello_java_awt
+func_check__hello_java_swing
+func_check__hello_java_qtjambi
+func_check__hello_csharp
+func_check__hello_csharp_forms
+func_check__hello_guile
+func_check__hello_clisp
+func_check__hello_librep
+func_check__hello_rust
+func_check__hello_go
+func_check__hello_go_http
+func_check__hello_ruby
+func_check__hello_sh
+func_check__hello_gawk
+func_check__hello_pascal
+func_check__hello_modula2
+func_check__hello_d
+func_check__hello_smalltalk
+func_check__hello_tcl
+func_check__hello_tcl_tk
+func_check__hello_perl
+func_check__hello_php
+func_check__hello_ycp