Hi,

The automake-generated 'install-man[2-79] targets apply $(transform), that it,
the program name transformation, to the base name of manual pages before
installing them. This is wrong, because the program name transformation
has no effect on function names defined by libraries. It should only affect
the names of manual pages that describe programs, i.e. in the sections 1* and
8*.

How to reproduce:

$ automake --version | head -1
automake (GNU automake) 1.10.2

$ mkdir tmp
$ cd tmp

$ cat > configure.ac <<\EOF
AC_INIT
AM_INIT_AUTOMAKE(dummy, 0)
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
EOF

$ cat > Makefile.am <<\EOF
man_MANS = gettext.1 gettext.3 dgettext.3
EOF

$ cat > gettext.1 <<\EOF
.TH GETTEXT "1" "November 2007" "GNU gettext-runtime 0.17" GNU
.SH NAME
gettext \- translate message
.SH SYNOPSIS
.B gettext
[\fIOPTION\fR] [[\fITEXTDOMAIN\fR] \fIMSGID\fR]
EOF

$ cat > gettext.3 <<\EOF
.TH GETTEXT 3 "May 2001" "GNU gettext 0.17"
.SH NAME
gettext, dgettext, dcgettext \- translate message
.SH SYNOPSIS
.nf
.B #include <libintl.h>
.sp
.BI "char * gettext (const char * " msgid );
.BI "char * dgettext (const char * " domainname ", const char * " msgid );
EOF
$ cat > dgettext.3 <<\EOF
.so man3/gettext.3
EOF

$ aclocal

$ autoconf

$ automake --foreign --add --copy
configure.ac:2: installing `./install-sh'
configure.ac:2: installing `./missing'

$ ./configure --program-prefix=g --prefix=`pwd`/instdir
...
$ make install
make[1]: Entering directory `/tmp/tmp'
make[1]: Nothing to be done for `install-exec-am'.
test -z "/tmp/tmp/instdir/share/man/man1" || /arch/x86-linux/gnu/bin/mkdir -p 
"/tmp/tmp/instdir/share/man/man1"
 /arch/x86-linux/gnu/bin/install -c -m 644 'gettext.1' 
'/tmp/tmp/instdir/share/man/man1/ggettext.1'
test -z "/tmp/tmp/instdir/share/man/man3" || /arch/x86-linux/gnu/bin/mkdir -p 
"/tmp/tmp/instdir/share/man/man3"
 /arch/x86-linux/gnu/bin/install -c -m 644 'gettext.3' 
'/tmp/tmp/instdir/share/man/man3/ggettext.3'
 /arch/x86-linux/gnu/bin/install -c -m 644 'dgettext.3' 
'/tmp/tmp/instdir/share/man/man3/gdgettext.3'
make[1]: Leaving directory `/tmp/tmp'

$ ls instdir/share/man/man3/
gdgettext.3  ggettext.3

Expected output:

$ ls instdir/share/man/man3/
dgettext.3  gettext.3

The problem is in the generated Makefile, in the generated install-man3 rule:
It has this:
          inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
          inst=`echo $$inst | sed -e 's/^.*\///'`; \
          inst=`echo $$inst | sed '$(transform)'`.$$ext; \
where $(transform) expands to
          s&^&g&


Bruno


Reply via email to