automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-2024


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. v1.11-2024-gc99835b
Date: Sat, 25 Feb 2012 20:34:02 +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=c99835be113fd4c86ef413993d67e52206a1188d

The branch, master has been updated
       via  c99835be113fd4c86ef413993d67e52206a1188d (commit)
       via  040cf12502ba3c57b16e1e0ad899f8ed7b7a1365 (commit)
       via  c5a3d70d9714a4a70901e0a93ae9dc6f09f1ff1f (commit)
       via  1e839f9acc95c0b4c4ab602f28e29d9413e084ce (commit)
      from  06b901795fcb70182e1427b37e104d2a8e1524c4 (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 c99835be113fd4c86ef413993d67e52206a1188d
Author: Stefano Lattarini <address@hidden>
Date:   Sat Feb 25 14:38:22 2012 +0100

    docs: improve 'dist-hook' documentation
    
    * doc/automake.texi (The dist Hook): Explicitly document the fact
    that the dist-hook should account for the case where the source
    tree is read-only, mostly for the benefit of distcheck.  Since
    we are at it, do some minor unrelated rewordings, and remove
    obsolescent advice.  Motivated by the discussion on automake
    bug#10878.
    * tests/disthook.test: New test.
    * tests/disthook-perms.test: Delete as obsolete.
    * tests/list-of-tests.mk: Adjust.

commit 040cf12502ba3c57b16e1e0ad899f8ed7b7a1365
Author: Stefano Lattarini <address@hidden>
Date:   Sat Feb 25 11:11:33 2012 +0100

    docs: improve "make distcheck" documentation
    
    * doc/automake.texi (Checking the Distribution): The fact that
    "make distcheck" uses a read-only srcdir wasn't documented clearly
    enough here.  Fix that.  Since we are at it, be more explicit
    about the steps undertaken by "make distcheck", and re-organize
    this section a bit.  Motivated by the discussion on automake
    bug#10878.
    (distcleancheck): Rename this node (in the "FAQ" section) ...
    (Errors with distclean): ... to this.
    Add a proper "FIXME" comment.

commit c5a3d70d9714a4a70901e0a93ae9dc6f09f1ff1f
Author: Stefano Lattarini <address@hidden>
Date:   Sat Feb 25 09:43:51 2012 +0100

    cosmetics: proper capitalization and full stops in 'm4/depend.m4'

commit 1e839f9acc95c0b4c4ab602f28e29d9413e084ce
Author: Stefano Lattarini <address@hidden>
Date:   Fri Feb 24 18:34:04 2012 +0100

    coverage: dist-hook and distcheck-hook can modify file permission
    
    See automake bug#10878.
    
    * tests/dist-hook-perms.test: New test, checking that the user can
    use the 'dist-hook' target to modify permissions of distributed
    files before putting them in the distribution tarball.
    * tests/distcheck-writable-srcdir.test: New test, checking that the
    user can use 'distcheck-hook' to ensure his packages is built by
    "make distcheck" with a writable srcdir.  This goes against the GNU
    Coding Standards, but some package authors might not care about
    them too much, and it's nice to support their use case too.
    * tests/list-of-tests.mk: Add them.

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

Summary of changes:
 doc/automake.texi                                  |   91 +++++++++++++------
 m4/depend.m4                                       |   10 +-
 ...pr10128.test => distcheck-writable-srcdir.test} |   46 ++++------
 tests/disthook.test                                |   89 +++++++++++++++++++
 tests/list-of-tests.mk                             |    2 +
 5 files changed, 176 insertions(+), 62 deletions(-)
 copy tests/{objext-pr10128.test => distcheck-writable-srcdir.test} (55%)
 create mode 100755 tests/disthook.test

diff --git a/doc/automake.texi b/doc/automake.texi
index 8dcbc18..3bb365b 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -374,7 +374,7 @@ Frequently Asked Questions about Automake
 * maintainer-mode::             missing and AM_MAINTAINER_MODE
 * Wildcards::                   Why doesn't Automake support wildcards?
 * Limitations on File Names::   Limitations on source and installed file names
-* distcleancheck::              Files left in build directory after distclean
+* Errors with distclean::       Files left in build directory after distclean
 * Flag Variables Ordering::     CFLAGS vs.@: AM_CFLAGS vs.@: mumble_CFLAGS
 * Renamed Objects::             Why are object files sometimes renamed?
 * Per-Object Flags::            How to simulate per-object flags?
@@ -8420,24 +8420,35 @@ nodist_foo_SOURCES = do-not-distribute.c
 
 Occasionally it is useful to be able to change the distribution before
 it is packaged up.  If the @code{dist-hook} rule exists, it is run
