3 include ../../build/rules.make
5 real_corlib := $(corlib)
7 # corlib is crazy to build so we skip build/library.make and do stuff
10 # Here, we define a bunch of variables.
12 corlib = $(topdir)/class/lib/corlib.dll
13 testlib = corlib_test.dll
14 cmplib = $(topdir)/class/lib/corlib_cmp.dll
16 sourcefile = corlib.dll.sources
17 response = $(depsdir)/corlib.dll.response
18 makefrag = $(depsdir)/corlib.dll.makefrag
19 stampfile = $(depsdir)/corlib.dll.stamp
20 corlib_flags = /unsafe /nostdlib
22 test_sourcefile = corlib_test.dll.sources
23 test_response = $(depsdir)/$(testlib).response
24 test_makefrag = $(depsdir)/$(testlib).makefrag
25 test_stampfile = $(depsdir)/$(testlib).stamp
26 test_flags = /nowarn:0618 /nowarn:0672 /r:$(corlib) /r:$(topdir)/class/lib/NUnit.Framework.dll
28 cmp_response = $(depsdir)/corlib_cmp.dll.response
29 cmp_makefrag = $(depsdir)/corlib_cmp.dll.makefrag
30 cmp_stampfile = $(depsdir)/corlib_cmp.dll.stamp
31 cmp_flags = /r:$(real_corlib) $(corlib_flags)
35 ifdef PLATFORM_MAKE_CORLIB_CMP
36 build_cmplib = $(cmplib)
41 all-local: $(corlib) $(build_cmplib)
43 # should we install cmplib? sure!
45 install-local: $(corlib) $(build_cmplib)
46 $(MKINSTALLDIRS) $(DESTDIR)$(prefix)/lib
47 $(INSTALL_LIB) $(corlib) $(DESTDIR)$(prefix)/lib
48 ifdef PLATFORM_MAKE_CORLIB_CMP
49 $(INSTALL_LIB) $(cmplib) $(DESTDIR)$(prefix)/lib
53 -rm -f $(corlib) $(cmplib) $(testlib) TestResult.xml \
54 $(response) $(makefrag) $(stampfile) \
55 $(test_response) $(test_makefrag) $(test_stampfile) \
56 $(cmp_response) $(cmp_makefrag) $(cmp_stampfile)
59 test-local: $(corlib) $(testlib)
62 $(TEST_RUNTIME) $(TEST_HARNESS) $(testlib)
64 # OK, that was the easy part. Now we get to the fun bits.
68 DISTFILES = $(sourcefile) $(test_sourcefile) \
69 corlib.dll.win32-excludes corlib_cmp.dll.excludes Test/ms_run_test.sh
71 # see $(topdir)/build/library.make for explanation of what's going on
74 dist-local: dist-default $(test_response)
75 cat $(sourcefile) $(test_response) |xargs -n 20 \
76 $(SHELL) -c 'for f in $$* ; do \
77 dest=`dirname $(distdir)/$$f` ; \
78 $(MKINSTALLDIRS) $$dest && cp $$f $$dest || exit 1 ; \
83 $(corlib): $(makefrag) $(response) $(stampfile)
84 $(CSCOMPILE) $(LIBRARY_FLAGS) $(corlib_flags) /target:library /out:$@ @$(response)
86 $(response): $(sourcefile)
88 ifdef PLATFORM_CHANGE_SEPARATOR_CMD
89 @cat $< |$(PLATFORM_TWEAK_CORLIB_SOURCES) |$(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
91 @cat $< |$(PLATFORM_TWEAK_CORLIB_SOURCES) >$@
94 $(makefrag): $(response)
96 @echo "HAVE_MAKEFRAG = yes" >$@.new
97 @echo "$(stampfile): \\" >>$@.new
98 @cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
99 @cat $@.new |sed -e '$$s, \\$$,,' >$@
100 @echo -e "\ttouch \$$@" >>$@
112 $(cmplib): $(cmp_makefrag) $(cmp_response) $(cmp_stampfile)
113 $(CSCOMPILE) $(LIBRARY_FLAGS) $(cmp_flags) /target:library /out:$@ @$(cmp_response)
115 $(cmp_response): $(response) corlib_cmp.dll.excludes
116 @echo Creating $@ ...
117 ifdef PLATFORM_CHANGE_SEPARATOR_CMD
118 @cat corlib_cmp.dll.excludes |$(PLATFORM_CHANGE_SEPARATOR_CMD) |cat - $< |sort |uniq -u >$@
120 @cat corlib_cmp.dll.excludes |cat - $< |sort |uniq -u >$@
123 $(cmp_makefrag): $(cmp_response)
124 @echo Creating $@ ...
125 @echo "HAVE_CMP_MAKEFRAG = yes" >$@.new
126 @echo "$(cmp_stampfile): \\" >>$@.new
127 @cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
128 @cat $@.new |sed -e '$$s, \\$$,,' >$@
129 @echo -e "\ttouch \$$@" >>$@
132 -include $(cmp_makefrag)
134 ifndef HAVE_CMP_MAKEFRAG
141 $(testlib): $(test_makefrag) $(test_response) $(test_stampfile)
142 $(CSCOMPILE) $(test_flags) /target:library /out:$@ @$(test_response)
144 $(test_response): $(test_sourcefile)
145 @echo Creating $@ ...
146 ifdef PLATFORM_CHANGE_SEPARATOR_CMD
147 @cat $< |sed -e 's,^\(.\),Test/\1,' |$(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
149 @cat $< |sed -e 's,^\(.\),Test/\1,' >$@
152 $(test_makefrag): $(test_response)
153 @echo Creating $@ ...
154 @echo "HAVE_TEST_MAKEFRAG = yes" >$@.new
155 @echo "$(test_stampfile): \\" >>$@.new
156 @cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
157 @cat $@.new |sed -e '$$s, \\$$,,' >$@
158 @echo -e "\ttouch \$$@" >>$@
161 -include $(test_makefrag)
163 ifndef HAVE_TEST_MAKEFRAG