]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(check-programs-vs-x):
authorJim Meyering <jim@meyering.net>
Thu, 6 Nov 2003 08:03:27 +0000 (08:03 +0000)
committerJim Meyering <jim@meyering.net>
Thu, 6 Nov 2003 08:03:27 +0000 (08:03 +0000)
Work even if $(programs) contains '$'.
Work even if 'missing=1' in environment.
Don't report an error simply because $(programs) outputs nothing.

man/Makefile.am

index a367c3ddc57fb66c1307cfd9432b38cdfe9ea690..f634a8f0c12d7dc12e0a6ce79b5dd4262958fe49 100644 (file)
@@ -160,10 +160,11 @@ programs =                                                                \
 
 .PHONY: check-programs-vs-x
 check-programs-vs-x:
-       test "$(programs)" && : || exit 1
-       for p in `$(programs)`; do                      \
+       status=0;                                       \
+       for p in dummy `$(programs)`; do                \
+         test $$p = dummy && continue;                 \
          test $$p = ginstall && p=install || : ;       \
          test -f $(srcdir)/$$p.x                       \
-           || { echo missing $$p.x 1>&2; missing=1; }; \
+           || { echo missing $$p.x 1>&2; status=1; };  \
        done;                                           \
-       test "$$missing" = 1 && exit 1 || :
+       exit $$status