Skip to content

Commit

Permalink
jimtcl: Fix command not found
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-on: https://review.openocd.org/c/openocd/+/8653
Tested-by: jenkins
Reviewed-by: Antonio Borneo <[email protected]>
Reviewed-by: Andreas Fritiofson <[email protected]>
  • Loading branch information
petemoore authored and nattgris committed Dec 22, 2024
1 parent d60e1f6 commit cb3b8af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config_subdir.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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"
])
])

0 comments on commit cb3b8af

Please sign in to comment.