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

[mpop-users] po makes bad assumption and using /bin/sh to run a binary (not a shell script)



The INSTALL variable can be defined via ./configure to set it in the 
Makefiles. This is very common. I build thousands of packages (using 
pkgsrc bulk build framework) and others commonly use their own native or 
preferred INSTALL.

So installing "po" fails as it wants to run INSTALL with sh(1). For 
example:

  $ /bin/sh /usr/bin/install
  /usr/bin/install: 1: Syntax error: "(" unexpected
  $ file /usr/bin/install       
  /usr/bin/install: ELF 32-bit LSB executable, Intel 80386, version 1 
  (SYSV), for NetBSD 3.99.24, dynamically linked (uses shared libs), for 
  NetBSD 3.99.24, not stripped

My fix is here:

--- po/Makefile.in.in.orig	2007-01-09 19:58:56.000000000 -0600
+++ po/Makefile.in.in	2007-01-09 19:59:38.000000000 -0600
@@ -33,13 +33,12 @@
 
 # We use $(mkdir_p).
 # In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
-# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
-# @install_sh@ does not start with $(SHELL), so we add it.
+# "$(mkinstalldirs)" or as "$(install_sh) -d".
 # In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
 # either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
 # versions, $(mkinstalldirs) and $(install_sh) are unused.
-mkinstalldirs = $(SHELL) @install_sh@ -d
-install_sh = $(SHELL) @install_sh@
+mkinstalldirs = @install_sh@ -d
+install_sh = @install_sh@
 MKDIR_P = @MKDIR_P@
 mkdir_p = @mkdir_p@


Note that your other Makefile.in files don't assume that INSTALL is shell 
script. Why does this?