From: Alexandre Duret-Lutz Date: Fri, 4 Aug 2006 12:54:30 +0000 (+0000) Subject: * automake.in (dist_dirs, fill_dist_dirs): Remove. X-Git-Tag: v1.10.2~191 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2ccd5670a86dd36222ad9090270a963fe1ccdb9a;p=platform%2Fupstream%2Fautomake.git * automake.in (dist_dirs, fill_dist_dirs): Remove. * lib/am/distdir.am (DISTDIRS): Remove. * tests/distdir.test, tests/pr2.test: Do not grep, use `make distdir' instead. --- diff --git a/ChangeLog b/ChangeLog index a876db0..db9ca3a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-08-04 Stepan Kasal + + * automake.in (dist_dirs, fill_dist_dirs): Remove. + * lib/am/distdir.am (DISTDIRS): Remove. + * tests/distdir.test, tests/pr2.test: Do not grep, use + `make distdir' instead. + 2006-08-04 Alexandre Duret-Lutz * doc/automake.texi (Conditionals): Split in two sections, "Usage" diff --git a/automake.in b/automake.in index 5e1f967..b64fe8c 100755 --- a/automake.in +++ b/automake.in @@ -489,11 +489,6 @@ my @cond_stack; # This holds the set of included files. my @include_stack; -# This holds a list of directories which we must create at `dist' -# time. This is used in some strange scenarios involving weird -# AC_OUTPUT commands. -my %dist_dirs; - # List of dependencies for the obvious targets. my @all; my @check; @@ -647,8 +642,6 @@ sub initialize_per_input () @include_stack = (); - %dist_dirs = (); - @all = (); @check = (); @check_tests = (); @@ -3536,24 +3529,6 @@ sub for_dist_common return $a cmp $b; } -# fill_dist_dirs(@FILES) -# ---------------------- -# Record in %dist_dirs the directory part of any file passed. -sub fill_dist_dirs (@) -{ - my @copy = @_; - foreach (@copy) - { - s/\$\(top_srcdir\)/$topsrcdir/; - s/\$\(srcdir\)/./; - # Strip any leading `./'. - s,^(:?\./+)*,,; - next unless s,/+[^/]+$,,; - $dist_dirs{$_} = 1 - unless $_ eq '.'; - } -} - # handle_dist # ----------- # Handle 'dist' target. @@ -3670,26 +3645,10 @@ sub handle_dist () # originally, but there were so many requests that I finally # relented. my $extra_dist = var ('EXTRA_DIST'); - # FIXME: This should be fixed to work with conditions. That - # will require only making the entries in %dist_dirs under the - # appropriate condition. This is meaningful if the nature of - # the distribution should depend upon the configure options - # used. - fill_dist_dirs ($extra_dist->value_as_list_recursive (skip_ac_subst => 1)) - if $extra_dist; - - # We have to check DIST_COMMON for extra directories in case the - # user put a source used in AC_OUTPUT into a subdir. - fill_dist_dirs (rvar ('DIST_COMMON') - ->value_as_list_recursive (skip_ac_subst => 1)); $transform{'DISTCHECK-HOOK'} = !! rule 'distcheck-hook'; $transform{'GETTEXT'} = $seen_gettext && !$seen_gettext_external; - # Prepend $(distdir) to each directory given. - my %rewritten = map { '$(distdir)/' . "$_" => 1 } keys %dist_dirs; - $transform{'DISTDIRS'} = join (' ', sort keys %rewritten); - # If the target `dist-hook' exists, make sure it is run. This # allows users to do random weird things to the distribution # before it is packaged up. @@ -4112,14 +4071,6 @@ sub handle_configure ($$$@) my $local = basename ($file); - # Make sure the dist directory for each input file is created. - # We only have to do this at the topmost level though. This - # is a bit ugly but it easier than spreading out the logic, - # especially in cases like AC_OUTPUT(foo/out:bar/in), where - # there is no Makefile in bar/. - fill_dist_dirs (@inputs) - if $relative_dir eq '.'; - # We skip files that aren't in this directory. However, if # the file's directory does not have a Makefile, and we are # currently doing `.', then we create a rule to rebuild the @@ -4191,13 +4142,6 @@ sub handle_configure ($$$@) { my $fd = dirname ($file); - # Make sure the dist directory for each input file is created. - # We only have to do this at the topmost level though. - if ($relative_dir eq '.') - { - $dist_dirs{$fd} = 1; - } - # We distribute files that are in this directory. # At the top-level (`.') we also distribute files whose # directory does not have a Makefile. diff --git a/lib/am/distdir.am b/lib/am/distdir.am index 6a954d5..d3b3fb2 100644 --- a/lib/am/distdir.am +++ b/lib/am/distdir.am @@ -55,9 +55,6 @@ if %?TOPDIR_P% endif %?TOPDIR_P% ## ## -?DISTDIRS? $(mkdir_p) %DISTDIRS% -## -## @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ ## @@ -108,8 +105,6 @@ endif %?TOPDIR_P% ## (The second `t' command clears the flag for the next round.) ## ## Make the subdirectories for the files. -## (The DISTDIRS list can be incomplete, because files in subdirectories can -## be specified for `dist' conditionally.) ## case $$dist_files in \ */*) $(mkdir_p) `echo "$$dist_files" | \ diff --git a/tests/distdir.test b/tests/distdir.test index 5232d5a..4589cbb 100755 --- a/tests/distdir.test +++ b/tests/distdir.test @@ -45,13 +45,22 @@ $AUTOMAKE mkdir foo woo touch foo/bar joe woo/doo dada -grep '\$(mkdir_p).*\.' Makefile.in && exit 1 -grep '\$(mkdir_p).*srcdir' Makefile.in && exit 1 -grep '\$(mkdir_p).*foo' Makefile.in - +mkdir build +cd build +../configure +$MAKE distdir # Check to make sure `foo' isn't made in build directory. -grep 'mkdir_p.*foo.*foo' Makefile.in && exit 1 +test -d foo && exit 1 + +rm -rf distdir-1.0 +# Remove the dot from VERSION for the next grep. +VERSION=10 mkdir_p='echo mkdir_p' $MAKE -e distdir >make.log || : + +# Make sure no `./' appear in the directory names. srcdir is `..', so +# this also checks that no directory is created in the source tree. +grep 'mkdir_p.*\.' make.log && exit 1 +cd .. ./configure --prefix `pwd` $MAKE distcheck diff --git a/tests/pr2.test b/tests/pr2.test index b9bf5e5..af89d2c 100755 --- a/tests/pr2.test +++ b/tests/pr2.test @@ -1,5 +1,6 @@ #! /bin/sh -# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006 Free Software +# Foundation, Inc. # # This file is part of GNU Automake. # @@ -36,8 +37,8 @@ mkdir templ : > templ/README.foo.in $ACLOCAL +$AUTOCONF $AUTOMAKE - -# Look for mkdir_p invocation for the templ directory. -# We use the `[^/]' to avoid matching `templ/README.foo.in'. -$EGREP 'mkdir_p.*templ([^/]|$)' Makefile.in +./configure +$MAKE distdir +test -f nonesuch-nonesuch/templ/README.foo.in