2004-05-27 Sebastien Pouliot <sebastien@ximian.com>
[mono.git] / mcs / class / System / Makefile
1 thisdir = class/System
2 SUBDIRS = 
3 include ../../build/rules.make
4
5 LIBRARY = System.dll
6
7 # Because System.dll and Syste.Xml.dll have cyclic dependency we need two-pass build.
8 # 1st pass - build System.dll without System.Xml.dll reference
9 # 2nd pass - build System.dll with System.Xml.dll reference
10
11 LIB_MCS_FLAGS = /r:$(corlib)
12 TEST_MCS_FLAGS = /nowarn:1595 /nowarn:0618
13
14 CYCLIC_DEP = System.Xml.dll
15
16 EXTRA_DISTFILES = \
17         System.Text.RegularExpressions/notes.txt        \
18         System.ComponentModel.Design/Changelog          \
19         Test/test-config-file
20
21 ifdef SECOND_PASS
22         include ../../build/library.make
23
24 ifdef HAVE_SYSTEM_XML
25
26 LIB_MCS_FLAGS += /define:XML_DEP /r:$(CYCLIC_DEP)
27
28 $(the_lib): ../lib/$(PROFILE)/$(CYCLIC_DEP)
29
30 else
31
32 # First pass:
33 #   1. Build temporary System.dll without depending on System.Xml.dll
34 #   2. Since mcs.exe depends on System.dll, use BOOT_COMPILE to compile System.dll
35 LIBRARY_COMPILE = $(BOOT_COMPILE)
36
37 endif
38
39 else
40
41 test-local: all-local
42
43 all-local install-local test-local run-test-local clean-local: 
44         @set -e; \
45         if test ! -f ../lib/$(PROFILE)/$(CYCLIC_DEP) ; then \
46             echo "Creating temporary $(LIBRARY) without $(CYCLIC_DEP) reference." ; \
47             $(MAKE) SECOND_PASS=yes $@ ; \
48             rm -f '$(depsdir)/$(PROFILE)_$(LIBRARY).stamp'; \
49         else \
50             $(MAKE) SECOND_PASS=yes HAVE_SYSTEM_XML=yes $@ ; \
51         fi
52
53 endif