distcheck: more resilient against possible failures
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 10 Aug 2012 14:11:04 +0000 (16:11 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 10 Aug 2012 14:38:45 +0000 (16:38 +0200)
* lib/am/distdir.am (distcheck): Ensure that a failure in the commands
making the just-extracted source tree read-only cause the recipe to fail.
While at it, save a fork by creating the '_build' and '_inst' subdir
with a single mkdir invocation.

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
lib/am/distdir.am

index f636a1e..07f0502 100644 (file)
@@ -449,9 +449,9 @@ distcheck: dist
 ## Make the new source tree read-only.  Distributions ought to work in
 ## this case.  However, make the top-level directory writable so we
 ## can make our new subdirs.
-       chmod -R a-w $(distdir); chmod u+w $(distdir)
-       mkdir $(distdir)/_build
-       mkdir $(distdir)/_inst
+       chmod -R a-w $(distdir)
+       chmod u+w $(distdir)
+       mkdir $(distdir)/_build $(distdir)/_inst
 ## Undo the write access.
        chmod a-w $(distdir)
 ## With GNU make, the following command will be executed even with "make -n",