On Tue, 19 Feb 2008, Ralf Wildenhues wrote:

How should I proceed, once all that is finished? Email to you and/or
automake bugzilla?

automake-patches@gnu.org is best.

Are unified diffs against the autoamke-1.10.1 tarball OK?

Yes.

What about re-indenting existing code?

Please as a separate patch if possible, and please following the
already-used style.

Hallo Ralf,

attached are five patches (the diffs are actually against the result of
applying your patch for PR 516 from 2008-01-22):

1. patch-02-notrans_MANS-reindent:

Reindentation of a section in automake.in, anticipating an additional
foreach loop (it was less work to do this first).

2. patch-03-notrans_MANS-impl:

The actual implementation of `notrans_'. The patch looks awful but the
logic in the resulting patched file should be reasonably clear.

At the same time the dependencies for `install-man%SECTION%' have been
revised. All make variables not used in Makefile.am are omitted from the
install/uninstall rules. All those used in the rules also appear as
dependencies.

One consequence: "make dist_man_MANS='bar.1 baz.5' install-man" will only
work well if `dist_man_MANS' is used in Makefile.am and Automake has
generated the relevant (!notrans_) part of the install-man1 and
install-man5 rules. So ... ?

3. patch-04-notrans_MANS-doc:

Texinfo documentation for the notrans_ prefix.

4. patch-05-notrans_MANS-test:

Two new test cases for missing dependencies and the notrans_ prefix.

5. automake-1.10.1-ChangeLog:

Proposed ChangeLog entry.

==============

Please feel free to revise the wording in texinfo, comments, and/or
ChangeLog.

regards
Peter Breitenlohner <[EMAIL PROTECTED]>
        Prepare for implementation of notrans_man_MANS: anticipate
        an additional foreach loop and reindent accordingly.

        Note: `diff -b' yields nothing.

diff -ur -N automake-1.10.1.orig/automake.in automake-1.10.1/automake.in
--- automake-1.10.1.orig/automake.in    2008-01-21 23:11:41.000000000 +0100
+++ automake-1.10.1/automake.in 2008-02-19 18:07:41.000000000 +0100
@@ -3366,42 +3366,42 @@
   my (%sections, %vlist);
   # We handle nodist_ for uniformity.  man pages aren't distributed
   # by default so it isn't actually very important.
-  foreach my $pfx ('', 'dist_', 'nodist_')
-    {
-      # Add more sections as needed.
-      foreach my $section ('0'..'9', 'n', 'l')
+      foreach my $pfx ('', 'dist_', 'nodist_')
        {
-         my $varname = $pfx . 'man' . $section . '_MANS';
-         if (var ($varname))
+         # Add more sections as needed.
+         foreach my $section ('0'..'9', 'n', 'l')
            {
-             $sections{$section} = 1;
-             $varname = '$(' . $varname . ')';
-             $vlist{$varname} = 1;
+             my $varname = $pfx . 'man' . $section . '_MANS';
+             if (var ($varname))
+               {
+                 $sections{$section} = 1;
+                 $varname = '$(' . $varname . ')';
+                 $vlist{$varname} = 1;
 
-             &push_dist_common ($varname)
-               if $pfx eq 'dist_';
+                 &push_dist_common ($varname)
+                   if $pfx eq 'dist_';
+               }
            }
-       }
 
-      my $varname = $pfx . 'man_MANS';
-      my $var = var ($varname);
-      if ($var)
-       {
-         foreach ($var->value_as_list_recursive)
+         my $varname = $pfx . 'man_MANS';
+         my $var = var ($varname);
+         if ($var)
            {
-             # A page like `foo.1c' goes into man1dir.
-             if (/\.([0-9a-z])([a-z]*)$/)
+             foreach ($var->value_as_list_recursive)
                {
-                 $sections{$1} = 1;
+                 # A page like `foo.1c' goes into man1dir.
+                 if (/\.([0-9a-z])([a-z]*)$/)
+                   {
+                     $sections{$1} = 1;
+                   }
                }
-           }
 
-         $varname = '$(' . $varname . ')';
-         $vlist{$varname} = 1;
-         &push_dist_common ($varname)
-           if $pfx eq 'dist_';
+             $varname = '$(' . $varname . ')';
+             $vlist{$varname} = 1;
+             &push_dist_common ($varname)
+               if $pfx eq 'dist_';
+           }
        }
