Subject: misc/30661: Incorrect use of ${INSTALL_FILE} in src/gnu/usr.bin/gettext/gettext/Makefile
To: None <misc-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <apb@cequrux.com>
List: netbsd-bugs
Date: 07/04/2005 13:08:00
>Number:         30661
>Category:       misc
>Synopsis:       Incorrect use of ${INSTALL_FILE} in src/gnu/usr.bin/gettext/gettext/Makefile
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 04 13:08:00 +0000 2005
>Originator:     Alan Barrett
>Release:        NetBSD 3.99.5
>Organization:
Not much
>Environment:
System: NetBSD 3.99.5
Architecture: i386
Machine: i386
>Description:
The METALOG that is created when using build.sh to build a release
contains a bogus entry for ./gettext.1 (in addition to the correct entry
for ./usr/share/man/man1/gettext.1).

This is caused by the following lines in
src/gnu/usr.bin/gettext/gettext/Makefile:

        gettext.1: ${DIST}/gettext/gettext-runtime/man/gettext.1.in
                ${INSTALL_FILE} $> $@

${INSTALL_FILE} expands to something that invokes
${TOOLDIR}/bin/nbinstall with args that make it append to the metalog,
and this is wrong.  The apparent intent here is merely to copy a file
from a source directory to ${.OBJDIR}/gettext.1, and ${INSTALL_FILE} is
not the right way to do that.

>How-To-Repeat:
build.sh release
grep '^./gettext.1' ${DESTDIR}/METALOG

>Fix:
I have discovered by experiment that using ${HOST_INSTALL_FILE} instead
of ${INSTALL_FILE} works.  According to lukem, using cp(1) would be more
appropriate.