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)/$(LIBRARY).response
15 response = $(sourcefile)
17 makefrag = $(depsdir)/$(LIBRARY).makefrag
18 stampfile = $(depsdir)/$(LIBRARY).stamp
19 the_lib = $(topdir)/class/lib/$(LIBRARY)
20 the_pdb = $(patsubst %.dll,%.pdb,$(the_lib))
23 test_lib = $(patsubst %.dll,%_test.dll,$(LIBRARY))
24 test_pdb = $(patsubst %.dll,%.pdb,$(test_lib))
25 test_sourcefile = $(test_lib).sources
26 test_response = $(depsdir)/$(test_lib).response
27 test_makefrag = $(depsdir)/$(test_lib).makefrag
28 test_stampfile = $(depsdir)/$(test_lib).stamp
29 test_flags = /r:$(the_lib) /r:$(topdir)/class/lib/NUnit.Framework.dll $(TEST_MCS_FLAGS)
34 install-local: $(the_lib)
35 $(MKINSTALLDIRS) $(DESTDIR)$(prefix)/lib
36 $(INSTALL_LIB) $(the_lib) $(DESTDIR)$(prefix)/lib
39 -rm -f $(DESTDIR)$(prefix)/lib/$(LIBRARY)
42 -rm -f $(the_lib) $(makefrag) $(test_lib) \
43 $(test_makefrag) $(test_response) \
44 $(stampfile) $(test_stampfile) \
45 $(the_pdb) $(test_pdb) \
47 ifdef PLATFORM_CHANGE_SEPARATOR_CMD
52 test-local: $(the_lib) $(test_lib)
55 $(TEST_RUNTIME) $(TEST_HARNESS) $(test_lib)
58 test-local: $(the_lib)
63 DISTFILES = $(sourcefile) $(test_sourcefile) $(EXTRA_DISTFILES)
68 TEST_FILES = `cat $(test_sourcefile) |sed -e 's,^\(.\),Test/\1,'`
71 dist-local: dist-default
72 for f in `cat $(sourcefile)` $(TEST_FILES) ; do \
73 dest=`dirname $(distdir)/$$f` ; \
74 $(MKINSTALLDIRS) $$dest && cp $$f $$dest || exit 1 ; \
77 # Fun with dependency tracking
79 $(the_lib): $(makefrag) $(stampfile) $(response)
80 $(CSCOMPILE) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) /target:library /out:$@ @$(response)
82 # warning: embedded tab in the 'echo touch' line
83 $(makefrag): $(sourcefile)
85 @echo "HAVE_MAKEFRAG = yes" >$@.new
86 @echo "$(stampfile): \\" >>$@.new
87 @cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
88 @cat $@.new |sed -e '$$s, \\$$,,' >$@
89 @echo " touch \$$@" >>$@
92 ifdef PLATFORM_CHANGE_SEPARATOR_CMD
93 $(response): $(sourcefile)
95 @cat $< |$(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
105 # for now, don't give any /lib flags or set MONO_PATH, since we
106 # give a full path to the assembly.
109 $(test_lib): $(test_makefrag) $(the_lib) $(test_response) $(test_stampfile)
110 $(CSCOMPILE) /target:library /out:$@ $(test_flags) @$(test_response)
112 $(test_response): $(test_sourcefile)
113 @echo Creating $@ ...
114 ifdef PLATFORM_CHANGE_SEPARATOR_CMD
115 @cat $< |sed -e 's,^\(.\),Test/\1,' |$(PLATFORM_CHANGE_SEPARATOR_CMD) >$@
117 @cat $< |sed -e 's,^\(.\),Test/\1,' >$@
120 # warning: embedded tab in the 'echo touch' line
121 $(test_makefrag): $(test_response)
122 @echo Creating $@ ...
123 @echo "HAVE_TEST_MAKEFRAG = yes" >$@.new
124 @echo "$(test_stampfile): \\" >>$@.new
125 @cat $< |sed -e 's,\.cs[ \t]*$$,\.cs \\,' >>$@.new
126 @cat $@.new |sed -e '$$s, \\$$,,' >$@
127 @echo " touch \$$@" >>$@
130 -include $(test_makefrag)
133 ifndef HAVE_TEST_MAKEFRAG