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. Release-1-


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, master, updated. Release-1-10-268-gb345737
Date: Sat, 07 Mar 2009 00:12:31 +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=b34573760e626b558a59ea30f8ab58b76b43082a

The branch, master has been updated
       via  b34573760e626b558a59ea30f8ab58b76b43082a (commit)
      from  32defaf039f2ee42cca07d079412f4e554f461b5 (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 b34573760e626b558a59ea30f8ab58b76b43082a
Author: Peter Breitenlohner <address@hidden>
Date:   Sat Mar 7 01:06:18 2009 +0100

    Extract correct man section from files in man_MANS.
    
    * lib/am/mans.am: Extract correct man section in the presence of
    multiple dots in the file base name and/or directory components.
    * tests/man5.test: New test case.
    * tests/Makefile.am: Update.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog                      |    9 ++++++++
 lib/am/mans.am                 |   30 ++++++++++++----------------
 tests/Makefile.am              |    1 +
 tests/Makefile.in              |    1 +
 tests/{man2.test => man5.test} |   42 +++++++++++++++++++++++++++------------
 5 files changed, 53 insertions(+), 30 deletions(-)
 copy tests/{man2.test => man5.test} (53%)

diff --git a/ChangeLog b/ChangeLog
index 49c2543..5aff609 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-03-07  Peter Breitenlohner  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Extract correct man section from files in man_MANS.
+       * lib/am/mans.am: Extract correct man section in the presence of
+       multiple dots in the file base name and/or directory components.
+       * tests/man5.test: New test case.
+       * tests/Makefile.am: Update.
+
 2009-03-06  Ralf Wildenhues  <address@hidden>
 
        * doc/automake.texi (maintainer-mode): Fix logic in
diff --git a/lib/am/mans.am b/lib/am/mans.am
index 803a892..d389145 100644
--- a/lib/am/mans.am
+++ b/lib/am/mans.am
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1998, 2001, 2003, 2004, 2006, 2008 Free Software
+## Copyright (C) 1998, 2001, 2003, 2004, 2006, 2008, 2009 Free Software
 ## Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -38,10 +38,9 @@ if %?NOTRANS_MANS%
        { for i in $$list; do echo "$$i"; done;  \
 ## Extract all items from notrans_man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
-?HAVE_NOTRANS? l2='%NOTRANS_LIST%'; for i in $$l2; do \
-## Accept files like `foo.1c'.
-?HAVE_NOTRANS?   case $$i in *.%SECTION%*) echo "$$i";; esac; \
-?HAVE_NOTRANS? done; \
+?HAVE_NOTRANS? l2='%NOTRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
+## Accept for `man1' files like `foo.1c' but not `sub.1/foo.2' or `foo-2.1.4'.
+?HAVE_NOTRANS?   sed -n '/\.%SECTION%[a-z]*$$/p'; \
 ## Extract basename of manpage, change the extension if needed.
        } | while read p; do \
 ## Find the file.
@@ -71,10 +70,9 @@ if %?TRANS_MANS%
        { for i in $$list; do echo "$$i"; done; \
 ## Extract all items from notrans_man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
-?HAVE_TRANS?   l2='%TRANS_LIST%'; for i in $$l2; do \
-## Accept files like `foo.1c'.
-?HAVE_TRANS?     case $$i in *.%SECTION%*) echo "$$i";; esac; \
-?HAVE_TRANS?   done; \
+?HAVE_TRANS?   l2='%TRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
+## Accept for `man1' files like `foo.1c' but not `sub.1/foo.2' or `foo-2.1.4'.
+?HAVE_TRANS?     sed -n '/\.%SECTION%[a-z]*$$/p'; \
 ## Extract basename of manpage, change the extension if needed.
        } | while read p; do \
 ## Find the file.