-    }
 
   return unless %sections;
 
diff -ur -N -x 'automake.info*' -x version.texi -x stamp-vti 
automake-1.10.1.orig/automake.in automake-1.10.1/automake.in
--- automake-1.10.1.orig/automake.in    2008-02-19 18:07:41.000000000 +0100
+++ automake-1.10.1/automake.in 2008-02-20 01:52:26.000000000 +0100
@@ -3363,27 +3363,38 @@
   # Find all the sections in use.  We do this by first looking for
   # "standard" sections, and then looking for any additional
   # sections used in man_MANS.
-  my (%sections, %vlist);
+  my (%sections, %nsections, %tsections, %nvlist, %tvlist, %nsvlist, %tsvlist);
   # We handle nodist_ for uniformity.  man pages aren't distributed
   # by default so it isn't actually very important.
+  foreach my $npfx ('', 'notrans_')
+    {
       foreach my $pfx ('', 'dist_', 'nodist_')
        {
          # Add more sections as needed.
          foreach my $section ('0'..'9', 'n', 'l')
            {
-             my $varname = $pfx . 'man' . $section . '_MANS';
+             my $varname = $npfx . $pfx . 'man' . $section . '_MANS';
              if (var ($varname))
                {
                  $sections{$section} = 1;
                  $varname = '$(' . $varname . ')';
-                 $vlist{$varname} = 1;
+                 if ($npfx eq 'notrans_')
+                   {
+                     $nsections{$section} = 1;
+                     $nsvlist{$varname} = 1;
+                   }
+                 else
+                   {
+                     $tsections{$section} = 1;
+                     $tsvlist{$varname} = 1;
+                   }
 
                  &push_dist_common ($varname)
                    if $pfx eq 'dist_';
                }
            }
 
-         my $varname = $pfx . 'man_MANS';
+         my $varname = $npfx . $pfx . 'man_MANS';
          my $var = var ($varname);
          if ($var)
            {
@@ -3393,28 +3404,81 @@
                  if (/\.([0-9a-z])([a-z]*)$/)
                    {
                      $sections{$1} = 1;
+                     if ($npfx eq 'notrans_')
+                       {
+                         $nsections{$1} = 1;
+                       }
+                     else
+                       {
+                         $tsections{$1} = 1;
+                       }
                    }
                }
 
              $varname = '$(' . $varname . ')';
-             $vlist{$varname} = 1;
+             if ($npfx eq 'notrans_')
+               {
+                 $nvlist{$varname} = 1;
+               }
+             else
+               {
+                 $tvlist{$varname} = 1;
+               }
              &push_dist_common ($varname)
                if $pfx eq 'dist_';
            }
        }
+    }
 
   return unless %sections;
 
+  # Build section independent variables (see mans.am).
+  my $notry = %nvlist;
+  my @notrz = sort keys %nvlist;
+  my $dotry = %tvlist;
+  my @dotrz = sort keys %tvlist;
+
   # Now for each section, generate an install and uninstall rule.
   # Sort sections so output is deterministic.
   foreach my $section (sort keys %sections)
     {
+      # Build section dependent variables (see mans.am).
+      my $notr = $notry || exists $nsections{$section};
+      my $dotr = $dotry || exists $tsections{$section};
+      my (%nslist, %tslist);
+      my $expr = 'man' . $section . '_MANS';
+      foreach my $varname (keys %nsvlist)
+       {
+         if ($varname =~ /$expr/)
+           {
+             $nslist{$varname} = 1;
+           }
+       }
+      foreach my $varname (keys %tsvlist)
+       {
+         if ($varname =~ /$expr/)
+           {
+             $tslist{$varname} = 1;
+           }
+       }
+      my @notrx = sort keys %nslist;
+      my @dotrx = sort keys %tslist;
+      my @deps = sort (keys %nvlist, keys %tvlist, keys %nslist, keys %tslist);
       $output_rules .= &file_contents ('mans',
                                       new Automake::Location,
-                                      SECTION => $section);
+                                      SECTION => $section,
+                                      DEPS => "@deps",
+                                      NOTR => $notr,
+                                      NOTRX => "@notrx",
+                                      NOTRY => $notry,
+                                      NOTRZ => "@notrz",
+                                      DOTR => $dotr,
+                                      DOTRX => "@dotrx",
+                                      DOTRY => $dotry,
+                                      DOTRZ => "@dotrz");
     }
 
