From 3ef227b4188a9c1cc6988eea0daa25c7f1531986 Mon Sep 17 00:00:00 2001 From: Wolfgang Thaller Date: Sun, 23 Apr 2017 11:32:57 +0200 Subject: [PATCH] compatibility for old MacOS (find doesn't support -lname option) --- build-toolchain.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build-toolchain.sh b/build-toolchain.sh index 0572fa831b..91dd6b2c6d 100755 --- a/build-toolchain.sh +++ b/build-toolchain.sh @@ -388,8 +388,11 @@ sh "$SRC/prepare-rincludes.sh" "$RINCLUDES" "toolchain/RIncludes" # and link files from toolchain/CIncludes function linkheaders() { - find "$1" -lname "../../CIncludes/*" -delete - (cd "$1" && find "../../CIncludes/" -exec ln -s {} . \;) + # the following command doesn't work on older Mac OS X versions. + # allow it to fail quietly, at worst we leave some dangling symlinks around + # in the rare situation that headers are removed from the input directory + find "$1" -lname "../../CIncludes/*" -delete || true + (cd "$1" && find "../../CIncludes/" -name '*.h' -exec ln -s {} . \;) } echo "Creating Symlinks for CIncludes and RIncludes..."