* HttpListenerRequest.cs: Do not store 'method' in upper case, but
[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 (net_2_1, $(PROFILE))
10 RESOURCE_FILES = \
11         resources/Asterisk.wav  \
12         resources/Beep.wav      \
13         resources/Exclamation.wav       \
14         resources/Hand.wav      \
15         resources/Question.wav
16 else
17 RESOURCE_FILES =
18 endif
19
20 # Because System.dll, Mono.Security.dll System.Xml.dll have a cyclic dependency, we need a two-pass build.
21 # 1st pass - build System.dll without System.Xml.dll or Mono.Security.dll or System.Configuration.dll references
22 # 2nd pass - build System.dll with System.Xml.dll and Mono.Security.dll or System.Configuration.dll references
23
24 TEST_RESOURCES = \
25         Test/System/test-uri-props.txt \
26         Test/System/test-uri-props-manual.txt \
27         Test/System/test-uri-relative-props.txt
28
29 TEST_MCS_FLAGS = -r:System.Drawing.dll -r:Mono.Security.dll -nowarn:1595 -nowarn:0618 -nowarn:219 -nowarn:67 -nowarn:169 -nowarn:612 \
30         $(foreach f, $(TEST_RESOURCES), -resource:$(f),$(notdir $(f)))
31
32 XML_DEP := System.Xml.dll
33 XML_DEP_FILE := $(wildcard ../lib/$(PROFILE)/$(XML_DEP))
34 CYCLIC_DEPS := $(XML_DEP)
35 CYCLIC_DEP_FILES := $(XML_DEP_FILE)
36
37 ifeq (2, $(FRAMEWORK_VERSION_MAJOR))
38 # Happens on net_2_0_bootstrap and net_2_0 profiles
39 SECURITY_DEP := Mono.Security.dll
40 SECURITY_DEP_FILE := $(wildcard ../lib/$(PROFILE)/$(SECURITY_DEP))
41 CONFIGURATION_DEP := System.Configuration.dll
42 CONFIGURATION_DEP_FILE := $(wildcard ../lib/$(PROFILE)/$(CONFIGURATION_DEP))
43 PREBUILT_DEP := System.dll
44 PREBUILT_DEP_FILE := $(wildcard ../lib/$(PROFILE)/$(PREBUILT_DEP))
45 CYCLIC_DEPS += $(SECURITY_DEP) $(CONFIGURATION_DEP)
46 CYCLIC_DEP_FILES += $(SECURITY_DEP_FILE) $(CONFIGURATION_DEP_FILE)
47 LIB_MCS_FLAGS = -nowarn:618 -d:CONFIGURATION_2_0 -unsafe $(RESOURCE_FILES:%=-resource:%)
48 TEST_MCS_FLAGS += -r:System.Configuration
49 endif
50
51 EXTRA_DISTFILES = \
52         System.Text.RegularExpressions/notes.txt        \
53         System.ComponentModel.Design/Changelog          \
54         Test/test-config-file                           \
55         Test/System.Security.Cryptography.X509Certificates/pkits/ChangeLog      \
56         Test/System.Security.Cryptography.X509Certificates/pkits/Makefile       \
57         Test/System.Security.Cryptography.X509Certificates/pkits/README         \
58         Test/System.Security.Cryptography.X509Certificates/pkits/x509build.cs   \
59         $(RESOURCE_FILES)                               \
60         $(TEST_RESOURCES)
61
62 lib_file := $(wildcard ../lib/$(PROFILE)/System.dll)
63 ifndef lib_file
64 USE_BOOT_COMPILE = yes
65 endif
66
67 ifeq (net_2_0, $(PROFILE))
68 BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/net_2_0$(PLATFORM_PATH_SEPARATOR)$(topdir)/class/lib/net_2_0_bootstrap$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_GMCS)
69 endif
70
71 ifdef USE_BOOT_COMPILE
72 LIBRARY_COMPILE = $(BOOT_COMPILE)
73 endif
74
75 MISSING_DEPS := $(filter-out $(notdir $(CYCLIC_DEP_FILES)), $(CYCLIC_DEPS))
76 ifdef MISSING_DEPS
77 ifneq (net_2_1, $(PROFILE))
78 NO_SIGN_ASSEMBLY = yes
79 NO_INSTALL = yes
80 all-local: echo-warning
81 .PHONY: echo-warning
82 echo-warning:
83         @echo "** Warning: System.dll built without parts that depend on: $(MISSING_DEPS)"
84 endif
85 endif
86
87 include ../../build/library.make
88
89 ifdef XML_DEP_FILE
90 LIB_MCS_FLAGS += -define:XML_DEP -r:$(XML_DEP)
91 $(the_lib): $(XML_DEP_FILE)
92 endif
93
94 ifdef SECURITY_DEP_FILE
95 LIB_MCS_FLAGS += -define:SECURITY_DEP -r:Mono.Security.dll
96 $(the_lib): $(SECURITY_DEP_FILE)
97 endif
98
99 ifdef CONFIGURATION_DEP_FILE
100 LIB_MCS_FLAGS += -define:CONFIGURATION_DEP -r:$(CONFIGURATION_DEP)
101 $(the_lib): $(CONFIGURATION_DEP_FILE)
102 endif
103
104 ifdef PREBUILT_DEP_FILE
105 LIB_MCS_FLAGS += -r:PrebuiltSystem=$(topdir)/class/lib/$(PROFILE)/System.dll
106 endif
107
108 $(test_lib): $(test_lib).config $(TEST_RESOURCES)
109
110 $(test_lib).config: Test/test-config-file
111         cp $< $@
112
113 CLEAN_FILES = $(test_lib).config
114
115 # run the PKITS tests only if the data was installed/activated, otherwise ignore them
116 ifeq (net_2_0, $(PROFILE))
117 pkits_files := $(wildcard Test/System.Security.Cryptography.X509Certificates/pkits/hint)
118 ifndef pkits_files
119 TEST_HARNESS_EXCLUDES = /exclude:NotWorking,ValueAdd,CAS,InetAccess,PKITS
120 TEST_HARNESS_EXCLUDES_ONDOTNET = /exclude:NotDotNet,CAS,PKITS
121 endif
122 endif