@@ -116,10 +114,9 @@ if %?NOTRANS_MANS%
        files=`{ for i in $$list; do echo "$$i"; done; \
 ## Extract all items from notrans_man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
-?HAVE_NOTRANS? l2='%NOTRANS_LIST%'; for i in $$l2; do \
-## Accept files like `foo.1c'.
-?HAVE_NOTRANS?   case $$i in *.%SECTION%*) echo "$$i";; esac; \
-?HAVE_NOTRANS? done; \
+?HAVE_NOTRANS? l2='%NOTRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
+## Accept for `man1' files like `foo.1c' but not `sub.1/foo.2' or `foo-2.1.4'.
+?HAVE_NOTRANS?   sed -n '/\.%SECTION%[a-z]*$$/p'; \
 ## Extract basename of manpage, change the extension if needed.
        } | sed 's,.*/,,;s,\.[^%SECTION%][0-9a-z]*$$,.%SECTION%,'`; \
        test -n "$$files" || exit 0; \
@@ -132,10 +129,9 @@ if %?TRANS_MANS%
        files=`{ for i in $$list; do echo "$$i"; done; \
 ## Extract all items from man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
-?HAVE_TRANS?   l2='%TRANS_LIST%'; for i in $$l2; do \
-## Accept files like `foo.1c'.
-?HAVE_TRANS?     case $$i in *.%SECTION%*) echo "$$i";; esac; \
-?HAVE_TRANS?   done; \
+?HAVE_TRANS?   l2='%TRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
+## Accept for `man1' files like `foo.1c' but not `sub.1/foo.2' or `foo-2.1.4'.
+?HAVE_TRANS?     sed -n '/\.%SECTION%[a-z]*$$/p'; \
 ## Extract basename of manpage, run it through the program rename
 ## transform, and change the extension if needed.
        } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^%SECTION%][0-9a-z]*$$,%SECTION%,;x' 
\
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 2d8a974..d4687f4 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -398,6 +398,7 @@ man.test \
 man2.test \
 man3.test \
 man4.test \
+man5.test \
 mclean.test \
 mdate.test \
 mdate2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 92434ab..dc0a339 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -553,6 +553,7 @@ man.test \
 man2.test \
 man3.test \
 man4.test \
+man5.test \
 mclean.test \
 mdate.test \
 mdate2.test \
diff --git a/tests/man2.test b/tests/man5.test
similarity index 53%
copy from tests/man2.test
copy to tests/man5.test
index 538f864..626602a 100755
--- a/tests/man2.test
+++ b/tests/man5.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2009  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,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/>.
 
-# Make sure that man pages listed in man_MANS are installed and
-# renamed as documented.
+# Make sure to extract the correct mansection from files in man_MANS.
 
 . ./defs || Exit 1
 
@@ -24,28 +23,45 @@ set -e
 echo AC_OUTPUT >> configure.in
 
 cat > Makefile.am << 'END'
-man_MANS = foo.2
-man4_MANS = foo.4 bar.man
+man_MANS = foo-1.4.5/foo.2 foo-1.4.5/bar.3 baz-1.4.2
+notrans_man_MANS = foo-1.4.5/nfoo.2 foo-1.4.5/nbar.3 nbaz-1.4.2
 END
 
-: > foo.2
-: > foo.4
-: > bar.man
+mkdir foo-1.4.5
+
+: > foo-1.4.5/foo.2
+: > foo-1.4.5/nfoo.2
+: > foo-1.4.5/bar.3
+: > foo-1.4.5/nbar.3
+: > baz-1.4.2
+: > nbaz-1.4.2
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
 # Let's play with $DESTDIR too, it shouldn't hurt.
-./configure --prefix='' --mandir=/man
+./configure --mandir=/man
 DESTDIR="`pwd`/_inst" $MAKE -e install
 
 test -f ./_inst/man/man2/foo.2
-test -f ./_inst/man/man4/foo.4
-test -f ./_inst/man/man4/bar.4
+test -f ./_inst/man/man2/nfoo.2
+test -f ./_inst/man/man2/baz-1.4.2
+test -f ./_inst/man/man2/nbaz-1.4.2
+test -f ./_inst/man/man3/bar.3
+test -f ./_inst/man/man3/nbar.3
+
+test ! -d ./_inst/man/man1
+test ! -d ./_inst/man/man4
+test ! -d ./_inst/man/man5
 
 DESTDIR="`pwd`/_inst" $MAKE -e uninstall
 
 test ! -f ./_inst/man/man2/foo.2
-test ! -f ./_inst/man/man4/foo.4
-test ! -f ./_inst/man/man4/bar.4
+test ! -f ./_inst/man/man2/nfoo.2
+test ! -f ./_inst/man/man2/baz-1.4.2
+test ! -f ./_inst/man/man2/nbaz-1.4.2
+test ! -f ./_inst/man/man3/bar.3
+test ! -f ./_inst/man/man3/nbar.3
+
+:


hooks/post-receive
--
GNU Automake




reply via email to

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