-after the distribution directory is filled, but before the actual tar
-(or shar) file is created.  One way to use this is for distributing
-files in subdirectories for which a new @file{Makefile.am} is overkill:
+after the distribution directory is filled, but before the actual
+distribution archives are created.  One way to use this is for
+removing unnecessary files that get recursively included by specifying
+a directory in @code{EXTRA_DIST}:
 
 @example
+EXTRA_DIST = doc
 dist-hook:
-        mkdir $(distdir)/random
-        cp -p $(srcdir)/random/a1 $(srcdir)/random/a2 $(distdir)/random
+        rm -rf `find $(distdir)/doc -type d -name .svn`
 @end example
 
-Another way to use this is for removing unnecessary files that get
-recursively included by specifying a directory in EXTRA_DIST:
-
address@hidden
-EXTRA_DIST = doc
-
address@hidden The caveates described here should be documented in 
'disthook.test'.
address@hidden
+Note that the @code{dist-hook} recipe shouldn't assume that the regular
+files in the distribution directory are writable; this might not be the
+case if one is packaging from a read-only source tree, or when a
address@hidden distcheck} is being done.  For similar reasons, the recipe
+shouldn't assume that the subdirectories put into the distribution
+directory as effect of having them listed in @code{EXTRA_DIST} are
+writable.  So, if the @code{dist-hook} recipe wants to modify the
+content of an existing file (or @code{EXTRA_DIST} subdirectory) in the
+distribution directory, it should explicitly to make it writable first:
+
address@hidden
+EXTRA_DIST = README doc
 dist-hook:
-        rm -rf `find $(distdir)/doc -type d -name .svn`
+        chmod u+w $(distdir)/README $(distdir)/doc
+        echo "Distribution date: `date`" >> README
+        rm -f $(distdir)/doc/HACKING
 @end example
 
 @vindex distdir
@@ -8468,20 +8479,32 @@ dist} was run, not to any sub-packages involved.
 @section Checking the Distribution
 
 @cindex @samp{make distcheck}
address@hidden @samp{make distcleancheck}
address@hidden distcleancheck_listfiles
address@hidden @samp{make distuninstallcheck}
address@hidden distuninstallcheck_listfiles
-
 @trindex distcheck
-Automake also generates a @code{distcheck} rule that can be of help to
-ensure that a given distribution will actually work.  @code{distcheck}
-makes a distribution, then tries to do a @code{VPATH} build
-(@pxref{VPATH Builds}), run the test suite, and finally make another
-tarball to ensure the distribution is self-contained.
+Automake also generates a @code{distcheck} rule that can be of help
+to ensure that a given distribution will actually work.  Simplifying
+a bit, we can say this rule first makes a distribution, and then,
address@hidden from it}, takes the following steps:
address@hidden
address@hidden
+tries to do a @code{VPATH} build (@pxref{VPATH Builds}), with the
address@hidden and all its content made @emph{read-only};
address@hidden
+runs the test suite (with @command{make check}) on this fresh build;
address@hidden
+installs the package in a temporary directory (with @command{make
+install}), and tries runs the test suite on the resulting installation
+(with @command{make installcheck});
address@hidden
+checks that the package can be correctly uninstalled (by @command{make
+uninstall}) and cleaned (by @code{make distclean});
address@hidden
+finally, makes another tarball to ensure the distribution is
+self-contained.
address@hidden itemize
 
 @vindex AM_DISTCHECK_CONFIGURE_FLAGS
 @vindex DISTCHECK_CONFIGURE_FLAGS
address@hidden DISTCHECK_CONFIGURE_FLAGS
 Building the package involves running @samp{./configure}.  If you need
 to supply additional flags to @command{configure}, define them in the
 @code{AM_DISTCHECK_CONFIGURE_FLAGS} variable in your top-level
@@ -8505,6 +8528,7 @@ installcheck} was wrongly assuming it could blindly test 
"@command{m4}",
 rather than the just-installed "@command{gm4}".
 
 @trindex distcheck-hook
address@hidden distcheck-hook
 If the @code{distcheck-hook} rule is defined in your top-level
 @file{Makefile.am}, then it will be invoked by @code{distcheck} after
 the new distribution has been unpacked, but before the unpacked copy
@@ -8517,9 +8541,12 @@ are not honored in a subpackage @file{Makefile.am}, but 
the flags from
 @code{AM_DISTCHECK_CONFIGURE_FLAGS} and @code{DISTCHECK_CONFIGURE_FLAGS}
 are passed down to the @command{configure} script of the subpackage.
 
address@hidden @samp{make distcleancheck}
 @trindex distcleancheck
 @vindex DISTCLEANFILES
 @vindex distcleancheck_listfiles
