]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
Merge branch 'preproc' into maint
authorStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 5 Mar 2013 14:58:49 +0000 (15:58 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Tue, 5 Mar 2013 14:58:49 +0000 (15:58 +0100)
* preproc:
  preproc: enhance and extend tests
  preproc: add support for relative names in included fragments

Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
1  2 
NEWS
automake.in

diff --cc NEWS
Simple merge
diff --cc automake.in
index 13811f7963fbffb59b55d2b6f960ca78c3c1dccf,80e54ffdbe97dfa6d243d1a51debb4918036f3a1..70f1f670c04cc417e07dd58b11a2312a8de41533
@@@ -6195,8 -6330,8 +6195,8 @@@ sub check_trailing_slash ($\$
  }
  
  
- # read_am_file ($AMFILE, $WHERE)
- # ------------------------------
 -# &read_am_file ($AMFILE, $WHERE, $RELDIR)
 -# ----------------------------------------
++# read_am_file ($AMFILE, $WHERE, $RELDIR)
++# ---------------------------------------
  # Read Makefile.am and set up %contents.  Simultaneously copy lines
  # from Makefile.am into $output_trailer, or define variables as
  # appropriate.  NOTE we put rules in the trailer section.  We want
@@@ -6449,8 -6596,10 +6461,10 @@@ sub read_am_file ($$$
                push_dist_common ("\$\(srcdir\)/$path");
                $path = $relative_dir . "/" . $path if $relative_dir ne '.';
              }
+           my $new_reldir = File::Spec->abs2rel ($path, $relative_dir);
+           $new_reldir = '.' if $new_reldir !~ s,/[^/]*$,,;
            $where->push_context ("'$path' included from here");
-           read_am_file ($path, $where);
 -          &read_am_file ($path, $where, $new_reldir);
++          read_am_file ($path, $where, $new_reldir);
            $where->pop_context;
        }
        else
@@@ -6517,10 -6669,10 +6531,10 @@@ sub read_main_am_file ($$
  
      # We want to predefine as many variables as possible.  This lets
      # the user set them with '+=' in Makefile.am.
 -    &define_standard_variables;
 +    define_standard_variables;
  
      # Read user file, which might override some of our values.
-     read_am_file ($amfile, new Automake::Location);
 -    &read_am_file ($amfile, new Automake::Location, '.');
++    read_am_file ($amfile, new Automake::Location, '.');
  }