From 26a029d407be480d791972afb5975cf62c9360a6 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 02:47:55 +0200 Subject: Adding upstream version 124.0.1. Signed-off-by: Daniel Baumann --- third_party/python/gyp/test/mac/sdkroot/file.cc | 5 ++++ third_party/python/gyp/test/mac/sdkroot/test.gyp | 35 ++++++++++++++++++++++ .../python/gyp/test/mac/sdkroot/test_shorthand.sh | 20 +++++++++++++ 3 files changed, 60 insertions(+) create mode 100644 third_party/python/gyp/test/mac/sdkroot/file.cc create mode 100644 third_party/python/gyp/test/mac/sdkroot/test.gyp create mode 100755 third_party/python/gyp/test/mac/sdkroot/test_shorthand.sh (limited to 'third_party/python/gyp/test/mac/sdkroot') diff --git a/third_party/python/gyp/test/mac/sdkroot/file.cc b/third_party/python/gyp/test/mac/sdkroot/file.cc new file mode 100644 index 0000000000..13ae971040 --- /dev/null +++ b/third_party/python/gyp/test/mac/sdkroot/file.cc @@ -0,0 +1,5 @@ +#include +using std::map; + +int main() { +} diff --git a/third_party/python/gyp/test/mac/sdkroot/test.gyp b/third_party/python/gyp/test/mac/sdkroot/test.gyp new file mode 100644 index 0000000000..2fc11a0280 --- /dev/null +++ b/third_party/python/gyp/test/mac/sdkroot/test.gyp @@ -0,0 +1,35 @@ +# Copyright (c) 2012 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +{ + 'targets': [ + { + 'target_name': 'mytarget', + 'type': 'executable', + 'sources': [ 'file.cc', ], + 'xcode_settings': { + 'SDKROOT': 'macosx%s', + }, + 'postbuilds': [ + { + 'postbuild_name': 'envtest', + 'action': [ './test_shorthand.sh', ], + }, + ], + }, + { + 'target_name': 'absolute', + 'type': 'executable', + 'sources': [ 'file.cc', ], + 'xcode_settings': { + 'SDKROOT': '<(sdk_path)', + }, + 'postbuilds': [ + { + 'postbuild_name': 'envtest', + 'action': [ './test_shorthand.sh', ], + }, + ], + }, + ], +} diff --git a/third_party/python/gyp/test/mac/sdkroot/test_shorthand.sh b/third_party/python/gyp/test/mac/sdkroot/test_shorthand.sh new file mode 100755 index 0000000000..ac4ac229ae --- /dev/null +++ b/third_party/python/gyp/test/mac/sdkroot/test_shorthand.sh @@ -0,0 +1,20 @@ +#!/bin/bash +# Copyright (c) 2012 Google Inc. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +set -e + +found=false +for sdk in 10.6 10.7 10.8 10.9 ; do + if expected=$(xcodebuild -version -sdk macosx$sdk Path 2>/dev/null) ; then + found=true + break + fi +done +if ! $found ; then + echo >&2 "cannot find installed SDK" + exit 1 +fi + +test $SDKROOT = $expected -- cgit v1.2.3