Stop using SDK conditionals to control feature definitions
[WebKit-https.git] / Tools / TestWebKitAPI / Configurations / WebKitTargetConditionals.xcconfig
1 // Copyright (C) 2018 Apple Inc. All rights reserved.
2 //
3 // Redistribution and use in source and binary forms, with or without
4 // modification, are permitted provided that the following conditions
5 // are met:
6 // 1. Redistributions of source code must retain the above copyright
7 //    notice, this list of conditions and the following disclaimer.
8 // 2. Redistributions in binary form must reproduce the above copyright
9 //    notice, this list of conditions and the following disclaimer in the
10 //    documentation and/or other materials provided with the distribution.
11 //
12 // THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
13 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
15 // PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
16 // CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
17 // EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
18 // PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
19 // PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
20 // OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
22 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
24 // Use the following helpers to define build settings whose value depends on the target
25 // macOS version in a succinct and future-proof way.
26 //
27 // Example 1: To give the SMOOTHNESS build setting the value 3 in macOS 10.12 and later and the
28 // value 2 in earlier versions, write:
29 //
30 //     SMOOTHNESS = $(SMOOTHNESS$(WK_MACOS_1012));
31 //     SMOOTHNESS_MACOS_BEFORE_1012 = 2;
32 //     SMOOTHNESS_MACOS_SINCE_1012 = 3;
33 //
34 // Example 2: To define ENABLE_COLOR to ENABLE_COLOR in all platforms except macOS 10.12 and
35 // earlier write:
36 //
37 //     ENABLE_COLOR = ENABLE_COLOR;
38 //     ENABLE_COLOR[sdk=macosx*] = $(ENABLE_COLOR$(WK_MACOS_1013));
39 //     ENABLE_COLOR_MACOS_SINCE_1013 = $(ENABLE_COLOR);
40 //
41 // Example 3: To give EXTRA_PATH one value before macOS 10.12, another value in macOS 10.12 and
42 // macOS 10.13, and a third value in macOS 10.14 and later, write:
43 //
44 //     EXTRA_PATH = $(EXTRA_PATH$(WK_MACOS_1012_1014));
45 //     EXTRA_PATH_MACOS_BEFORE_1012 = "/Library/Application Support/WebKit";
46 //     EXTRA_PATH_MACOS_BEFORE_1014 = /System/Library/CoreServices;
47 //     EXTRA_PATH_MACOS_SINCE_1014 = /System/Library/PrivateFrameworks;
48
49 // macOS
50
51 WK_MACOS_BEFORE_1012 = $(WK_MACOS_BEFORE_1012_$(TARGET_MAC_OS_X_VERSION_MAJOR));
52 WK_MACOS_BEFORE_1012_101100 = YES;
53
54 WK_MACOS_BEFORE_1013 = $(WK_MACOS_BEFORE_1013_$(TARGET_MAC_OS_X_VERSION_MAJOR));
55 WK_MACOS_BEFORE_1013_101100 = YES;
56 WK_MACOS_BEFORE_1013_101200 = YES;
57
58 WK_MACOS_BEFORE_1014 = $(WK_MACOS_BEFORE_1014_$(TARGET_MAC_OS_X_VERSION_MAJOR));
59 WK_MACOS_BEFORE_1014_101100 = YES;
60 WK_MACOS_BEFORE_1014_101200 = YES;
61 WK_MACOS_BEFORE_1014_101300 = YES;
62
63 WK_MACOS_BEFORE_1015 = $(WK_MACOS_BEFORE_1015_$(TARGET_MAC_OS_X_VERSION_MAJOR));
64 WK_MACOS_BEFORE_1015_101100 = YES;
65 WK_MACOS_BEFORE_1015_101200 = YES;
66 WK_MACOS_BEFORE_1015_101300 = YES;
67 WK_MACOS_BEFORE_1015_101400 = YES;
68
69 WK_MACOS_1012 = $(WK_MACOS_1012_$(WK_MACOS_BEFORE_1012));
70 WK_MACOS_1012_ = _MACOS_SINCE_1012;
71 WK_MACOS_1012_YES = _MACOS_BEFORE_1012;
72
73 WK_MACOS_1012_1013 = $(WK_MACOS_1012_1013_$(WK_MACOS_BEFORE_1012));
74 WK_MACOS_1012_1013_ = $(WK_MACOS_1013);
75 WK_MACOS_1012_1013_YES = _MACOS_BEFORE_1012;
76
77 WK_MACOS_1012_1014 = $(WK_MACOS_1012_1014_$(WK_MACOS_BEFORE_1012));
78 WK_MACOS_1012_1014_ = $(WK_MACOS_1014);
79 WK_MACOS_1012_1014_YES = _MACOS_BEFORE_1012;
80
81 WK_MACOS_1012_1015 = $(WK_MACOS_1012_1015_$(WK_MACOS_BEFORE_1012));
82 WK_MACOS_1012_1015_ = $(WK_MACOS_1015);
83 WK_MACOS_1012_1015_YES = _MACOS_BEFORE_1012;
84
85 WK_MACOS_1013 = $(WK_MACOS_1013_$(WK_MACOS_BEFORE_1013));
86 WK_MACOS_1013_ = _MACOS_SINCE_1013;
87 WK_MACOS_1013_YES = _MACOS_BEFORE_1013;
88
89 WK_MACOS_1013_1014 = $(WK_MACOS_1013_1014_$(WK_MACOS_BEFORE_1013));
90 WK_MACOS_1013_1014_ = $(WK_MACOS_1014);
91 WK_MACOS_1013_1014_YES = _MACOS_BEFORE_1013;
92
93 WK_MACOS_1013_1015 = $(WK_MACOS_1013_1015_$(WK_MACOS_BEFORE_1013));
94 WK_MACOS_1013_1015_ = $(WK_MACOS_1015);
95 WK_MACOS_1013_1015_YES = _MACOS_BEFORE_1013;
96
97 WK_MACOS_1014 = $(WK_MACOS_1014_$(WK_MACOS_BEFORE_1014));
98 WK_MACOS_1014_ = _MACOS_SINCE_1014;
99 WK_MACOS_1014_YES = _MACOS_BEFORE_1014;
100
101 WK_MACOS_1014_1015 = $(WK_MACOS_1014_1015_$(WK_MACOS_BEFORE_1014));
102 WK_MACOS_1014_1015_ = $(WK_MACOS_1015);
103 WK_MACOS_1014_1015_YES = _MACOS_BEFORE_1014;
104
105 WK_MACOS_1015 = $(WK_MACOS_1015_$(WK_MACOS_BEFORE_1015));
106 WK_MACOS_1015_ = _MACOS_SINCE_1015;
107 WK_MACOS_1015_YES = _MACOS_BEFORE_1015;
108
109 // iOS
110
111 WK_IOS_BEFORE_12 = $(WK_IOS_BEFORE_12_$(IPHONEOS_DEPLOYMENT_TARGET:base));
112 WK_IOS_BEFORE_12_11 = YES;
113
114 WK_IOS_BEFORE_13 = $(WK_IOS_BEFORE_13_$(IPHONEOS_DEPLOYMENT_TARGET:base));
115 WK_IOS_BEFORE_13_11 = YES;
116 WK_IOS_BEFORE_13_12 = YES;
117
118 WK_IOS_BEFORE_14 = $(WK_IOS_BEFORE_14_$(IPHONEOS_DEPLOYMENT_TARGET:base));
119 WK_IOS_BEFORE_14_11 = YES;
120 WK_IOS_BEFORE_14_12 = YES;
121 WK_IOS_BEFORE_14_13 = YES;
122
123 WK_IOS_12 = $(WK_IOS_12_$(WK_IOS_BEFORE_12));
124 WK_IOS_12_ = _IOS_SINCE_12;
125 WK_IOS_12_YES = _IOS_BEFORE_12;
126
127 WK_IOS_12_13 = $(WK_IOS_12_13_$(WK_IOS_BEFORE_12));
128 WK_IOS_12_13_ = $(WK_IOS_13);
129 WK_IOS_12_13_YES = _IOS_BEFORE_12;
130
131 WK_IOS_12_14 = $(WK_IOS_12_14_$(WK_IOS_BEFORE_12));
132 WK_IOS_12_14_ = $(WK_IOS_14);
133 WK_IOS_12_14_YES = _IOS_BEFORE_12;
134
135 WK_IOS_13 = $(WK_IOS_13_$(WK_IOS_BEFORE_13));
136 WK_IOS_13_ = _IOS_SINCE_13;
137 WK_IOS_13_YES = _IOS_BEFORE_13;
138
139 WK_IOS_13_14 = $(WK_IOS_13_14_$(WK_IOS_BEFORE_13));
140 WK_IOS_13_14_ = $(WK_IOS_14);
141 WK_IOS_13_14_YES = _IOS_BEFORE_13;
142
143 WK_IOS_14 = $(WK_IOS_14_$(WK_IOS_BEFORE_14));
144 WK_IOS_14_ = _IOS_SINCE_14;
145 WK_IOS_14_YES = _IOS_BEFORE_14;