Add [Category ("NotWorking")] to failing test.
[mono.git] / mcs / class / System / Makefile
1 thisdir = class/System
2 SUBDIRS =
3 include ../../build/rules.make
4 export __SECURITY_BOOTSTRAP_DB=$(topdir)/class/lib/$(PROFILE)
5
6 LIBRARY = System.dll
7 LIBRARY_USE_INTERMEDIATE_FILE = yes
8
9 ifneq (2.1, $(FRAMEWORK_VERSION))
10 RESOURCE_FILES = \
11         resources/Asterisk.wav  \
12         resources/Beep.wav      \
13         resources/Exclamation.wav       \
14         resources/Hand.wav      \
15         resources/Question.wav
16 endif
17
18 TEST_RESOURCES = \
19         Test/System/test-uri-props.txt \
20         Test/System/test-uri-props-manual.txt \
21         Test/System/test-uri-relative-props.txt
22
23 TEST_MCS_FLAGS = -r:System.Drawing.dll -r:Mono.Security.dll -r:System.Data -r:System.Xml.dll -r:System.Core.dll -nowarn:618,672,219,67,169,612 \
24         $(foreach f, $(TEST_RESOURCES), -resource:$(f),$(notdir $(f)))
25
26 ifneq (1, $(FRAMEWORK_VERSION_MAJOR))
27 LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 -unsafe $(RESOURCE_FILES:%=-resource:%)
28 TEST_MCS_FLAGS += -r:System.Configuration
29 PROFILE_ANY_MOBILE := $(filter monotouch monodroid, $(PROFILE))
30 NOT_SL := $(filter net_2_0 net_4_0 net_4_5 monotouch_runtime monodroid mobile, $(PROFILE))
31 endif
32 ifeq (2.1, $(FRAMEWORK_VERSION))
33 LIB_MCS_FLAGS += -d:INSIDE_SYSTEM
34 ifeq (moonlight_raw, $(PROFILE))
35 LIB_MCS_FLAGS += -d:SECURITY_DEP
36 endif
37 endif
38 ifeq (monotouch, $(PROFILE))
39 LIB_MCS_FLAGS += -d:SECURITY_DEP
40 endif
41
42 EXTRA_DISTFILES = \
43         System.Text.RegularExpressions/notes.txt        \
44         System.ComponentModel.Design/Changelog          \
45         Test/test-config-file                           \
46         Test/test-config-file-net-2.0                   \
47         Test/System.Security.Cryptography.X509Certificates/pkits/ChangeLog      \
48         Test/System.Security.Cryptography.X509Certificates/pkits/Makefile       \
49         Test/System.Security.Cryptography.X509Certificates/pkits/README         \
50         Test/System.Security.Cryptography.X509Certificates/pkits/x509build.cs   \
51         $(RESOURCE_FILES)                               \
52         $(TEST_RESOURCES)
53
54 lib_file := $(wildcard ../lib/$(PROFILE)/System.dll)
55 ifdef lib_file
56 ifdef NOT_SL
57 LIB_MCS_FLAGS += -r:PrebuiltSystem=$(lib_file)
58 endif
59 else
60 USE_BOOT_COMPILE = yes
61 endif
62
63 ifdef USE_BOOT_COMPILE
64 ifndef PROFILE_MCS_HAS_BOOTSTRAP_FALLBACK
65 LIBRARY_COMPILE = $(BOOT_COMPILE)
66 endif
67 endif
68
69 # Because System.dll, Mono.Security.dll System.Xml.dll have a cyclic dependency, we need a two-pass build.
70 # 1st pass - build System.dll without System.Xml.dll or Mono.Security.dll or System.Configuration.dll references
71 # 2nd pass - build System.dll with System.Xml.dll and Mono.Security.dll or System.Configuration.dll references
72
73 CYCLIC_DEPS :=
74 CYCLIC_DEP_FILES :=
75
76 # define cyclic-dep
77 # # Note the '$$' -- those are to be delayed till the eval
78 # CYCLIC_DEPS += $1
79 # ifndef USE_BOOT_COMPILE
80 # FILE_$2 := $$(wildcard ../lib/$(PROFILE)/$1)
81 # endif
82 # ifdef FILE_$2
83 # CYCLIC_DEP_FILES += $$(FILE_$2)
84 # LIB_MCS_FLAGS += -d:$2 -r:$1
85 # endif
86 # endef
87
88 ifneq (2.1, $(FRAMEWORK_VERSION))
89 # $(eval $(call cyclic-dep,System.Xml.dll,XML_DEP))
90 CYCLIC_DEPS += System.Xml.dll
91 ifndef USE_BOOT_COMPILE
92 FILE_XML_DEP := $(wildcard ../lib/$(PROFILE)/System.Xml.dll)
93 endif
94 ifdef FILE_XML_DEP
95 CYCLIC_DEP_FILES += $(FILE_XML_DEP)
96 LIB_MCS_FLAGS += -d:XML_DEP -r:System.Xml.dll
97 endif
98
99 endif
100
101 ifdef NOT_SL
102 # $(eval $(call cyclic-dep,Mono.Security.dll,SECURITY_DEP))
103 CYCLIC_DEPS += Mono.Security.dll
104 ifndef USE_BOOT_COMPILE
105 FILE_SECURITY_DEP := $(wildcard ../lib/$(PROFILE)/Mono.Security.dll)
106 endif
107 ifdef FILE_SECURITY_DEP
108 CYCLIC_DEP_FILES += $(FILE_SECURITY_DEP)
109 LIB_MCS_FLAGS += -d:SECURITY_DEP -r:MonoSecurity=Mono.Security.dll
110 endif
111
112 ifndef PROFILE_ANY_MOBILE
113 # $(eval $(call cyclic-dep,System.Configuration.dll,CONFIGURATION_DEP))
114 CYCLIC_DEPS += System.Configuration.dll
115 ifndef USE_BOOT_COMPILE
116 FILE_CONFIGURATION_DEP := $(wildcard ../lib/$(PROFILE)/System.Configuration.dll)
117 endif
118 ifdef FILE_CONFIGURATION_DEP
119 CYCLIC_DEP_FILES += $(FILE_CONFIGURATION_DEP)
120 LIB_MCS_FLAGS += -d:CONFIGURATION_DEP -r:System.Configuration.dll
121 endif
122 endif
123
124 endif
125
126 MISSING_DEPS := $(filter-out $(notdir $(CYCLIC_DEP_FILES)), $(CYCLIC_DEPS))
127 ifdef MISSING_DEPS
128 NO_SIGN_ASSEMBLY = yes
129 NO_INSTALL = yes
130 all-local: handle-missing-deps
131 .PHONY: handle-missing-deps
132 handle-missing-deps:
133         @echo "** Warning: System.dll built without parts that depend on: $(MISSING_DEPS)"
134         @for f in $(MISSING_DEPS:%=../lib/$(PROFILE)/%); do \
135           test ! -f $$f || { echo "   purging stale $$f"; rm -f $$f; }; done
136 endif
137
138 include ../../build/library.make
139
140 $(build_lib): $(CYCLIC_DEP_FILES)
141
142 $(test_lib): $(test_lib).config $(TEST_RESOURCES)
143
144 ifeq (net_2_0, $(PROFILE))
145 $(test_lib).config: Test/test-config-file-net-2.0
146         cp $< $@
147 else
148 $(test_lib).config: Test/test-config-file
149         cp $< $@
150 endif
151
152 CLEAN_FILES = $(test_lib).config
153
154 # run the PKITS tests only if the data was installed/activated, otherwise ignore them
155 ifeq (net_2_0, $(PROFILE))
156 pkits_files := $(wildcard Test/System.Security.Cryptography.X509Certificates/pkits/hint)
157 ifndef pkits_files
158 TEST_HARNESS_EXCLUDES = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)NotWorking,ValueAdd,CAS,InetAccess,PKITS
159 TEST_HARNESS_EXCLUDES_ONDOTNET = -exclude=$(PLATFORM_TEST_HARNESS_EXCLUDES)NotDotNet,CAS,PKITS
160 endif
161 endif
162
163 # Helper target to run the perl regex test suite
164 regex-check:
165         $(MAKE) check FIXTURE=System.Text.RegularExpressions.PerlTest