-  my @mans = sort keys %vlist;
+  my @mans = sort (keys %nvlist, keys %tvlist, keys %nsvlist, keys %tsvlist);
   $output_vars .= file_contents ('mans-vars',
                                 new Automake::Location,
                                 MANS => "@mans");
diff -ur -N -x 'automake.info*' -x version.texi -x stamp-vti 
automake-1.10.1.orig/lib/am/mans.am automake-1.10.1/lib/am/mans.am
--- automake-1.10.1.orig/lib/am/mans.am 2008-02-20 09:38:10.000000000 +0100
+++ automake-1.10.1/lib/am/mans.am      2008-02-20 00:50:53.000000000 +0100
@@ -16,6 +16,20 @@
 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 ## 02110-1301, USA.
 
+## Parameters:
+##     SECTION string  man section
+##     DEPS    string  dependencies
+##
+##     NOTR    bool    have notrans_ MANS
+##     NOTRX   string  notrans_ man%SECTION%_MANS (if any)
+##     NOTRY   bool    have notrans_ man_MANS
+##     NOTRZ   string  notrans_ man_MANS
+##
+##     DOTR    bool    same
+##     DOTRX   string    as above
+##     DOTRY   bool        without
+##     DOTRZ   string        notrans_
+
 man%SECTION%dir = $(mandir)/man%SECTION%
 
 ## ------------ ##
@@ -29,37 +43,65 @@
 ?INSTALL-MAN?install-data-am: install-man
 ?INSTALL-MAN?am__installdirs += "$(DESTDIR)$(man%SECTION%dir)"
 .PHONY install-man: install-man%SECTION%
-install-man%SECTION%: $(man%SECTION%_MANS) $(man_MANS)
+install-man%SECTION%: %DEPS%
        @$(NORMAL_INSTALL)
        test -z "$(man%SECTION%dir)" || $(MKDIR_P) 
"$(DESTDIR)$(man%SECTION%dir)"
-       @list='$(man%SECTION%_MANS) $(dist_man%SECTION%_MANS) 
$(nodist_man%SECTION%_MANS)'; \
+## Handle MANS with notrans_ prefix
+?NOTR? @list='%NOTRX%'; \
+## Extract all items from notrans_man_MANS that should go in this section.
+## This must be done dynamically to support conditionals.
+?NOTRY?        l2='%NOTRZ%'; \
+?NOTRY?        for i in $$l2; do \
+?NOTRY?          case "$$i" in \
+## Have to accept files like `foo.1c'.
+?NOTRY?            *.%SECTION%*) list="$$list $$i" ;; \
+?NOTRY?          esac; \
+?NOTRY?        done; \
+?NOTR? for i in $$list; do \
+## Find the file.
+?NOTR?   if test -f $$i; then file=$$i; \
+?NOTR?   else file=$(srcdir)/$$i; fi; \
+## Change the extension if needed.
+?NOTR?   ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+?NOTR?   case "$$ext" in \
+?NOTR?     %SECTION%*) ;; \
+?NOTR?     *) ext='%SECTION%' ;; \
+?NOTR?   esac; \
+## Extract basename of man page and append extension.
+?NOTR?   inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+?NOTR?   inst=`echo $$inst | sed -e 's/^.*\///'`.$$ext; \
+?NOTR?   echo " $(INSTALL_DATA) '$$file' 
'$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
+?NOTR?   $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man%SECTION%dir)/$$inst"; \
+?NOTR? done
+## Handle MANS without notrans_ prefix
+?DOTR? @list='%DOTRX%'; \
 ## Extract all items from man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
