From: Mathieu Lirzin Date: Tue, 19 Sep 2017 11:29:18 +0000 (+0200) Subject: Merge branch 'minor' X-Git-Tag: v1.16~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fnext;p=thirdparty%2Fautomake.git Merge branch 'minor' --- 561f4736f68e80a9235c7fab48d72de118282d6d diff --cc bin/automake.in index 4a7bc1203,653340563..6621302d8 --- a/bin/automake.in +++ b/bin/automake.in @@@ -2242,20 -2344,38 +2244,29 @@@ sub handle_LIBOBJS_or_ALLOC # to define LIBOBJDIR and ensure the files get cleaned. # Otherwise LIBOBJDIR can be left undefined, and the cleaning # is achieved by 'rm -f *.$(OBJEXT)' in compile.am. - if ($config_libobj_dir - && $relative_dir ne $config_libobj_dir) - { - if (option 'subdir-objects') - { - # In the top-level Makefile we do not use $(top_builddir), because - # we are already there, and since the targets are built without - # a $(top_builddir), it helps BSD Make to match them with - # dependencies. - $dir = "$config_libobj_dir/" - if $config_libobj_dir ne '.'; - $dir = backname ($relative_dir) . "/$dir" - if $relative_dir ne '.'; - define_variable ('LIBOBJDIR', "$dir", INTERNAL); - if ($dir && !defined $clean_files{"$dir$base.\$(OBJEXT)"}) - { - my $dirstamp = require_build_directory ($dir); - $output_rules .= "$dir$base.\$(OBJEXT): $dirstamp\n"; - $output_rules .= "$dir$base.lo: $dirstamp\n" - if ($var =~ /^LT/); - } - # libtool might create .$(OBJEXT) as a side-effect of using - # LTLIBOBJS or LTALLOCA. - $clean_files{"$dir$base.\$(OBJEXT)"} = MOSTLY_CLEAN; - $clean_files{"$dir$base.lo"} = MOSTLY_CLEAN + if ($config_libobj_dir && $relative_dir ne $config_libobj_dir) + { + # In the top-level Makefile we do not use $(top_builddir), because + # we are already there, and since the targets are built without + # a $(top_builddir), it helps BSD Make to match them with + # dependencies. + $dir = "$config_libobj_dir/" + if $config_libobj_dir ne '.'; + $dir = backname ($relative_dir) . "/$dir" + if $relative_dir ne '.'; + define_variable ('LIBOBJDIR', "$dir", INTERNAL); - $clean_files{"\$($var)"} = MOSTLY_CLEAN; - # libtool might create LIBOBJS as a side-effect of using LTLIBOBJS. - $clean_files{"\$(LIBOBJS)"} = MOSTLY_CLEAN if $var eq "LTLIBOBJS"; ++ if ($dir && !defined $clean_files{"$dir$base.\$(OBJEXT)"}) ++ { ++ my $dirstamp = require_build_directory ($dir); ++ $output_rules .= "$dir$base.\$(OBJEXT): $dirstamp\n"; ++ $output_rules .= "$dir$base.lo: $dirstamp\n" + if ($var =~ /^LT/); + } - else - { - error ("'\$($var)' cannot be used outside '$config_libobj_dir' if" - . " 'subdir-objects' is not set"); - } ++ # libtool might create .$(OBJEXT) as a side-effect of using ++ # LTLIBOBJS or LTALLOCA. ++ $clean_files{"$dir$base.\$(OBJEXT)"} = MOSTLY_CLEAN; ++ $clean_files{"$dir$base.lo"} = MOSTLY_CLEAN ++ if ($var =~ /^LT/); } return $dir;