Rework libdyld-generate-version-headers.sh Script

This commit is contained in:
Thomas A 2022-04-22 22:36:44 -07:00
parent e583c7de86
commit 7362ed0dea

View File

@ -1,14 +1,13 @@
#!/bin/bash
set -x
pushd $(dirname "$0") > /dev/null
SCRIPTDIR=$(pwd -P)
popd > /dev/null
export SRCROOT="$(cd ../.. && pwd)"
DARLING_ROOT_DIR="$(cd $SRCROOT/../../.. && pwd)"
export SRCROOT="$SCRIPTDIR/.."
export SDKROOT="$SRCROOT/../../Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
# SRCROOT
export DSTROOT="$SRCROOT/gen"
export DERIVED_FILES_DIR="$SRCROOT/gen/tmp"
export SDKROOT="$DARLING_ROOT_DIR/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk"
# copied and modified from dyld.xcodeproj
${SRCROOT}/bin/expand.rb < "${SRCROOT}/include/mach-o/dyld_priv.h" > "${SRCROOT}/include/mach-o/dyld_priv.h.tmp"
mv "${SRCROOT}/include/mach-o/dyld_priv.h.tmp" "${SRCROOT}/include/mach-o/dyld_priv.h"
${SRCROOT}/build-scripts/libdyld-generate-version-headers.sh
ln -s -f ../../gen/usr/local/include/mach-o/dyld_priv.h --target-directory "$SRCROOT/include/mach-o"