From: Stefano Lattarini Date: Tue, 5 Mar 2013 14:58:49 +0000 (+0100) Subject: Merge branch 'preproc' into maint X-Git-Tag: v1.13b~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9cbd5436781986a5a05c7bd214d68671b7cf5f31;p=thirdparty%2Fautomake.git Merge branch 'preproc' into maint * preproc: preproc: enhance and extend tests preproc: add support for relative names in included fragments Signed-off-by: Stefano Lattarini --- 9cbd5436781986a5a05c7bd214d68671b7cf5f31 diff --cc automake.in index 13811f796,80e54ffdb..70f1f670c --- a/automake.in +++ b/automake.in @@@ -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, '.'); }