]> www.infradead.org Git - users/borneoa/openocd-next.git/commitdiff
jimtcl: Fix command not found
authorPete Moore <pmoore@mozilla.com>
Mon, 16 Dec 2024 13:02:14 +0000 (14:02 +0100)
committerAndreas Fritiofson <andreas.fritiofson@gmail.com>
Sun, 22 Dec 2024 00:40:33 +0000 (00:40 +0000)
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>
config_subdir.m4

index 2be590e44a8b2b71e197adebb9cf66172d173b20..5549c760af24d8216056ac851505aec8a0ca0ae9 100644 (file)
@@ -7,6 +7,6 @@ AC_DEFUN([AX_CONFIG_SUBDIR_OPTION],
 AC_CONFIG_SUBDIRS([$1])
 
 m4_ifblank([$2], [rm -f $srcdir/$1/configure.gnu],
-[echo -e '#!/bin/sh\nexec "`dirname "'\$'0"`/configure" '"$2"' "'\$'@"' > "$srcdir/$1/configure.gnu"
+[printf '#!/bin/sh\nexec "`dirname "'\$'0"`/configure" '"$2"' "'\$'@"\n' > "$srcdir/$1/configure.gnu"
 ])
 ])