automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.1


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, ng/master, updated. v1.12.1-387-g11a4423
Date: Fri, 15 Jun 2012 20:52:04 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=11a44231a057b6dbc15d3fe83f0b652176442241

The branch, ng/master has been updated
       via  11a44231a057b6dbc15d3fe83f0b652176442241 (commit)
       via  8e9fe56b6841fefa1fd71d32b82549df06fef86f (commit)
       via  0553c9fefb609c5b4baab384ead313a55b9f9e5e (commit)
       via  af3834cf3bd72ce183d2a226763f8b792c86fbed (commit)
      from  9c2a9213839e9dbe65c1fe620b50fa17ddca0b5b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 11a44231a057b6dbc15d3fe83f0b652176442241
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jun 15 18:50:47 2012 +0200

    [ng] general: support a private directory, for use by automake internals
    
    The directory is pointed to by these new internal make variables:
    
      -  $(am__dir)
      -  $(am__abs_dir)
      -  $(am__top_dir)
      -  $(am__abs_top_dir)
    
    and cleaned by the new 'am--distclean-amdir' recipe (prerequisite of
    'distclean-am').  It is not created by default; recipes needing it
    should add an order-only dependency on it, as in:
    
        am-rule: am-prereq | $(am__dir)
            [recipe creating/using files in $(am__dir)]
    
    * lib/am/am-dir.am: New file, define internal make variables that point
    to a sandbox directory where we can play freely to implement internal
    details that require interaction with the filesystem, and the rules to
    properly clean them.  This file is not used yet, it's simply put here
    so that future rules will be able to use it when and if it's needed.
    * automake.in (generate_makefile): Include the new file, through the
    '&preprocess_file' subroutine.
    * Makefile.am (dist_am_DATA): List the new file.
    * t/am-dir.sh: New test.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 8e9fe56b6841fefa1fd71d32b82549df06fef86f
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jun 15 17:15:52 2012 +0200

    [ng] texinfo: pattern rules with empty suffixes are OK
    
    So we can remove a workaround required by Solaris make from our
    texinfo rules.
    
    * automake.in (output_texinfo_build_rules): Don't define the boolean
    '$generic_info' anymore.  Drop the 'SOURCE_INFO' and 'GENERIC_INFO'
    transforms when processing the 'texibuild.am' file.  Remove obsolete
    comments, and adjust some of the remaining ones.
    * lib/am/texibuild.am: Adjust by always assuming that '?GENERIC_INFO?'
    is true.
    * t/txinfo3.sh: Adjust and extend.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit 0553c9fefb609c5b4baab384ead313a55b9f9e5e
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jun 15 16:47:42 2012 +0200

    [ng] cosmetics: remove few obsolescent comments in autoamake
    
    * automake.in (read_am_file): Remove obsolete comments (about
    OSF make limitations).
    
    Signed-off-by: Stefano Lattarini <address@hidden>

commit af3834cf3bd72ce183d2a226763f8b792c86fbed
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jun 15 16:38:48 2012 +0200

    [ng] coverage: support for double-colon rules both in Automake and GNU make
    
    * t/double-colon-rules.sh: New test.
    * t/spy-double-colon.sh: Remove as superseded.
    
    Signed-off-by: Stefano Lattarini <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 Makefile.am             |    1 +
 automake.in             |   37 ++-------------
 lib/am/am-dir.am        |   43 ++++++++++++++++++
 lib/am/texibuild.am     |    5 +--
 t/am-dir.sh             |   92 ++++++++++++++++++++++++++++++++++++++
 t/double-colon-rules.sh |  112 +++++++++++++++++++++++++++++++++++++++++++++++
 t/spy-double-colon.sh   |  104 -------------------------------------------
 t/txinfo3.sh            |   35 +++++++++++---
 8 files changed, 281 insertions(+), 148 deletions(-)
 create mode 100644 lib/am/am-dir.am
 create mode 100755 t/am-dir.sh
 create mode 100755 t/double-colon-rules.sh
 delete mode 100755 t/spy-double-colon.sh