+
address@hidden distcleancheck
 Speaking of potential distribution errors, @code{distcheck} also
 ensures that the @code{distclean} rule actually removes all built
 files.  This is done by running @samp{make distcleancheck} at the end of
@@ -8557,9 +8584,14 @@ your Makefiles cause some distributed files to be 
rebuilt when the user
 build the package.  (Think about the user missing the tool required to
 build the file; or if the required tool is built by your package,
 consider the cross-compilation case where it can't be run.)  There is
-an entry in the FAQ about this (@pxref{distcleancheck}), make sure you
-read it before playing with @code{distcleancheck_listfiles}.
+an entry in the FAQ about this (@pxref{Errors with distclean}), make
+sure you read it before playing with @code{distcleancheck_listfiles}.
+
address@hidden @samp{make distuninstallcheck}
address@hidden distuninstallcheck
address@hidden distuninstallcheck_listfiles
 
address@hidden distuninstallcheck
 @code{distcheck} also checks that the @code{uninstall} rule works
 properly, both for ordinary and @code{DESTDIR} builds.  It does this
 by invoking @samp{make uninstall}, and then it checks the install tree
@@ -11586,7 +11618,7 @@ lists.
 * maintainer-mode::             missing and AM_MAINTAINER_MODE
 * Wildcards::                   Why doesn't Automake support wildcards?
 * Limitations on File Names::   Limitations on source and installed file names
-* distcleancheck::              Files left in build directory after distclean
+* Errors with distclean::       Files left in build directory after distclean
 * Flag Variables Ordering::     CFLAGS vs.@: AM_CFLAGS vs.@: mumble_CFLAGS
 * Renamed Objects::             Why are object files sometimes renamed?
 * Per-Object Flags::            How to simulate per-object flags?
@@ -11981,13 +12013,14 @@ differ only in case (e.g., @file{makefile} and 
@file{Makefile}).
 Nowadays it is no longer worth worrying about the 8.3 limits of
 DOS file systems.
 
address@hidden distcleancheck
address@hidden Files left in build directory after distclean
address@hidden FIXME This should probably be moved in the "Checking the 
Distribution"
address@hidden FIXME section...
address@hidden Errors with distclean
address@hidden Errors with distclean
 @cindex @code{distclean}, diagnostic
 @cindex @samp{make distclean}, diagnostic
 @cindex dependencies and distributed files
 @trindex distclean
address@hidden distcleancheck
 
 This is a diagnostic you might encounter while running @samp{make
 distcheck}.
diff --git a/m4/depend.m4 b/m4/depend.m4
index 1601c63..8d7adf6 100644
--- a/m4/depend.m4
+++ b/m4/depend.m4
@@ -5,7 +5,7 @@
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 15
+# serial 16
 
 # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -93,7 +93,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
     # We check with '-c' and '-o' for the sake of the "dashmstdout"
     # mode.  It turns out that the SunPro C++ compiler does not properly
     # handle '-M -o', and we need to detect this.  Also, some Intel
-    # versions had trouble with output in subdirs
+    # versions had trouble with output in subdirs.
     am__obj=sub/conftest.${OBJEXT-o}
     am__minus_obj="-o $am__obj"
     case $depmode in
@@ -102,8 +102,8 @@ AC_CACHE_CHECK([dependency style of $depcc],
       test "$am__universal" = false || continue
       ;;
     nosideeffect)
-      # after this tag, mechanisms are not by side-effect, so they'll
-      # only be used when explicitly requested
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
       if test "x$enable_dependency_tracking" = xyes; then
        continue
       else
@@ -159,7 +159,7 @@ AM_CONDITIONAL([am__fastdep$1], [
 # AM_SET_DEPDIR
 # -------------
 # Choose a directory name for dependency files.
-# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
 AC_DEFUN([AM_SET_DEPDIR],
 [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
 AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
diff --git a/tests/objext-pr10128.test b/tests/distcheck-writable-srcdir.test
similarity index 55%
copy from tests/objext-pr10128.test
copy to tests/distcheck-writable-srcdir.test
index 2fe2dfd..bbc50f4 100755
--- a/tests/objext-pr10128.test
+++ b/tests/distcheck-writable-srcdir.test
@@ -14,45 +14,35 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test for automake bug#10128: $(OBJEXT) redefinition causes
-# $(foo_OBJECTS) to be defined as empty.
+# Check that the user abuse 'distcheck-hook' to ensure his packages
+# is built by "make distcheck" with a writable srcdir.  This goes
+# against the GNU Coding Standards, but some package authors might
+# not care about them too much, and it's nice to support their use
+# case too (since it doesn't cost us anything but this test).
+# See automake bug#10878.
 
 . ./defs || Exit 1
 
 echo AC_OUTPUT >> configure.ac
 
 cat > Makefile.am <<'END'
-LINK = echo >$@ Linked $@ from
-OBJEXT = fasl
-EXEEXT =
-
-noinst_PROGRAMS = foo zardoz
-foo_SOURCES = foo.lisp
-zardoz_SOURCES = mu1.lisp mu2.lisp
-
-## Un-commenting this is enough to make the test pass.  Weird!
-##.lisp.o:
-
-.lisp.fasl:
-       touch $@
-
-.PHONY: test
-test:
-       is $(foo_OBJECTS) == foo.fasl
-       is $(zardoz_OBJECTS) == mu1.fasl mu2.fasl
+EXTRA_DIST = old
+distcheck-hook:
+       find $(distdir) -exec chmod u+w '{}' ';'
+check-local:
+       test -f $(srcdir)/old
+       test ! -f $(srcdir)/new
+       test ! -r $(srcdir)/new
+## Don't do this in real life, or I'll kill you.
+       echo foo > $(srcdir)/old
+       echo bar > $(srcdir)/new
 END
 
 $ACLOCAL
 $AUTOMAKE
 $AUTOCONF
-
 ./configure
-$MAKE test
-touch foo.lisp mu1.lisp mu2.lisp
-$MAKE all
-cat foo
-cat zardoz
-test "`cat foo`"    = "Linked foo from foo.fasl"
-test "`cat zardoz`" = "Linked zardoz from mu1.fasl mu2.fasl"
+: > old
+$MAKE distcheck
 
 :
diff --git a/tests/disthook.test b/tests/disthook.test
new file mode 100755
index 0000000..9804e99
--- /dev/null
+++ b/tests/disthook.test
@@ -0,0 +1,89 @@
+#! /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 that 'dist-hook' works.  See automake bug#10878.
+
+. ./defs || Exit 1
+
+echo AC_OUTPUT >> configure.ac
+
+cat > Makefile.am <<'END'
+EXTRA_DIST = write execute removed doc
+
+removed:
+       echo I will be deleted > $@
+DISTCLEANFILES = removed
+
+dist-hook:
+       chmod u+w $(distdir)/write $(distdir)/doc
+       chmod u+x $(distdir)/execute
+       rm -f $(distdir)/removed
+       rm -f $(distdir)/doc/HACKING
+       rm -f $(distdir)/doc/RELEASE-DATE
+       date > $(distdir)/doc/RELEASE-DATE
+       echo all is ok > $(distdir)/write
+
+check-local:
+       ls -l $(srcdir) $(srcdir)/doc
+       test "`cat $(srcdir)/write`" = "all is ok"
+       test -f $(srcdir)/doc/README
+       test -f $(srcdir)/doc/RELEASE-DATE
+       test ! -f $(srcdir)/removed
+       test ! -r $(srcdir)/removed
+       test ! -f $(srcdir)/doc/HACKING
+       test ! -r $(srcdir)/doc/HACKING
+       $(srcdir)/execute
+       $(srcdir)/execute | grep 'I run successfully'
+## Sanity check.
+       echo ok > $(srcdir)/../distcheck-run
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+mkdir doc
+: > doc/README
+: > doc/HACKING
+echo will be clobbered > write
+cat > execute <<'END'
+#!/bin/sh
+echo I run successfully
+END
+
+chmod a-w write
+chmod a-x execute
+
+$MAKE distdir
+ls -l $distdir $distdir/doc
+cd $distdir
+test "`cat write`" = "all is ok"
+test ! -f removed
+test ! -r removed
+test -f doc/README
+test -f doc/RELEASE-DATE
+test ! -f doc/HACING
+test ! -r doc/HACING
+./execute
+./execute | grep 'I run successfully'
+cd ..
+
+
+$MAKE distcheck
+test -f distcheck-run
+
+:
diff --git a/tests/list-of-tests.mk b/tests/list-of-tests.mk
index eaaa888..89cff2f 100644
--- a/tests/list-of-tests.mk
+++ b/tests/list-of-tests.mk
@@ -355,6 +355,7 @@ distcom4.test \
 distcom5.test \
 distcom-subdir.test \
 distdir.test \
+disthook.test \
 distlinks.test \
 distlinksbrk.test \
 distname.test \
@@ -363,6 +364,7 @@ distcheck-configure-flags-am.test \
 distcheck-configure-flags-subpkg.test \
 distcheck-hook.test \
 distcheck-hook2.test \
+distcheck-writable-srcdir.test \
 distcheck-missing-m4.test \
 distcheck-outdated-m4.test \
 distcheck-override-infodir.test \


hooks/post-receive
-- 
GNU Automake



reply via email to

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