Skip to content

Commit 7984a2b

Browse files
mbendiksenfaithfracture
authored andcommitted
Fixed universal build to allow for build directories that contain spaces. (#30)
* Update boost.sh * Update changelog
1 parent 75d039b commit 7984a2b

File tree

2 files changed

+17
-12
lines changed

2 files changed

+17
-12
lines changed

boost.sh

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -826,7 +826,7 @@ scrunchAllLibsTogetherInOneLibPerPlatform()
826826

827827
echo "Archiving $NAME"
828828

829-
# The obj/$NAME/*.o below should all be quotet, but I couldn't figure out how to do that elegantly.
829+
# The obj/$NAME/*.o below should all be quoted, but I couldn't figure out how to do that elegantly.
830830
# Boost lib names probably won't contain non-word characters any time soon, though. ;) - Jan
831831

832832
if [[ -n $BUILD_IOS ]]; then
@@ -863,46 +863,48 @@ buildUniversal()
863863
if [[ -n $BUILD_IOS ]]; then
864864
mkdir -p "$IOS_BUILD_DIR/universal"
865865

866+
cd "$IOS_BUILD_DIR"
866867
for NAME in $BOOTSTRAP_LIBS; do
867868
if [ "$NAME" == "test" ]; then
868869
NAME="unit_test_framework"
869870
fi
870871

871872
ARCH_FILES=""
872873
for ARCH in ${IOS_ARCHS[@]}; do
873-
ARCH_FILES+=" $IOS_BUILD_DIR/$ARCH/libboost_$NAME.a"
874+
ARCH_FILES+=" $ARCH/libboost_$NAME.a"
874875
done
875876
# Ideally IOS_ARCHS contains i386 and x86_64 and simulator build steps are not treated out of band
876-
if [ -f $IOS_BUILD_DIR/i386/libboost_$NAME.a ]; then
877-
ARCH_FILES+=" $IOS_BUILD_DIR/i386/libboost_$NAME.a"
877+
if [ -f "i386/libboost_$NAME.a" ]; then
878+
ARCH_FILES+=" i386/libboost_$NAME.a"
878879
fi
879-
if [ -f $IOS_BUILD_DIR/x86_64/libboost_$NAME.a ]; then
880-
ARCH_FILES+=" $IOS_BUILD_DIR/x86_64/libboost_$NAME.a"
880+
if [ -f "x86_64/libboost_$NAME.a" ]; then
881+
ARCH_FILES+=" x86_64/libboost_$NAME.a"
881882
fi
882883
if [[ ${ARCH_FILES[@]} ]]; then
883884
echo "... $NAME"
884-
$IOS_ARM_DEV_CMD lipo -create $ARCH_FILES -o "$IOS_BUILD_DIR/universal/libboost_$NAME.a" || abort "Lipo $1 failed"
885+
$IOS_ARM_DEV_CMD lipo -create $ARCH_FILES -o "universal/libboost_$NAME.a" || abort "Lipo $1 failed"
885886
fi
886887
done
887888
fi
888889
if [[ -n $BUILD_TVOS ]]; then
889890
mkdir -p "$TVOS_BUILD_DIR/universal"
890891

892+
cd "$TVOS_BUILD_DIR"
891893
for NAME in $BOOTSTRAP_LIBS; do
892894
if [ "$NAME" == "test" ]; then
893895
NAME="unit_test_framework"
894896
fi
895897

896898
ARCH_FILES=""
897-
if [ -f $TVOS_BUILD_DIR/arm64/libboost_$NAME.a ]; then
898-
ARCH_FILES+=" $TVOS_BUILD_DIR/arm64/libboost_$NAME.a"
899+
if [ -f "arm64/libboost_$NAME.a" ]; then
900+
ARCH_FILES+=" arm64/libboost_$NAME.a"
899901
fi
900-
if [ -f $TVOS_BUILD_DIR/x86_64/libboost_$NAME.a ]; then
901-
ARCH_FILES+=" $TVOS_BUILD_DIR/x86_64/libboost_$NAME.a"
902+
if [ -f "x86_64/libboost_$NAME.a" ]; then
903+
ARCH_FILES+=" x86_64/libboost_$NAME.a"
902904
fi
903905
if [[ ${ARCH_FILES[@]} ]]; then
904906
echo "... $NAME"
905-
$TVOS_ARM_DEV_CMD lipo -create $ARCH_FILES -o "$TVOS_BUILD_DIR/universal/libboost_$NAME.a" || abort "Lipo $1 failed"
907+
$TVOS_ARM_DEV_CMD lipo -create $ARCH_FILES -o "universal/libboost_$NAME.a" || abort "Lipo $1 failed"
906908
fi
907909
done
908910
fi

changelog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
-- 2018-08-15 --
2+
* Fixed universal build to allow for build directories that contain spaces
3+
14
-- 2018-08-14 --
25
* Fixed I'm stupid and forgot how line contiuations work in Bash...
36

0 commit comments

Comments
 (0)