bug-automake
[Top][All Lists]
Advanced

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

Re: multiple outputs rule


From: Ralf Wildenhues
Subject: Re: multiple outputs rule
Date: Sat, 27 Jan 2007 17:31:57 +0100
User-agent: Mutt/1.5.13 (2006-08-11)

* Bruno Haible wrote on Fri, Dec 15, 2006 at 01:14:43PM CET:
>
[ a good patch that I think there's no need to wait longer for approval ]
> 
> Oops, I meant to remove only data.lock here. The suggested patch is this:

Thanks again, I've applied this to branch-1-10 and HEAD.

Cheers,
Ralf

2007-01-27 Bruno Haible  <address@hidden>

        * doc/automake.texi (Multiple Outputs): Fix the multiple outputs
        with locking example.

Index: doc/automake.texi
===================================================================
RCS file: /cvs/automake/automake/doc/automake.texi,v
retrieving revision 1.163
diff -u -r1.163 automake.texi
--- doc/automake.texi   27 Jan 2007 16:17:54 -0000      1.163
+++ doc/automake.texi   27 Jan 2007 16:30:01 -0000
@@ -10657,18 +10657,19 @@
 data.c data.h data.w data.x: data.stamp
 ## Recover from the removal of $@@
         @@if test -f $@@; then :; else \
-          trap 'rm -rf data.lock data.stamp 1 2 13 15; \
+          trap 'rm -rf data.lock data.stamp' 1 2 13 15; \
 ## mkdir is a portable test-and-set
           if mkdir data.lock 2>/dev/null; then \
 ## This code is being executed by the first process.
             rm -f data.stamp; \
             $(MAKE) $(AM_MAKEFLAGS) data.stamp; \
+            result=$$?; rm -rf data.lock; exit $$result; \
           else \
 ## This code is being executed by the follower processes.
 ## Wait until the first process is done.
             while test -d data.lock; do sleep 1; done; \
 ## Succeed if and only if the first process succeeded.
-            test -f data.stamp; exit $$?; \
+            test -f data.stamp; \
           fi; \
         fi
 @end example




reply via email to

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