Merge branch 'maint'
authorStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 10 Aug 2012 14:51:55 +0000 (16:51 +0200)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Fri, 10 Aug 2012 14:51:55 +0000 (16:51 +0200)
* maint:
  automake: remove an unused local variable
  distcheck: more resilient against possible failures
  cleanup: remove almost-unused global var 'am_relative_dir'

automake.in
lib/am/distdir.am

index faa2d29..8b8c405 100644 (file)
@@ -481,9 +481,7 @@ my $am_file = 'BUG';
 ## Variables reset by &initialize_per_input.  ##
 ## ------------------------------------------ ##
 
-# Basename and relative dir of the input file.
-my $am_relative_dir;
-# Same but wrt Makefile.in.
+# Relative dir of the output makefile.
 my $relative_dir;
 
 # Greatest timestamp of the output's dependencies (excluding
@@ -634,7 +632,6 @@ sub initialize_per_input ()
 {
     reset_local_duplicates ();
 
-    $am_relative_dir = undef;
     $relative_dir = undef;
 
     $output_deps_greatest_timestamp = 0;
@@ -3771,12 +3768,6 @@ sub handle_dist ()
   # to set it.
   $handle_dist_run = 1;
 
-  # Scan EXTRA_DIST to see if we need to distribute anything from a
-  # subdir.  If so, add it to the list.  I didn't want to do this
-  # originally, but there were so many requests that I finally
-  # relented.
-  my $extra_dist = var ('EXTRA_DIST');
-
   $transform{'DISTCHECK-HOOK'} = !! rule 'distcheck-hook';
   $transform{'GETTEXT'} = $seen_gettext && !$seen_gettext_external;
 
@@ -7892,7 +7883,6 @@ sub generate_makefile ($$)
   my ($makefile, @inputs) = split (/:/, $output_files{$makefile_in});
 
   $relative_dir = dirname ($makefile);
-  $am_relative_dir = dirname ($makefile_am);
 
   read_main_am_file ($makefile_am, $makefile_in);
   if (handle_options)
@@ -8006,6 +7996,7 @@ sub generate_makefile ($$)
       return;
     }
 
+  my $am_relative_dir = dirname ($makefile_am);
   mkdir ($am_relative_dir, 0755) if ! -d $am_relative_dir;
 
   # We make sure that 'all:' is the first target.
index 3063b8a..1f2eef0 100644 (file)
@@ -422,9 +422,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",