+?DOTRY?        l2='%DOTRZ%'; \
+?DOTRY?        for i in $$l2; do \
+?DOTRY?          case "$$i" in \
 ## Have to accept files like `foo.1c'.
-           *.%SECTION%*) list="$$list $$i" ;; \
-         esac; \
-       done; \
-       for i in $$list; do \
+?DOTRY?            *.%SECTION%*) list="$$list $$i" ;; \
+?DOTRY?          esac; \
+?DOTRY?        done; \
+?DOTR? for i in $$list; do \
 ## Find the file.
-         if test -f $$i; then file=$$i; \
-         else file=$(srcdir)/$$i; fi; \
+?DOTR?   if test -f $$i; then file=$$i; \
+?DOTR?   else file=$(srcdir)/$$i; fi; \
 ## Change the extension if needed.
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           %SECTION%*) ;; \
-           *) ext='%SECTION%' ;; \
-         esac; \
+?DOTR?   ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+?DOTR?   case "$$ext" in \
+?DOTR?     %SECTION%*) ;; \
+?DOTR?     *) ext='%SECTION%' ;; \
+?DOTR?   esac; \
 ## Extract basename of man page and run it through the program rename
 ## transform.
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " $(INSTALL_DATA) '$$file' 
'$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
-         $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man%SECTION%dir)/$$inst"; \
-       done
+?DOTR?   inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+?DOTR?   inst=`echo $$inst | sed -e 's/^.*\///'`; \
+?DOTR?   inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+?DOTR?   echo " $(INSTALL_DATA) '$$file' 
'$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
+?DOTR?   $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man%SECTION%dir)/$$inst"; \
+?DOTR? done
 
 
 ## -------------- ##
@@ -72,28 +114,53 @@
 .PHONY uninstall-man: uninstall-man%SECTION%
 uninstall-man%SECTION%:
        @$(NORMAL_UNINSTALL)
-       @list='$(man%SECTION%_MANS) $(dist_man%SECTION%_MANS) 
$(nodist_man%SECTION%_MANS)'; \
+## Handle MANS with notrans_ prefix
+?NOTR? @list='%NOTRX%'; \
+## Extract all items from notrans_man_MANS that should go in this section.
+## This must be done dynamically to support conditionals.
+?NOTRY?        l2='%NOTRZ%'; \
+?NOTRY?        for i in $$l2; do \
+?NOTRY?          case "$$i" in \
+## Have to accept files like `foo.1c'.
+?NOTRY?            *.%SECTION%*) list="$$list $$i" ;; \
+?NOTRY?          esac; \
+?NOTRY?        done; \
+?NOTR? for i in $$list; do \
+## Change the extension if needed.
+?NOTR?   ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+?NOTR?   case "$$ext" in \
+?NOTR?     %SECTION%*) ;; \
+?NOTR?     *) ext='%SECTION%' ;; \
+?NOTR?   esac; \
+## Extract basename of man page and append extension.
+?NOTR?   inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+?NOTR?   inst=`echo $$inst | sed -e 's/^.*\///'`.$$ext; \
+?NOTR?   echo " rm -f '$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
+?NOTR?   rm -f "$(DESTDIR)$(man%SECTION%dir)/$$inst"; \
+?NOTR? done
+## Handle MANS without notrans_ prefix
+?DOTR? @list='%DOTRX%'; \
 ## Extract all items from man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
-       l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
-       for i in $$l2; do \
-         case "$$i" in \
+?DOTRY?        l2='%DOTRZ%'; \
+?DOTRY?        for i in $$l2; do \
+?DOTRY?          case "$$i" in \
 ## Have to accept files like `foo.1c'.