diff --git a/Makefile.am b/Makefile.am
index c072b3f..f6f9cb2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -185,6 +185,7 @@ EXTRA_DIST += lib/Automake/Config.in
 ## --------------------- ##
 
 dist_am_DATA = \
+  lib/am/am-dir.am \
   lib/am/all-target.am \
   lib/am/check-target.am \
   lib/am/serial-tests.am \
diff --git a/automake.in b/automake.in
index d01abd1..c3a9848 100644
--- a/automake.in
+++ b/automake.in
@@ -2859,10 +2859,9 @@ sub output_texinfo_build_rules ($$$@)
   $ssfx ||= "";
   $dsfx ||= "";
 
-  # We can output two kinds of rules: the "generic" rules use Make
-  # suffix rules and are appropriate when $source and $dest do not lie
-  # in a sub-directory; the "specific" rules are needed in the other
-  # case.
+  # We can output two kinds of rules: the "generic" rules use pattern
+  # rules and are appropriate when $source and $dest do not lie in a
+  # sub-directory; the "specific" rules are needed in the other case.
   #
   # The former are output only once (this is not really apparent here,
   # but just remember that some logic deeper in Automake will not
@@ -2891,20 +2890,6 @@ sub output_texinfo_build_rules ($$$@)
   # if needed.)
   $generic = 0 unless $insrc;
 
