automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-486-g


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, maint, updated. v1.11-486-gc5d1909
Date: Sat, 01 Oct 2011 17:32:40 +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=c5d19098a3deb8fc7f6ca89398edb22854737950

The branch, maint has been updated
       via  c5d19098a3deb8fc7f6ca89398edb22854737950 (commit)
       via  e834f22817217fa113e6c900d08a553051384227 (commit)
       via  6816b316a8424f868342218eab4d61497988bea6 (commit)
       via  b100d18da312f4b22be283b9a877b221667b2245 (commit)
       via  a2498fe8d148c507e5e09b7de8a5aee9f2418e5c (commit)
      from  8dc8556c9a4d1680aae579698ac3f39d39f235e5 (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 c5d19098a3deb8fc7f6ca89398edb22854737950
Author: Stefano Lattarini <address@hidden>
Date:   Sat Oct 1 19:31:22 2011 +0200

    fix: regenerate Makefile

commit e834f22817217fa113e6c900d08a553051384227
Merge: 6816b31 b100d18
Author: Stefano Lattarini <address@hidden>
Date:   Sat Oct 1 19:28:24 2011 +0200

    Merge branch 'fix-pr7988' into maint
    
    * fix-pr7988:
      docs: don't suggest installing `.m4' files in hard-coded location

commit 6816b316a8424f868342218eab4d61497988bea6
Merge: 8dc8556 a2498fe
Author: Stefano Lattarini <address@hidden>
Date:   Sat Oct 1 19:22:37 2011 +0200

    Merge branch 'fix-pr9579' into maint
    
    * fix-pr9579:
      distuninstallcheck: fail also when only one file is left installed

commit b100d18da312f4b22be283b9a877b221667b2245
Author: Stefano Lattarini <address@hidden>
Date:   Sun Sep 25 14:29:19 2011 +0200

    docs: don't suggest installing `.m4' files in hard-coded location
    
    This change fixes automake bug#7988.
    
    * doc/automake.texi (aclocal Options): State that the use of
    the `--print-ac-dir' option to determine the directory where
    third-party packages can install their `.m4' files is discouraged
    now.
    (Extending aclocal): Suggest telling the user about ACLOCAL_PATH.
    * THANKS: Update.
    
    Report by Peter Johansson.

commit a2498fe8d148c507e5e09b7de8a5aee9f2418e5c
Author: Stefano Lattarini <address@hidden>
Date:   Fri Sep 23 16:06:59 2011 +0200

    distuninstallcheck: fail also when only one file is left installed
    
    This change fixes automake bug#9579.
    
    * lib/am/distdir.am (distuninstallcheck): Be stricter in ignoring
    a potential `dir' file created by install-info and left installed.
    Also, be more careful about "this can't happen" kind of errors.
    (am__distuninstallcheck_listfiles): New internal helper macro.
    * tests/distcheck-pr9579.test: New test.
    * tests/distcheck-override-infodir.test: Likewise.
    * tests/Makefile.am (TESTS): Add them.
    * NEWS, THANKS: Update.
    
    Report by Nick Bowler.

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

Summary of changes:
 ChangeLog                                          |   26 +++++
 Makefile.in                                        |   14 +++-
 NEWS                                               |    3 +
 THANKS                                             |    1 +
 doc/automake.texi                                  |   17 +++-
 lib/am/distdir.am                                  |   22 ++++-
 tests/Makefile.am                                  |    2 +
 tests/Makefile.in                                  |    2 +
 ...info18.test => distcheck-override-infodir.test} |   50 ++++-------
 tests/distcheck-pr9579.test                        |   98 ++++++++++++++++++++
 10 files changed, 192 insertions(+), 43 deletions(-)
 copy tests/{txinfo18.test => distcheck-override-infodir.test} (59%)
 create mode 100755 tests/distcheck-pr9579.test

diff --git a/ChangeLog b/ChangeLog
index c3b041d..ebbc7ad 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,31 @@
 2011-09-28  Stefano Lattarini  <address@hidden>
 
+       docs: don't suggest installing `.m4' files in hard-coded location
+       This change fixes automake bug#7988.
+       * doc/automake.texi (aclocal Options): State that the use of
+       the `--print-ac-dir' option to determine the directory where
+       third-party packages can install their `.m4' files is discouraged
+       now.
+       (Extending aclocal): Suggest telling the user about ACLOCAL_PATH.
+       * THANKS: Update.
+       Report by Peter Johansson.
+
+2011-09-26  Stefano Lattarini  <address@hidden>
+
+       distuninstallcheck: fail also when only one file is left installed
+       This change fixes automake bug#9579.
+       * lib/am/distdir.am (distuninstallcheck): Be stricter in ignoring
+       a potential `dir' file created by install-info and left installed.
+       Also, be more careful about "this can't happen" kind of errors.
+       (am__distuninstallcheck_listfiles): New internal helper macro.
+       * tests/distcheck-pr9579.test: New test.
+       * tests/distcheck-override-infodir.test: Likewise.
+       * tests/Makefile.am (TESTS): Add them.
+       * NEWS, THANKS: Update.
+       Report by Nick Bowler.
+
+2011-09-28  Stefano Lattarini  <address@hidden>
+
        maintcheck: fix usage of `cd' instead of `$(am__cd)'
        * lib/am/inst-vars.am (am__uninstall_files_from_dir): Use
        `$(am__cd)', not plain `cd'.
diff --git a/Makefile.in b/Makefile.in
index 5fcf53d..e7ef862 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -151,6 +151,8 @@ am__relativize = \
 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
 GZIP_ENV = --best
 distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|${prefix}/|' | grep -v '${infodir}/dir$$'
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -757,8 +759,16 @@ distcheck: dist
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
          sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
 distuninstallcheck:
-       @$(am__cd) '$(distuninstallcheck_dir)' \
-       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+       @test -n '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: trying to run $@ with an empty' \
+              '$$(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       $(am__cd) '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
                  echo "  (check DESTDIR support)"; \
diff --git a/NEWS b/NEWS
index 54838d0..4fe4196 100644
--- a/NEWS
+++ b/NEWS
@@ -61,6 +61,9 @@ Bugs fixed in 1.11.0a:
 
 * Long standing bugs:
 
+  - "make distcheck" now correctly complains also when "make uninstall"
+    leaves one and only one file installed in $(prefix).
+
   - A "make uninstall" issued before a "make install", or after a mere
     "make install-data" or a mere "make install-exec" does not spuriously
     fail anymore.
diff --git a/THANKS b/THANKS
index b840088..81c97fb 100644
--- a/THANKS
+++ b/THANKS
@@ -276,6 +276,7 @@ Per Oyvind Hvidsten address@hidden
 Peter Breitenlohner    address@hidden
 Peter Eisentraut       address@hidden
 Peter Gavin            address@hidden
+Peter Johansson                address@hidden
 Peter Mattis           address@hidden
 Peter Muir             address@hidden
 Peter O'Gorman         address@hidden
diff --git a/doc/automake.texi b/doc/automake.texi
index a8233dd..c463fe7 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -3254,8 +3254,12 @@ Cause the output to be put into @var{file} instead of 
@file{aclocal.m4}.
 @opindex --print-ac-dir
 Prints the name of the directory that @command{aclocal} will search to
 find third-party @file{.m4} files.  When this option is given, normal
-processing is suppressed.  This option can be used by a package to
-determine where to install a macro file.
+processing is suppressed.  This option was used @emph{in the past} by
+third-party packages to determine where to install @file{.m4} macro
+files, but @emph{this usage is today discouraged}, since it causes
address@hidden(prefix)} not to be thoroughly honoured (which violates the
+GNU Coding Standards), and a similar semantics can be better obtained
+with the @env{ACLOCAL_PATH} environment variable; @pxref{Extending aclocal}.
 
 @item --verbose
 @opindex --verbose