-           *.%SECTION%*) list="$$list $$i" ;; \
-         esac; \
-       done; \
-       for i in $$list; do \
+?DOTRY?            *.%SECTION%*) list="$$list $$i" ;; \
+?DOTRY?          esac; \
+?DOTRY?        done; \
+?DOTR? for i in $$list; do \
 ## Change the extension if needed.
-         ext=`echo $$i | sed -e 's/^.*\\.//'`; \
-         case "$$ext" in \
-           %SECTION%*) ;; \
-           *) ext='%SECTION%' ;; \
-         esac; \
+?DOTR?   ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+?DOTR?   case "$$ext" in \
+?DOTR?     %SECTION%*) ;; \
+?DOTR?     *) ext='%SECTION%' ;; \
+?DOTR?   esac; \
 ## Extract basename of man page and run it through the program rename
 ## transform.
-         inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
-         inst=`echo $$inst | sed -e 's/^.*\///'`; \
-         inst=`echo $$inst | sed '$(transform)'`.$$ext; \
-         echo " rm -f '$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
-         rm -f "$(DESTDIR)$(man%SECTION%dir)/$$inst"; \
-       done
+?DOTR?   inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+?DOTR?   inst=`echo $$inst | sed -e 's/^.*\///'`; \
+?DOTR?   inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+?DOTR?   echo " rm -f '$(DESTDIR)$(man%SECTION%dir)/$$inst'"; \
+?DOTR?   rm -f "$(DESTDIR)$(man%SECTION%dir)/$$inst"; \
+?DOTR? done
diff -ur -N automake-1.10.1.orig/doc/automake.texi 
automake-1.10.1/doc/automake.texi
--- automake-1.10.1.orig/doc/automake.texi      2008-01-21 23:41:02.000000000 
+0100
+++ automake-1.10.1/doc/automake.texi   2008-02-19 20:52:29.000000000 +0100
@@ -1962,8 +1962,9 @@
 
 Some primaries also allow additional prefixes that control other
 aspects of @command{automake}'s behavior.  The currently defined prefixes
-are @samp{dist_}, @samp{nodist_}, and @samp{nobase_}.  These prefixes
-are explained later (@pxref{Program and Library Variables}).
+are @samp{dist_}, @samp{nodist_}, @samp{nobase_}, and @samp{notrans_}.
+These prefixes are explained later (@pxref{Program and Library Variables})
+(@pxref{Man pages}).
 
 
 @node Canonicalization
@@ -7633,6 +7634,34 @@
 The @code{nobase_} prefix is meaningless for man pages and is
 disallowed.
 
[EMAIL PROTECTED] notrans_
[EMAIL PROTECTED] @code{notrans_} prefix
[EMAIL PROTECTED] Man page renaming, avoiding
[EMAIL PROTECTED] Avoiding man page renaming
+
+The GNU Build System provides means to automatically rename executables
+before they are installed.  By default, the same renaming rules (if any) are
+applied to the basenames of man pages.  However, this can be avoided by use
+of the @code{notrans_} prefix.  For instance here is how to install two man
+pages for an executable @samp{foo} (to be renamed) allowing to access a
+library function @samp{foo()} (not to be renamed) from the command line.
+
[EMAIL PROTECTED]
+man1_MANS = foo.1
+notrans_man3_MANS = foo.3
[EMAIL PROTECTED] example
+
[EMAIL PROTECTED] @code{notrans_} and @code{dist_} or @code{nodist_}
[EMAIL PROTECTED] @code{dist_} and @code{notrans_}
[EMAIL PROTECTED] @code{nodist_} and @code{notrans_}
+
[EMAIL PROTECTED] must be specified first when used in conjunction with
+either @samp{dist_} or @samp{nodist_} (@pxref{Dist}).  For instance:
+
[EMAIL PROTECTED]
+notrans_dist_man_MANS = foo.3
[EMAIL PROTECTED] example
+
 
 @node Install
 @chapter What Gets Installed