-  # We cannot use a suffix rule to build info files with an empty
-  # extension.  Otherwise we would output a single suffix inference
-  # rule, with separate dependencies, as in
-  #
-  #    .texi:
-  #             $(MAKEINFO) ...
-  #    foo.info: foo.texi
-  #
-  # which confuse Solaris make.  (See the Autoconf manual for
-  # details.)  Therefore we use a specific rule in this case.  This
-  # applies to info files only (dvi and pdf files always have an
-  # extension).
-  my $generic_info = ($generic && $dsfx) ? 1 : 0;
-
   my $dipfx = ($insrc ? '$(srcdir)/' : '') . $dpfx;
 
   $output_rules .= file_contents ('texibuild',
@@ -2917,13 +2902,10 @@ sub output_texinfo_build_rules ($$$@)
                                  DEST_INFO_PREFIX => $dipfx,
                                  DEST_SUFFIX      => $dsfx,
                                  GENERIC          => $generic,
-                                 GENERIC_INFO     => $generic_info,
                                  INSRC            => $insrc,
                                  MAKEINFOFLAGS    => $makeinfoflags,
                                  SOURCE           => ($generic
                                                       ? '$<' : $source),
-                                 SOURCE_INFO      => ($generic_info
-                                                      ? '$<' : $source),
                                  SOURCE_REAL      => $source,
                                  SOURCE_SUFFIX    => $ssfx,
                                   TEXIQUIET        => verbose_flag('texinfo'),
@@ -5883,23 +5865,12 @@ sub read_am_file ($$)
              {
                push (@include_stack, "\$\(top_srcdir\)/$path");
                # Distribute any included file.
-
-               # Always use the $(top_srcdir) prefix in @dist_common,
-               # otherwise OSF make will implicitly copy the included
-               # file in the build tree during "make distdir" to satisfy
-               # the dependency.
-               # (subdircond2.test and subdircond3.test will fail.)
                push_dist_common ("\$\(top_srcdir\)/$path");
              }
            else
              {
                $path =~ s/\$\(srcdir\)\///;
                push (@include_stack, "\$\(srcdir\)/$path");
-               # Always use the $(srcdir) prefix in @dist_common,
-               # otherwise OSF make will implicitly copy the included
-               # file in the build tree during "make distdir" to satisfy
-               # the dependency.
-               # (subdircond2.test and subdircond3.test will fail.)
                push_dist_common ("\$\(srcdir\)/$path");
                $path = $relative_dir . "/" . $path if $relative_dir ne '.';
              }
@@ -7136,6 +7107,8 @@ sub generate_makefile ($$)
   check_gnu_standards;
   check_gnits_standards;
 
+  $output_verbatim .= preprocess_file ("$libdir/am/am-dir.am");
+
   handle_configure ($makefile_am, $makefile_in, $makefile, @inputs);
   handle_gettext;
   handle_libraries;
diff --git a/lib/am/am-dir.am b/lib/am/am-dir.am
new file mode 100644
index 0000000..6ab0958
--- /dev/null
+++ b/lib/am/am-dir.am
@@ -0,0 +1,43 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 2012 Free Software Foundation, Inc.
+
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+
+## You should have received a copy of the GNU General Public License
+## along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Internal make variables that point to a sandbox directory where we can
+# play freely to implement internal details that require interaction with
+# the filesystem.  It is not created by default; recipes needing it
+# should add an order-only dependency on it, as in:
+#
+#     am-rule: am-prereqs | $(am__dir)
+#         [recipe creating/using files in $(am__dir)]
+#
+am__dir = .am
+
+# Its counterpart with an absolute path, for recipes that can chdir around.
+am__abs_dir = $(abs_builddir)/$(am__dir)
+
+# Its counterpart for use in subdir makefiles, in case they need to refer
+# to the top-leve $(am__dir) directory.
+am__top_dir = $(top_builddir)/$(am__dir)
+
+# Its counterpart with an absolute path and for use in subdir makefiles.
+am__abs_top_dir = $(abs_top_builddir)/$(am__dir)
+
+.PHONY: am--distclean-amdir
+am--distclean-amdir:
+       rm -rf $(am__dir)
+distclean-am: am--distclean-amdir
+
+$(am__dir):
+       @mkdir $@
diff --git a/lib/am/texibuild.am b/lib/am/texibuild.am
index 049d894..735b2d8 100644
--- a/lib/am/texibuild.am
+++ b/lib/am/texibuild.am
@@ -14,8 +14,7 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-?GENERIC_INFO?%%DEST_SUFFIX%: %%SOURCE_SUFFIX%
-?!GENERIC_INFO?%DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_INFO% %DEPS%
+%%DEST_SUFFIX%: %%SOURCE_SUFFIX%
 ?!INSRC?       @$(am__ensure_target_dir_exists)
 ## Back up the info files before running makeinfo. This is the cheapest
 ## way to ensure that
@@ -103,9 +102,7 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
        fi
 
 ## If we are using the generic rules, we need separate dependencies.
-if %?GENERIC_INFO%
 %DEST_INFO_PREFIX%%DEST_SUFFIX%: %SOURCE_REAL% %DEPS%
-endif %?GENERIC_INFO%
 if %?GENERIC%
 %DEST_PREFIX%.dvi: %SOURCE_REAL% %DEPS%
 %DEST_PREFIX%.pdf: %SOURCE_REAL% %DEPS%
diff --git a/t/am-dir.sh b/t/am-dir.sh
new file mode 100755
index 0000000..f302659
--- /dev/null
+++ b/t/am-dir.sh
@@ -0,0 +1,92 @@
+#! /bin/sh
+# Copyright (C) 2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+#
+# Check support for private automake working directory in builddir:
+#
+#  * internal variables:
+#      $(am__dir)
+#      $(am__abs_dir)
+#      $(am__top_dir)
+#      $(am__abs_top_dir)
+#
+#  * cleaning rules and "make distcheck" interaction.
+#
+
+. ./defs || Exit 1
+
+d=.am
+
+cat >> configure.ac <<'END'
+AC_CONFIG_FILES([xsrc/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = . xsrc
+all-local: | $(am__dir)
+END
+
+mkdir xsrc
+cat >> xsrc/Makefile.am <<'END'
+subdir:
+       mkdir $@
+all-local: | $(am__dir) subdir
+       : > $(am__dir)/sub
+       : > $(am__top_dir)/top
+       (cd ./subdir && : > $(am__abs_dir)/abs-sub)
+       rmdir subdir
+       (cd /tmp && : > $(am__abs_top_dir)/abs-top)
+END
+
+sort > exp <<END
+$d
+$d/top
+$d/abs-top
+xsrc/$d
+xsrc/$d/sub
+xsrc/$d/abs-sub
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+do_check ()
+{
+  srcdir=$1
+  $srcdir/configure
+  $MAKE
+  find $d xsrc/$d | sort > got
+  cat $srcdir/exp
+  cat got
+  diff $srcdir/exp got
+}
+
+mkdir build
+cd build
+do_check ..
+
+cd ..
+do_check .
+
+$MAKE distcheck
+$MAKE clean
+test -d $d
+$MAKE distclean
+test ! -e $d
+
+:
diff --git a/t/double-colon-rules.sh b/t/double-colon-rules.sh
new file mode 100755
index 0000000..ef7c45a
--- /dev/null
+++ b/t/double-colon-rules.sh
@@ -0,0 +1,112 @@
+#! /bin/sh
+# Copyright (C) 2003-2012 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check that double colon rules work.
+# This test not only checks that Automake do not mangle double-colon rules
+# seen in input Makefile.am, but also that GNU make support of double-colon
+# rules is as reliable and well-working as we expect and need.
+
+. ./defs || Exit 1
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am <<'END'
+all-local:
+       @echo Please select an explicit target; exit 1
+
+# No space after 'a'.
+a:: b
+       echo rule1 >> $@
+# Deliberate space after 'a'.
+a :: c
+       echo rule2 >> $@
+
+# Overlapping rules should work as well
+a2 :: b2
+       echo rule21 >> $@
+a2 :: c2
+       echo rule22 >> $@
+a2:: b2 c2
+       echo rule23 >> $@
+b2 c2:
+       touch $@
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+grep '::' Makefile.in # For debugging.
+test $(grep -c '^a *:: *b *$' Makefile.in) -eq 1
+test $(grep -c '^a *:: *c *$' Makefile.in) -eq 1
+test $(grep -c '^a2 *:: *b2 *$' Makefile.in) -eq 1
+test $(grep -c '^a2 *:: *c2 *$' Makefile.in) -eq 1
+test $(grep -c '^a2 *:: *b2  *c2 *$' Makefile.in) -eq 1
+
+./configure
+
+# Non-overlapping double-colon rules.
+
+touch b c
+$sleep
+: > a
+$MAKE a
+test ! -s a
+$sleep
+touch b
+$MAKE a
+test "$(cat a)" = rule1
+: > a
+$sleep
+touch c
+$MAKE a
+test "$(cat a)" = rule2
+
+: > a
+$sleep
+touch b c
+$MAKE a
+test "$(sort a)" = "rule1${nl}rule2"
+
+rm -f a b c
+
+# Overlapping double-colon rules.
+
+$MAKE a2
+test -f a2
+test -f b2
+test -f c2
+
+: > a2
+$MAKE a2
+test ! -s a2
+$sleep
+touch b2
+$MAKE a2
+test "$(sort a2)" = "rule21${nl}rule23"
+: > a2
+$sleep
+touch c2
+$MAKE a2
+test "$(sort a2)" = "rule22${nl}rule23"
+
+: > a2
+$sleep
+touch b2 c2
+$MAKE a2
+test "$(sort a2)" = "rule21${nl}rule22${nl}rule23"
+
+:
diff --git a/t/spy-double-colon.sh b/t/spy-double-colon.sh
deleted file mode 100755
index 3530328..0000000
--- a/t/spy-double-colon.sh
+++ /dev/null
@@ -1,104 +0,0 @@
-#! /bin/sh
-# Copyright (C) 2003-2012 Free Software Foundation, Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-# Check whether double colon rules work.  The Unix V7 make manual
-# mentions double-colon rules, but POSIX does not.  They seem to be
-# supported by all Make implementation as far as we can tell. This test
-# case is a spy: we want to detect if there exist implementations where
-# these do not work.  We might use these rules to simplify the rebuild
-# rules (instead of the $? hack).
-
-# Tom Tromey write:
-# | In the distant past we used :: rules extensively.
-# | Fran?ois convinced me to get rid of them:
-# |
-# | Thu Nov 23 18:02:38 1995  Tom Tromey  <address@hidden>
-# | [ ... ]
-# |         * subdirs.am: Removed "::" rules
-# |         * header.am, libraries.am, mans.am, texinfos.am, footer.am:
-# |         Removed "::" rules
-# |         * scripts.am, programs.am, libprograms.am: Removed "::" rules
-# |
-# |
-# | I no longer remember the rationale for this.  It may have only been a
-# | belief that they were unportable.
-
-# On a related topic, the Autoconf manual has the following text:
-# |     'VPATH' and double-colon rules
-# |           Any assignment to 'VPATH' causes Sun 'make' to only execute
-# |           the first set of double-colon rules.  (This comment has been
-# |           here since 1994 and the context has been lost.  It's probably
-# |           about SunOS 4.  If you can reproduce this, please send us a
-# |           test case for illustration.)
-
-# We already know that overlapping ::-rule like
-#
-#   a :: b
-#      echo rule1 >> $@
-#   a :: c
-#      echo rule2 >> $@
-#   a :: b c
-#      echo rule3 >> $@
-#
-# do not work equally on all platforms.  It seems that in all cases
-# Make attempts to run all matching rules.  However at least GNU Make,
-# NetBSD Make, and FreeBSD Make will detect that $@ was updated by the
-# first matching rule and skip remaining matches (with the above
-# example that means that unless 'a' was declared PHONY, only "rule1"
-# will be appended to 'a' if both b and c have changed).  Other
-# implementations like OSF1 Make and HP-UX Make do not perform such a
-# check and execute all matching rules whatever they do ("rule1",
-# "rule2", abd "rule3" will all be appended to 'a' if b and c have
-# changed).
-
-# So it seems only non-overlapping ::-rule may be portable.  This is
-# what we check now.
-
-. ./defs || Exit 1
-
-cat >Makefile <<\EOF
-a :: b
-       echo rule1 >> $@
-a :: c
-       echo rule2 >> $@
-EOF
-
-touch b c
-$sleep
-: > a
-$MAKE
-test "`cat a`" = ''
-$sleep
-touch b
-$MAKE
-test "`cat a`" = rule1
-: > a
-$sleep
-touch c
-$MAKE
-test "`cat a`" = rule2
-
-# Unfortunately, the following is not portable to FreeBSD/NetBSD/OpenBSD
-# make, see explanation above.
-
-: > a
-$sleep
-touch b c
-$MAKE
-grep rule1 a
-grep rule2 a
-
-:
diff --git a/t/txinfo3.sh b/t/txinfo3.sh
index 88e1bac..7363c39 100755
--- a/t/txinfo3.sh
+++ b/t/txinfo3.sh
@@ -24,7 +24,10 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-info_TEXINFOS = textutils.texi
+info_TEXINFOS = textutils.texi doc/automake-ng.texi
+.PHONY: echo-info-deps
+echo-info-deps:
+       echo ' ' $(INFO_DEPS) ' '
 END
 
 cat > textutils.texi <<EOF
@@ -36,18 +39,34 @@ Hello walls.
 @bye
 EOF
 
+mkdir doc
+cat > doc/automake-ng.texi <<EOF
+\input texinfo
address@hidden automake-ng
address@hidden automake-ng
address@hidden Top
+Blurb.
address@hidden
+EOF
+
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --add-missing
 
-grep '^INFO_DEPS.*textutils$' Makefile.in
-
-# We should not use single suffix inference rules (with separate
-# dependencies), this confuses Solaris make.
-grep '^\.texi:$' Makefile.in && Exit 1
-grep 'textutils: *textutils\.texi' Makefile.in
-
 ./configure
 $MAKE distcheck
 
+$MAKE
+test -f textutils
+test -f doc/automake-ng
+test ! -f textutils.info
+test ! -f doc/automake-ng.info
+
+$MAKE distdir
+test -f $distdir/textutils
+test -f $distdir/doc/automake-ng
+
+$MAKE echo-info-deps | grep '[ /]textutils '
+$MAKE echo-info-deps | grep '[ /]doc/automake-ng '
+
 :


hooks/post-receive
-- 
GNU Automake



reply via email to

[Prev in Thread] Current Thread [Next in Thread]