@@ -3430,6 +3434,7 @@ Similarly, @file{dirlist} can be handy if you have 
installed a local
 copy of Automake in your account and want @command{aclocal} to look for
 macros installed at other places on the system.
 
address@hidden
 @subsubheading Modifying the Macro Search Path: @file{ACLOCAL_PATH}
 @cindex @env{ACLOCAL_PATH}
 
@@ -3491,8 +3496,12 @@ aclocal_DATA = mymacro.m4 myothermacro.m4
 
 @noindent
 Please do use @file{$(datadir)/aclocal}, and not something based on
-the result of @samp{aclocal --print-ac-dir}.  @xref{Hard-Coded Install
-Paths}, for arguments.
+the result of @samp{aclocal --print-ac-dir} (@pxref{Hard-Coded Install
+Paths}, for arguments).  It might also be helpful to suggest to
+the user to add the @file{$(datadir)/aclocal} directory to his
address@hidden variable (@pxref{ACLOCAL_PATH}) so that
address@hidden will find the @file{.m4} files installed by your
+package automatically.
 
 A file of macros should be a series of properly quoted
 @code{AC_DEFUN}'s (@pxref{Macro Definitions, , , autoconf, The
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index c2dd7c5..ceb7e41 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-## 2010 Free Software Foundation, Inc.
+## 2010, 2011 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
@@ -516,11 +516,23 @@ distcheck: dist
 ## from distcheck, so that they can be overridden by the user.
 .PHONY: distuninstallcheck
 distuninstallcheck_listfiles = find . -type f -print