diff -ur -N -x 'automake.info*' -x version.texi -x stamp-vti 
automake-1.10.1.orig/tests/Makefile.am automake-1.10.1/tests/Makefile.am
--- automake-1.10.1.orig/tests/Makefile.am      2008-02-20 09:38:10.000000000 
+0100
+++ automake-1.10.1/tests/Makefile.am   2008-02-20 11:28:35.000000000 +0100
@@ -362,6 +362,7 @@
 man.test \
 man2.test \
 man3.test \
+man4.test \
 mclean.test \
 mdate.test \
 mdate2.test \
@@ -393,6 +394,7 @@
 noinstdir.test \
 nolink.test \
 nostdinc.test \
+notrans.test \
 number.test \
 objc.test \
 objc2.test \
diff -ur -N -x 'automake.info*' -x version.texi -x stamp-vti 
automake-1.10.1.orig/tests/Makefile.in automake-1.10.1/tests/Makefile.in
--- automake-1.10.1.orig/tests/Makefile.in      2008-02-20 09:38:10.000000000 
+0100
+++ automake-1.10.1/tests/Makefile.in   2008-02-20 11:28:38.000000000 +0100
@@ -494,6 +494,7 @@
 man.test \
 man2.test \
 man3.test \
+man4.test \
 mclean.test \
 mdate.test \
 mdate2.test \
@@ -525,6 +526,7 @@
 noinstdir.test \
 nolink.test \
 nostdinc.test \
+notrans.test \
 number.test \
 objc.test \
 objc2.test \
diff -ur -N -x 'automake.info*' -x version.texi -x stamp-vti 
automake-1.10.1.orig/tests/man4.test automake-1.10.1/tests/man4.test
--- automake-1.10.1.orig/tests/man4.test        1970-01-01 01:00:00.000000000 
+0100
+++ automake-1.10.1/tests/man4.test     2008-02-20 10:07:12.000000000 +0100
@@ -0,0 +1,36 @@
+#! /bin/sh
+# Copyright (C) 2008  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 3, 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_man1_MANS appears as dependency for install-man1.
+
+. ./defs || exit 1
+
+set -e
+
+cat > Makefile.am << 'END'
+dist_man_MANS = foo.1
+END
+
+cat >>configure.in <<'END'
+AC_OUTPUT
+END
+
+: > foo.1
+
+$ACLOCAL
+$AUTOMAKE
+
+grep '^install-man1:' Makefile.in | grep '\$(dist_man_MANS)'
diff -ur -N -x 'automake.info*' -x version.texi -x stamp-vti 
automake-1.10.1.orig/tests/notrans.test automake-1.10.1/tests/notrans.test
--- automake-1.10.1.orig/tests/notrans.test     1970-01-01 01:00:00.000000000 
+0100
+++ automake-1.10.1/tests/notrans.test  2008-02-20 11:25:40.000000000 +0100
@@ -0,0 +1,53 @@
+#! /bin/sh
+# Copyright (C) 2008  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 3, 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 notrans_ prefix for MANS primary.
+
+. ./defs || exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'EOF'
+dist_man_MANS = foo.1
+notrans_man_MANS = foo.5
+
+test-install: install
+       test -f inst/man/man1/gnu-foo.1
+       test -f inst/man/man5/foo.5
+EOF
+
+: > foo.1
+: > foo.5
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure --program-prefix=gnu- --prefix `pwd`/inst --mandir `pwd`/inst/man
+$MAKE
+$MAKE test-install
+$MAKE uninstall
+test `find inst/man -type f -print | wc -l` = 0
+
+# Opportunistically test for installdirs.
+rm -rf inst
+$MAKE installdirs
+test -d inst/man/man1
+test -d inst/man/man5
2008-02-20  Peter Breitenlohner  <[EMAIL PROTECTED]>

        * automake.in (handle_man_pages), lib/am/mans.am: Implement
        notrans_ prefix for MANS primary and rework dependencies for
        install-man%SECTION%; use only vars defined in Makefile.am.
        * tests/man4.test: New test (install-man%SECTION% dependencies).
        * tests/notrans.test: New test (notrans_ prefix).
        * tests/Makefile.am: Update.
        * doc/automake.texi: Document notrans_ prefix.

Reply via email to