[2020-02][System.Native] Handle ReadDir EINTR (#21029)
[mono-project.git] / mcs / class / System / Makefile
blobed30dfc6fcb38d0ec86612586b168a7313373a6a
1 thisdir = class/System
2 SUBDIRS =
3 include ../../build/rules.make
4 export __SECURITY_BOOTSTRAP_DB=$(topdir)/class/lib/$(PROFILE)
6 LIBRARY = System.dll
8 ifneq (2.1, $(FRAMEWORK_VERSION))
9 RESOURCE_FILES = \
10 resources/Asterisk.wav \
11 resources/Beep.wav \
12 resources/Exclamation.wav \
13 resources/Hand.wav \
14 resources/Question.wav
15 endif
17 TEST_RESOURCE_FILES = \
18 Test/System/test-uri-props.txt \
19 Test/System/test-uri-props-manual.txt \
20 Test/System/test-uri-relative-props.txt \
21 Test/compressed.bin
23 XTEST_RESOURCE_FILES = \
24 Test/TestData/testclienteku.contoso.com.pfx \
25 Test/TestData/testnoeku.contoso.com.pfx \
26 Test/TestData/testselfsignedservereku.contoso.com.pfx \
27 Test/TestData/testservereku.contoso.com.pfx
29 USE_XTEST_REMOTE_EXECUTOR = YES
30 XTEST_LIB_REFS = System System.Core Facades/System.Threading.Tasks Facades/System.Runtime.InteropServices.RuntimeInformation System.Net.Http
31 LIB_MCS_FLAGS = -d:COREFX -d:CONFIGURATION_2_0 -d:SYSTEM_NET_PRIMITIVES_DLL -d:XML_DEP -d:SECURITY_DEP $(REFERENCE_SOURCES_FLAGS) -unsafe $(RESOURCE_FILES:%=-resource:%) -nowarn:436
32 XTEST_MCS_FLAGS += $(XTEST_RESOURCE_FILES:%=-resource:%)
34 ifndef NO_MONO_SECURITY
35 MONO_SECURITY := Mono.Security
36 LIB_MCS_FLAGS += -d:MONO_SECURITY_ALIAS
37 LIB_REFS += MonoSecurity=Mono.Security
38 else
39 LIB_MCS_FLAGS += -d:INSIDE_SYSTEM
40 endif
42 ifndef MOBILE_PROFILE
43 LIB_MCS_FLAGS += -d:CODEDOM
44 TEST_LIB_REFS = $(MONO_SECURITY) System.Data System.Xml System.Core System.Configuration
46 ifndef NO_SYSTEM_DRAWING_DEPENDENCY
47 TEST_LIB_REFS += System.Drawing
48 endif
50 else
51 LIB_MCS_FLAGS += -nowarn:618
52 TEST_LIB_REFS = $(MONO_SECURITY) System.Data System.Xml System.Core
53 endif
55 TEST_MCS_FLAGS = -nowarn:618,672,219,67,169,612 \
56 $(foreach r, $(TEST_RESOURCE_FILES), -resource:$(r),$(r))
58 TEST_NUNITLITE_APP_CONFIG_GLOBAL=Test/test-config-file
60 REFERENCE_SOURCES_FLAGS = -d:FEATURE_PAL,SYSTEM_NAMESPACE,MONO,PLATFORM_UNIX
61 ifndef NO_PROCESS_START
62 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_PROCESS_START
63 TEST_MCS_FLAGS += -d:MONO_FEATURE_PROCESS_START
64 endif
66 ifdef MONO_FEATURE_APPLETLS
67 LIB_MCS_FLAGS += -d:MONO_FEATURE_APPLETLS
68 endif
70 ifndef AOT_FRIENDLY_PROFILE
71 LIB_MCS_FLAGS += -d:FEATURE_COMPILED
72 endif
74 ifdef ONLY_APPLETLS
75 LIB_MCS_FLAGS += -d:ONLY_APPLETLS
76 endif
78 ifdef MONO_FEATURE_APPLE_X509
79 LIB_MCS_FLAGS += -d:MONO_FEATURE_APPLE_X509
80 endif
82 ifndef PROFILE_DISABLE_BTLS
83 ifdef HAVE_BTLS
84 LIB_MCS_FLAGS += -d:MONO_FEATURE_BTLS
85 endif
86 endif
88 ifdef ENABLE_GSS
89 ifndef NO_GSS
90 LIB_MCS_FLAGS += -d:ENABLE_GSS
91 endif
92 endif
94 ifndef NO_THREAD_ABORT
95 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_THREAD_ABORT
96 TEST_MCS_FLAGS += -d:MONO_FEATURE_THREAD_ABORT
97 endif
99 ifndef NO_THREAD_SUSPEND_RESUME
100 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_THREAD_SUSPEND_RESUME
101 TEST_MCS_FLAGS += -d:MONO_FEATURE_THREAD_SUSPEND_RESUME
102 endif
104 ifndef NO_MULTIPLE_APPDOMAINS
105 REFERENCE_SOURCES_FLAGS += -d:MONO_FEATURE_MULTIPLE_APPDOMAINS
106 TEST_MCS_FLAGS += -d:MONO_FEATURE_MULTIPLE_APPDOMAINS
107 endif
109 TXT_RESOURCE_STRINGS = ../referencesource/System/System.txt
112 API_BIN_REFS := System.Net.Http System.Xml System.Core System.Numerics
114 ifndef MOBILE_PROFILE
115 API_BIN_REFS += System.Configuration
116 LIB_MCS_FLAGS += -d:CONFIGURATION_DEP
117 endif
119 ifeq (wasm,$(PROFILE))
120 API_BIN_REFS += WebAssembly.Net.WebSockets
121 endif
123 EXTRA_DISTFILES = \
124 Test/test-config-file \
125 Test/System.Security.Cryptography.X509Certificates/pkits/Makefile \
126 Test/System.Security.Cryptography.X509Certificates/pkits/README \
127 Test/System.Security.Cryptography.X509Certificates/pkits/x509build.cs \
128 $(RESOURCE_FILES) \
129 $(TEST_RESOURCE_FILES) \
130 $(XTEST_RESOURCE_FILES)
132 include ../../build/library.make
134 $(test_lib_output): $(TEST_RESOURCE_FILES) $(test_lib_dir)
136 $(xtest_lib_output): $(XTEST_RESOURCE_FILES)
138 # Helper target to run the perl regex test suite
139 regex-check:
140 $(MAKE) check FIXTURE=System.Text.RegularExpressions.PerlTest