Set LC_ALL=C for Darwin Autotools testing

pull/668/merge
Jeffrey Walton 2018-07-15 09:35:26 -04:00
parent 4e3a1ea962
commit 437b2f9b7d
No known key found for this signature in database
GPG Key ID: B36AB348921B1838
2 changed files with 29 additions and 9 deletions

View File

@ -45,7 +45,7 @@ IS_NEON ?= 0
# Fixup ARM
ifeq ($(IS_ARMv8),1)
IS_ARM := 0
IS_ARM32 := 0
endif
# Can be used by Android and Embeeded cross-compiles. Disable by default because
@ -209,7 +209,7 @@ ifeq ($(findstring lean,$(MAKECMDGOALS)),lean)
endif # Dead code stripping
# Pickup ARMv7 and NEON. Do it after Android, iOS and Embedded flags have been set.
ifeq ($(IS_ARM),1)
ifeq ($(IS_ARM32),1)
IS_ARMv7 := $(shell echo | $(CXX) -x c++ $(CXXFLAGS) -dM -E - 2>/dev/null | $(EGREP) -i -c '__ARM_ARCH 7')
ifeq ($(IS_ARMv7),1)
IS_NEON := 1

View File

@ -1,5 +1,27 @@
#!/usr/bin/env bash
GREP=grep
SED=sed
AWK=awk
MAKE=make
# Fixup, Solaris and friends
if [[ (-d /usr/xpg4/bin) ]]; then
SED=/usr/xpg4/bin/sed
AWK=/usr/xpg4/bin/awk
GREP=/usr/xpg4/bin/grep
elif [[ (-d /usr/bin/posix) ]]; then
SED=/usr/bin/posix/sed
AWK=/usr/bin/posix/awk
GREP=/usr/bin/posix/grep
fi
# Fixup for sed and "illegal byte sequence"
IS_DARWIN=$(uname -s | "$GREP" -i -c darwin)
if [[ "$IS_DARWIN" -ne 0 ]]; then
export LC_ALL=C
fi
# Feth the three required files
if ! wget --no-check-certificate https://raw.githubusercontent.com/noloader/cryptopp-autotools/master/Makefile.am -O Makefile.am; then
echo "Makefile.am download failed"
@ -22,10 +44,10 @@ if [[ ! -z $(command -v dos2unix) ]]; then
fi
# Trim trailing whitespace
if [[ ! -z $(command -v sed) ]]; then
sed -e's/[[:space:]]*$//' Makefile.am > Makefile.am.fixed
sed -e's/[[:space:]]*$//' configure.ac > configure.ac.fixed
sed -e's/[[:space:]]*$//' libcryptopp.pc.in > libcryptopp.pc.in.fixed
if [[ ! -z $(command -v "$SED") ]]; then
"$SED" -e's/[[:space:]]*$//' Makefile.am > Makefile.am.fixed
"$SED" -e's/[[:space:]]*$//' configure.ac > configure.ac.fixed
"$SED" -e's/[[:space:]]*$//' libcryptopp.pc.in > libcryptopp.pc.in.fixed
mv Makefile.am.fixed Makefile.am
mv configure.ac.fixed configure.ac
mv libcryptopp.pc.in.fixed libcryptopp.pc.in
@ -41,7 +63,7 @@ if ! ./configure; then
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
if ! make -j2 -f Makefile; then
if ! "$MAKE" -j2 -f Makefile; then
echo "make failed"
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1
fi
@ -58,5 +80,3 @@ fi
# Return success
[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0