[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
must install-sh be executable?
From: |
Bruno Haible |
Subject: |
must install-sh be executable? |
Date: |
Mon, 11 Sep 2006 16:59:59 +0200 |
User-agent: |
KMail/1.9.1 |
Hi,
In automake-1.9b, the @install_sh@ variable was changed to start with
'$(SHELL) '.
2005-10-03 Peter O'Gorman <address@hidden> (tiny change)
* lib/am/distdir.am: Remove $(SHELL) when calling install_sh
* m4/strip.m4: Ditto.
* m4/install-sh.m4: Add $(SHELL) to the definition of install_sh
Apparently as a protection against invoking a non-executable shell script.
But AM_PROG_MKDIR_P sets mkdir_p to $MKDIR_P from AC_PROG_MKDIR_P, and
the value of MKDIR_P from AC_PROG_MKDIR_P can be set to a value that
doesn't start with $(SHELL):
ac_install_sh="$ac_aux_dir/install-sh -c"
...
MKDIR_P="$ac_install_sh -d"
Similarly, the INSTALL variable may be set to a value that doesn't start with
$(SHELL):
ac_install_sh="$ac_aux_dir/install-sh -c"
...
INSTALL=$ac_install_sh
Here is a fix that ensures that INSTALL and MKDIR_P are always starting with
$(SHELL) when they refer to a shell script in the package.
2006-09-10 Bruno Haible <address@hidden>
Don't require that install-sh be executable.
* lib/autoconf/status.m4 (_AC_OUTPUT_FILE): Prefix ac_INSTALL and
ac_MKDIR_P with "$(SHELL)" when they refer to install-sh or install.sh
or shtool.
*** autoconf-2.60a/lib/autoconf/status.m4.bak 2006-08-08 18:29:05.000000000
+0200
--- autoconf-2.60a/lib/autoconf/status.m4 2006-09-10 18:21:28.000000000
+0200
***************
*** 493,498 ****
--- 493,500 ----
AC_PROVIDE_IFELSE([AC_PROG_INSTALL],
[ case $INSTALL in
[[\\/$]]* | ?:[[\\/]]* ) ac_INSTALL=$INSTALL ;;
+ */"install-sh -c" | */"install.sh -c" | */"shtool install -c")
+ ac_INSTALL="\$(SHELL) $ac_top_build_prefix$INSTALL" ;;
*) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
esac
])dnl
***************
*** 500,506 ****
[ ac_MKDIR_P=$MKDIR_P
case $MKDIR_P in
[[\\/$]]* | ?:[[\\/]]* ) ;;
! */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
esac
])dnl
_ACEOF
--- 502,510 ----
[ ac_MKDIR_P=$MKDIR_P
case $MKDIR_P in
[[\\/$]]* | ?:[[\\/]]* ) ;;
! */"install-sh -c -d" | */"install.sh -c -d" | */"shtool install -c -d")
! ac_MKDIR_P="\$(SHELL) $ac_top_build_prefix$MKDIR_P" ;;
! *) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
esac
])dnl
_ACEOF
This fix has no effect for automake's mkdir_p variable, since it is coded
to use the value of MKDIR_P (before config.status), not of ac_MKDIR_P
(inside config.status). So here is an additional fix:
2006-09-10 Bruno Haible <address@hidden>
Don't require that install-sh be executable.
* m4/mkdirp.m4 (AM_PROG_MKDIR_P): Prefix mkdir_p with "$(SHELL)" when
it refers to install-sh or install.sh or shtool.
*** automake-1.9b/m4/mkdirp.m4.bak 2006-08-20 17:37:06.000000000 +0200
--- automake-1.9b/m4/mkdirp.m4 2006-09-10 18:24:03.000000000 +0200
***************
*** 21,26 ****
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
case $mkdir_p in
[[\\/$]]* | ?:[[\\/]]*) ;;
! */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
esac
])
--- 21,28 ----
AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
case $mkdir_p in
[[\\/$]]* | ?:[[\\/]]*) ;;
! */"install-sh -c -d" | */"install.sh -c -d" | */"shtool install -c -d")
! mkdir_p="\$(SHELL) \$(top_builddir)/$mkdir_p" ;;
! *) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
esac
])
- must install-sh be executable?,
Bruno Haible <=