diff options
author | Maxime Hadjinlian <maxime.hadjinlian@gmail.com> | 2015-10-03 23:29:57 +0200 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2015-10-04 00:56:41 +0200 |
commit | 0f75b2635ee564fbbdb9ea631cf39fa8731d6d6c (patch) | |
tree | 03d45236e3fe56c314f47aeb91c4b7f86d176079 /toolchain | |
parent | 60be80914fa263ecc06e907bc6d1249dbc80018a (diff) | |
download | buildroot-0f75b2635ee564fbbdb9ea631cf39fa8731d6d6c.tar.gz buildroot-0f75b2635ee564fbbdb9ea631cf39fa8731d6d6c.zip |
package: Replace 'echo -n' by 'printf'
'echo -n' is not a POSIX construct (no flag support), we shoud use
'printf', especially in init script.
This patch was generated by the following command line:
git grep -l 'echo -n' -- `git ls-files | grep -v 'patch'` | xargs sed -i 's/echo -n/printf/'
Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'toolchain')
-rw-r--r-- | toolchain/helpers.mk | 4 | ||||
-rw-r--r-- | toolchain/toolchain-external/toolchain-external.mk | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/toolchain/helpers.mk b/toolchain/helpers.mk index 85a9407642..a4fa815e36 100644 --- a/toolchain/helpers.mk +++ b/toolchain/helpers.mk @@ -81,7 +81,7 @@ copy_toolchain_lib_root = \ done; \ done; \ \ - echo -n + printf # # Copy the full external toolchain sysroot directory to the staging @@ -150,7 +150,7 @@ copy_toolchain_sysroot = \ fi ; \ mkdir -p `dirname $(STAGING_DIR)/$${ARCH_SUBDIR}` ; \ relpath="./" ; \ - nbslashs=`echo -n $${ARCH_SUBDIR} | sed 's%[^/]%%g' | wc -c` ; \ + nbslashs=`printf $${ARCH_SUBDIR} | sed 's%[^/]%%g' | wc -c` ; \ for slash in `seq 1 $${nbslashs}` ; do \ relpath=$${relpath}"../" ; \ done ; \ diff --git a/toolchain/toolchain-external/toolchain-external.mk b/toolchain/toolchain-external/toolchain-external.mk index 79afdaab3f..342f13e687 100644 --- a/toolchain/toolchain-external/toolchain-external.mk +++ b/toolchain/toolchain-external/toolchain-external.mk @@ -475,13 +475,13 @@ endef # # And variations on these. define toolchain_find_sysroot -$$(echo -n $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a::') +$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:(usr/)?lib(32|64)?([^/]*)?/([^/]*/)?libc\.a::') endef # Returns the lib subdirectory for the given compiler + flags (i.e # typically lib32 or lib64 for some toolchains) define toolchain_find_libdir -$$(echo -n $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?([^/]*)?)/([^/]*/)?libc.a:\2:') +$$(printf $(call toolchain_find_libc_a,$(1)) | sed -r -e 's:.*/(usr/)?(lib(32|64)?([^/]*)?)/([^/]*/)?libc.a:\2:') endef # Checks for an already installed toolchain: check the toolchain |