OS X shell is incompatible with echo -n
Built in echo in 'sh' on OS X does not support -n (exclude trailing newline). It's not necessary so just leave it off. Fixes issue 390. Build include guard using 'symbol' so that it is more likely to be unique. Change-Id: I4bc6aa1fc5e02228f71c200214b5ee4a16d56b83
This commit is contained in:
parent
3653fb473a
commit
5f0b303c28
@ -196,8 +196,8 @@ filter() {
|
|||||||
# Helper functions for generating the arch specific RTCD files
|
# Helper functions for generating the arch specific RTCD files
|
||||||
#
|
#
|
||||||
common_top() {
|
common_top() {
|
||||||
local outfile_basename=$(basename ${outfile:-rtcd.h})
|
local outfile_basename=$(basename ${symbol:-rtcd.h})
|
||||||
local include_guard=$(echo -n $outfile_basename | tr '[a-z]' '[A-Z]' | tr -c '[A-Z]' _)
|
local include_guard=$(echo $outfile_basename | tr '[a-z]' '[A-Z]' | tr -c '[A-Z]' _)
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
#ifndef ${include_guard}
|
#ifndef ${include_guard}
|
||||||
#define ${include_guard}
|
#define ${include_guard}
|
||||||
@ -225,7 +225,7 @@ x86() {
|
|||||||
|
|
||||||
# Assign the helper variable for each enabled extension
|
# Assign the helper variable for each enabled extension
|
||||||
for opt in $ALL_ARCHS; do
|
for opt in $ALL_ARCHS; do
|
||||||
local uc=$(echo -n $opt | tr '[a-z]' '[A-Z]')
|
local uc=$(echo $opt | tr '[a-z]' '[A-Z]')
|
||||||
eval "have_${opt}=\"flags & HAS_${uc}\""
|
eval "have_${opt}=\"flags & HAS_${uc}\""
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -253,7 +253,7 @@ arm() {
|
|||||||
|
|
||||||
# Assign the helper variable for each enabled extension
|
# Assign the helper variable for each enabled extension
|
||||||
for opt in $ALL_ARCHS; do
|
for opt in $ALL_ARCHS; do
|
||||||
local uc=$(echo -n $opt | tr '[a-z]' '[A-Z]')
|
local uc=$(echo $opt | tr '[a-z]' '[A-Z]')
|
||||||
eval "have_${opt}=\"flags & HAS_${uc}\""
|
eval "have_${opt}=\"flags & HAS_${uc}\""
|
||||||
done
|
done
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user