bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[includes patch] make distcheck hangs indefiniitely if a tool reads from


From: James Youngman
Subject: [includes patch] make distcheck hangs indefiniitely if a tool reads from stdin
Date: Sun, 21 Nov 2004 13:01:46 +0000
User-agent: Mutt/1.3.28i

Hello,

In Automake versions 1.8 and 1.9 we have a check that verifies that
binaries support --version and --help.  Well, the GNU coding standard
specifies those.  Fine.

>From the point of view of this check, programs that support these
options are uninteresting; the interesting cases are the programs that
don't support these options, and we should catch those.  

However, we have a bug, I think.  If a program fails to support --help
or --version but instead wants to read data from stdin, "make
distcheck" will hang forever.  GNU findutils comes with three such
programs, which are used to build the locate database (they are not
intended to be invoked directly by humans).  

When installcheck-%DIR%PROGRAMS comes to check these binaries (which
findutils installs in libexecdir), It just hangs because it invokes
them without redirecting stdin, and "make" waits forever waiting for
the processes (in this case the shell which is waiting for the tested
program) to exit.  I think this patch fixes the problem:

diff -u -r1.1 progs.am
--- progs.am    2004/11/21 12:50:33     1.1
+++ progs.am    2004/11/21 12:50:55
@@ -120,7 +120,7 @@
 ## Insert the directory back if nobase_ is used.
 ?!BASE?          f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
          for opt in --help --version; do \
-           if "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt > c$${pid}_.out 2> 
c$${pid}_.err \
+           if "$(DESTDIR)$(%NDIR%dir)/$$f" $$opt > c$${pid}_.out 2> 
c$${pid}_.err </dev/null \
                 && test -n "`cat c$${pid}_.out`" \
                 && test -z "`cat c$${pid}_.err`"; then :; \
            else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \


Regards,
James.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]