Changeset 4dfeba3 in rtems


Ignore:
Timestamp:
Mar 9, 2018, 3:38:31 PM (14 months ago)
Author:
Amaan Cheval <amaan.cheval@…>
Branches:
master
Children:
2ef85b1
Parents:
16f4661f
git-author:
Amaan Cheval <amaan.cheval@…> (03/09/18 15:38:31)
git-committer:
Joel Sherrill <joel@…> (03/09/18 19:16:01)
Message:

bootstrap: Use printf instead of echo -e for POSIX shells

On POSIX compliant shells, echo does not have the -e option.
This causes the "-e" to be echoed as well, causing potential buggy
build processes.

Example shell session:

-> % sh
$ echo -e "foo bar"
-e foo bar
$

According to POSIX, "\$" should be fine regardless due to the use of
double-quotes[1]. However, since printf is recommended over echo anyway,
we replace "echo -e" with printf where required.

[1] http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_02_03

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bootstrap

    r16f4661f r4dfeba3  
    153153            am_dir=`echo $dir | sed 's%[/-]%_%g'`
    154154            am_dir="_$am_dir"
    155             echo -e "\ninclude${am_dir}dir = \$(includedir)/$dir" >> "$tmp"
     155            printf "\ninclude%sdir = \$(includedir)/$dir\n" "$am_dir" >> "$tmp"
    156156          else
    157157            am_dir=""
     
    162162        echo "include${am_dir}_HEADERS += $inc$j" >> "$tmp"
    163163        if test $j = bsp.h ; then
    164           echo -e "include_HEADERS += include/bspopts.h" >> "$tmp"
     164          echo "include_HEADERS += include/bspopts.h" >> "$tmp"
    165165        fi
    166166      done
Note: See TracChangeset for help on using the changeset viewer.