3 # The rules for building our class libraries.
5 # The NO_TEST stuff is not too pleasant but whatcha
8 # All the dep files now land in the same directory so we
9 # munge in the library name to keep the files from clashing.
11 sourcefile = $(LIBRARY).sources
12 ifdef PLATFORM_CHANGE_SEPARATOR_CMD
13 response = $(depsdir)/$(PROFILE)_$(LIBRARY).response
15 response = $(sourcefile)
19 LIBRARY_NAME = $(LIBRARY)
22 makefrag = $(depsdir)/$(PROFILE)_$(LIBRARY).makefrag
23 stampfile = $(depsdir)/$(PROFILE)_$(LIBRARY).stamp
24 the_lib = $(topdir)/class/lib/$(PROFILE)/$(LIBRARY_NAME)
25 the_pdb = $(patsubst %.dll,%.pdb,$(the_lib))
28 test_lib = $(patsubst %.dll,%_test.dll,$(LIBRARY))
29 test_pdb = $(patsubst %.dll,%.pdb,$(test_lib))
30 test_sourcefile = $(test_lib).sources
31 test_response = $(depsdir)/$(PROFILE)_$(test_lib).response
32 test_makefrag = $(depsdir)/$(PROFILE)_$(test_lib).makefrag
33 test_stampfile = $(depsdir)/$(PROFILE)_$(test_lib).stamp
34 test_nunitfw = $(topdir)/class/lib/$(PROFILE)/NUnit.Framework.dll
35 test_flags = /r:$(the_lib) /r:$(test_nunitfw) $(TEST_MCS_FLAGS)
38 gacutil = $(topdir)/tools/gacutil/gacutil.exe
42 ifeq ($(PROFILE), net_2_0)
48 install-local: $(the_lib) $(gacutil)
49 $(RUNTIME) $(gacutil) -i $(the_lib) -f /root $(DESTDIR)$(prefix)/lib /package $(PACKAGE) || exit 1 ; \
51 uninstall-local: $(gacutil)
52 $(RUNTIME) $(gacutil) /u $$(basename $(the_lib) .dll) ; \
55 cd $(topdir)/tools/gacutil && $(MAKE) || exit 1 ;
58 -rm -f $(the_lib) $(makefrag) $(test_lib) \
59 $(test_makefrag) $(test_response) \
60 $(stampfile) $(test_stampfile) \
61 $(the_pdb) $(test_pdb) \
63 ifdef PLATFORM_CHANGE_SEPARATOR_CMD
69 (cd ${topdir}/nunit20 && make)
71 test-local: $(test_nunitfw) $(the_lib) $(test_lib)
73 run-test-local: test-local
74 $(TEST_RUNTIME) $(TEST_HARNESS) $(test_lib)
77 test-local: $(the_lib)
82 DISTFILES = $(sourcefile) $(test_sourcefile) $(EXTRA_DISTFILES)
87 TEST_FILES = `cat $(test_sourcefile) |sed -e 's,^\(.\),Test/\1,'`
90 dist-local: dist-default
91 for f in `cat $(sourcefile)` $(TEST_FILES) ; do \
92 dest=`dirname $(distdir)/$$f` ; \
93 $(MKINSTALLDIRS) $$dest && cp $$f $$dest || exit 1 ; \
96 # Fun with dependency tracking
98 $(the_lib): $(makefrag) $(stampfile) $(response)
99 $(CSCOMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) /target:library /out:$@ @$(response)
101 # warning: embedded tab in the 'echo touch' line
102 $(makefrag): $(sourcefile)
103 @echo Creating $@ ...
104 @echo "HAVE_MAKEFRAG = yes" >$@.new
105 @echo "$(stampfile): \\" >>$@.new
106 @cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
107 @cat $@.new |sed -e '$$s, \\$$,,' >$@
108 @echo " touch \$$@" >>$@
111 ifdef PLATFORM_CHANGE_SEPARATOR_CMD
112 $(response): $(sourcefile)
113 @echo Creating $@ ...
114 @cat $< |$(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
124 # for now, don't give any /lib flags or set MONO_PATH, since we
125 # give a full path to the assembly.
128 $(test_lib): $(test_makefrag) $(the_lib) $(test_response) $(test_stampfile)
129 $(CSCOMPILE) /target:library /out:$@ $(test_flags) @$(test_response)
131 $(test_response): $(test_sourcefile)
132 @echo Creating $@ ...
133 ifdef PLATFORM_CHANGE_SEPARATOR_CMD
134 @cat $< |sed -e 's,^\(.\),Test/\1,' |$(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
136 @cat $< |sed -e 's,^\(.\),Test/\1,' >$@
139 # warning: embedded tab in the 'echo touch' line
140 $(test_makefrag): $(test_response)
141 @echo Creating $@ ...
142 @echo "HAVE_TEST_MAKEFRAG = yes" >$@.new
143 @echo "$(test_stampfile): \\" >>$@.new
144 @cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
145 @cat $@.new |sed -e '$$s, \\$$,,' >$@
146 @echo " touch \$$@" >>$@
149 -include $(test_makefrag)
152 ifndef HAVE_TEST_MAKEFRAG