+## The `dir' file (created by install-info) might still exist after
+## uninstall, so we must be prepared to account for it.  The following
+## check is not 100% strict, but is definitely good enough, and even
+## accounts for overridden ${infodir}.
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+  | sed 's|^\./|${prefix}/|' | grep -v '${infodir}/dir$$'
 distuninstallcheck:
-## We use -le 1 because the `dir' file (created by install-info)
-## might still exist after uninstall.
-       @$(am__cd) '$(distuninstallcheck_dir)' \
-       && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+       @test -n '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: trying to run $@ with an empty' \
+              '$$(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       $(am__cd) '$(distuninstallcheck_dir)' || { \
+         echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+         exit 1; \
+       }; \
+       test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
           || { echo "ERROR: files left after uninstall:" ; \
                if test -n "$(DESTDIR)"; then \
                  echo "  (check DESTDIR support)"; \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 221f08a..983cc9c 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -335,6 +335,8 @@ distcheck-hook.test \
 distcheck-hook2.test \
 distcheck-missing-m4.test \
 distcheck-outdated-m4.test \
+distcheck-pr9579.test \
+distcheck-override-infodir.test \
 dmalloc.test \
 doc-parsing-buglets-colneq-subst.test \
 doc-parsing-buglets-tabs.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index a1a517a..fa274de 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -619,6 +619,8 @@ distcheck-hook.test \
 distcheck-hook2.test \
 distcheck-missing-m4.test \
 distcheck-outdated-m4.test \
+distcheck-pr9579.test \
+distcheck-override-infodir.test \
 dmalloc.test \
 doc-parsing-buglets-colneq-subst.test \
 doc-parsing-buglets-tabs.test \
diff --git a/tests/txinfo18.test b/tests/distcheck-override-infodir.test
similarity index 59%
copy from tests/txinfo18.test
copy to tests/distcheck-override-infodir.test
index 8dc8961..8c54cfb 100755
--- a/tests/txinfo18.test
+++ b/tests/distcheck-override-infodir.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2008, 2009, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011 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
@@ -14,9 +14,8 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure we clean index files, even if they are not used at the top-level.
-# Only *new* indexes need to be declared at the top-level.
-# PR/375.
+# Check that we can override ${infodir} while having distcheck still
+# working.  Relate to automake bug#9579.
 
 required='makeinfo tex texi2dvi'
 . ./defs || Exit 1
@@ -28,50 +27,37 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+infodir = ${prefix}/blah/blah/foobar
 info_TEXINFOS = main.texi
-main_TEXINFOS = sub.texi
+## Sanity check.
+installcheck-local:
+       if test x$${infodir+set} != xset; then \
+         ls -l "$(DESTDIR)/$(prefix)/blah/blah/foobar/" || exit 1; \
+         test -f "$(DESTDIR)/$(prefix)/blah/blah/foobar/dir" || exit 1; \
+       else \
+         ls -l "$(DESTDIR)/$$infodir/" || exit 1; \
+         test -f "$(DESTDIR)/$$infodir/dir" || exit 1; \
+       fi
 END
 
 cat > main.texi << 'END'
 \input texinfo
 @setfilename main.info
 @settitle main
address@hidden au
address@hidden sa
address@hidden sb
address@hidden sa sb
 @node Top
 Hello walls.
address@hidden sub.texi
 @bye
 END
 
-cat > sub.texi << 'END'
address@hidden foo
-foo
address@hidden bar
-bar
address@hidden baz
-baz
address@hidden sa
-sa
address@hidden sb
-sb
-END
-
 $ACLOCAL
-$AUTOMAKE --add-missing
+$AUTOMAKE -a
 $AUTOCONF
 
 ./configure
+$MAKE
 
-$MAKE dvi
-ls -l           # for debugging
-test -f main.sa # sanity check
-$MAKE clean
-ls -l           # for debugging
-test x"`echo main.*`" = x"main.texi"
-
-TAR_OPTIONS= $MAKE distcheck
+$MAKE distcheck
+infodir="`pwd`"/_info $MAKE -e distcheck
+test -f _info/dir || Exit 99 # Sanity check.
 
 :
diff --git a/tests/distcheck-pr9579.test b/tests/distcheck-pr9579.test
new file mode 100755
index 0000000..667401d
--- /dev/null
+++ b/tests/distcheck-pr9579.test
@@ -0,0 +1,98 @@
+#! /bin/sh
+# Copyright (C) 2011 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 against automake bug#9579: distcheck does not always detect
+# incomplete uninstall as advertised.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+# NOTE: the use of `dir' as the name of the data file installed by hand
+# is deliberate, and enhances coverage -- see definition and comments of
+# lib/am/distdir.am:$(am__distuninstallcheck_listfiles).
+
+cat > Makefile.am << 'END'
+dist_data_DATA = foo
+EXTRA_DIST = dir
+install-data-local:
+       $(MKDIR_P) '$(DESTDIR)$(datadir)'
+       cp '$(srcdir)/dir' '$(DESTDIR)$(datadir)/dir'
+END
+
+: > foo
+: > dir
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure --prefix="`pwd`/inst"
+
+# Sanity checks.
+$MAKE install
+find inst -type f
+test -f inst/share/foo
+test -f inst/share/dir
+# We expect the uninstall target of our Makefile to be definitely broken.
+$MAKE uninstall
+test -f inst/share/dir
+rm -rf inst
+
+$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+cat output
+
+$FGREP 'ERROR: files left after uninstall:' output
+grep '/share/dir *$' output
+
+# A few trickier corner cases.
+
+cat > Makefile.am << 'END'
+EXTRA_DIST = dir
+install-data-local:
+install-data-local:
+       $(MKDIR_P) '$(DESTDIR)$(prefix)/mu/share/info'
+       cp '$(srcdir)/dir' '$(DESTDIR)$(prefix)/mu/share/info'
+       $(MKDIR_P) '$(DESTDIR)$(infodir)/more'
+       cp '$(srcdir)/dir' '$(DESTDIR)$(infodir)/more'
+END
+
+$AUTOMAKE
+./config.status Makefile
+
+# Sanity checks, again.
+$MAKE install
+find inst -type f
+test -f inst/mu/share/info/dir
+test -f inst/share/info/more/dir
+# We expect the uninstall target of our Makefile to be definitely broken.
+$MAKE uninstall
+test -f inst/mu/share/info/dir
+test -f inst/share/info/more/dir
+rm -rf inst
+
+$MAKE distcheck >output 2>&1 && { cat output; Exit 1; }
+cat output
+
+$FGREP 'ERROR: files left after uninstall:' output
+grep '/mu/share/info/dir *$' output
+grep '/share/info/more/dir *$' output
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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