mirror of
git://git.code.sf.net/p/openocd/code
synced 2025-08-15 15:33:46 +10:00
During the ./configure build stage, error './configure.gnu: line 1: -e: command not found' can occur. Problem: the -e flag with echo is not portable. While some shells support it (e.g., Bash), others (e.g., POSIX /bin/sh on some systems) do not. Solution: replacing echo -e with printf, since printf is POSIX-compliant and works consistently across different shells. Change-Id: I9efbba662599a61bbe1fc56a33dc1ee7ad58826c Signed-off-by: Pete Moore <pmoore@mozilla.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8653 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Andreas Fritiofson <andreas.fritiofson@gmail.com>
13 lines
448 B
Plaintext
13 lines
448 B
Plaintext
dnl AC_CONFIG_SUBDIRS does not allow configure options to be passed
|
|
dnl to subdirs, this function allows that by creating a configure.gnu
|
|
dnl script that prepends configure options and then calls the real
|
|
dnl configure script
|
|
AC_DEFUN([AX_CONFIG_SUBDIR_OPTION],
|
|
[
|
|
AC_CONFIG_SUBDIRS([$1])
|
|
|
|
m4_ifblank([$2], [rm -f $srcdir/$1/configure.gnu],
|
|
[printf '#!/bin/sh\nexec "`dirname "'\$'0"`/configure" '"$2"' "'\$'@"\n' > "$srcdir/$1/configure.gnu"
|
|
])
|
|
])
|