2006-11-24 20:07:18 +03:00
|
|
|
include config.make
|
2003-07-02 16:13:13 +04:00
|
|
|
|
|
|
|
PROJECTNAME = monocov
|
2003-07-08 21:09:44 +04:00
|
|
|
GUI = gtk
|
2006-11-24 18:29:59 +03:00
|
|
|
LIBS=-r:Mono.Cecil
|
2006-11-27 15:48:17 +03:00
|
|
|
CFLAGS=-O2 -g
|
2003-07-02 16:13:13 +04:00
|
|
|
|
2005-03-29 13:10:19 +04:00
|
|
|
all: monocov.exe libmono-profiler-monocov.so symbols.exe
|
2003-07-02 16:13:13 +04:00
|
|
|
|
|
|
|
ifeq ($(GUI), gtk)
|
|
|
|
GUI_SRCS = \
|
|
|
|
gui/gtk/MonoCov.cs \
|
2003-07-08 21:09:44 +04:00
|
|
|
gui/gtk/CoverageView.cs \
|
|
|
|
gui/gtk/SourceWindow.cs
|
2006-11-27 15:48:17 +03:00
|
|
|
GUI_LIBS = -pkg:gtk-sharp-2.0 -pkg:glade-sharp-2.0 -r:System.Drawing -resource:gui/gtk/monocov.glade,monocov.glade
|
|
|
|
GUI_DEPS=gui/gtk/monocov.glade
|
2003-07-02 16:13:13 +04:00
|
|
|
else
|
|
|
|
GUI_SRCS = \
|
|
|
|
gui/qt/MonoCov.cs \
|
|
|
|
gui/qt/CoverageView.cs \
|
|
|
|
gui/qt/SourceWindow.cs \
|
|
|
|
gui/qt/FilterDialog.cs
|
|
|
|
GUI_LIBS = -r Qt
|
|
|
|
endif
|
|
|
|
|
|
|
|
SRCS = \
|
2006-11-27 15:48:17 +03:00
|
|
|
Constants.cs \
|
2003-07-02 16:13:13 +04:00
|
|
|
CoverageItem.cs \
|
|
|
|
NamespaceCoverageItem.cs \
|
|
|
|
ClassCoverageItem.cs \
|
|
|
|
MethodCoverageItem.cs \
|
|
|
|
CoverageModel.cs \
|
|
|
|
SourceFileCoverageData.cs \
|
|
|
|
XmlExporter.cs \
|
|
|
|
HtmlExporter.cs \
|
2003-07-02 17:04:44 +04:00
|
|
|
MonoCovMain.cs \
|
2003-07-02 16:13:13 +04:00
|
|
|
$(GUI_SRCS)
|
|
|
|
|
2006-11-27 15:48:17 +03:00
|
|
|
monocov.exe: $(SRCS) style.xsl .gui-$(GUI) $(GUI_DEPS)
|
2006-11-24 18:29:59 +03:00
|
|
|
gmcs -debug /target:exe /out:$@ -define:GUI_$(GUI) $(LIBS) -r:Mono.CompilerServices.SymbolWriter -r:Mono.GetOptions $(GUI_LIBS) $(SRCS) -resource:style.xsl,style.xsl -resource:trans.gif,trans.gif
|
2003-07-02 17:04:44 +04:00
|
|
|
|
|
|
|
.gui-gtk:
|
|
|
|
@rm -f .gui-*
|
|
|
|
@touch .gui-gtk
|
|
|
|
|
|
|
|
.gui-qt:
|
|
|
|
@rm -f .gui-*
|
|
|
|
@touch .gui-qt
|
2003-07-02 16:13:13 +04:00
|
|
|
|
|
|
|
symbols.exe: symbols.cs
|
2006-04-03 22:37:11 +04:00
|
|
|
gmcs -debug /target:exe /out:$@ -r:Mono.CompilerServices.SymbolWriter symbols.cs
|
2003-07-02 16:13:13 +04:00
|
|
|
|
|
|
|
nunit-console.exe: nunit-console.cs
|
2006-04-03 22:37:11 +04:00
|
|
|
gmcs -r:nunit.framework -r:nunit.core -r:nunit.util -r:Mono.GetOptions nunit-console.cs
|
2003-07-02 16:13:13 +04:00
|
|
|
|
|
|
|
libmono-profiler-monocov.so: coverage.c
|
2006-12-09 13:16:53 +03:00
|
|
|
$(CC) $(CFLAGS) -DVERSION=\"$(VERSION)\" `pkg-config --cflags mono` --shared -fPIC -o $@ $^
|
2006-11-24 20:07:18 +03:00
|
|
|
|
|
|
|
install: all
|
|
|
|
mkdir -p $(prefix)/lib/monocov
|
2006-11-24 22:09:27 +03:00
|
|
|
mkdir -p $(prefix)/man/man1
|
2006-11-24 20:07:18 +03:00
|
|
|
cp Mono.Cecil.dll $(prefix)/lib/monocov
|
|
|
|
cp monocov.exe $(prefix)/lib/monocov
|
|
|
|
cp monocov $(prefix)/bin
|
2006-11-24 22:09:27 +03:00
|
|
|
cp libmono-profiler-monocov.so $(prefix)/lib/
|
|
|
|
cp monocov.1 $(prefix)/man/man1
|
2003-07-02 16:13:13 +04:00
|
|
|
|
|
|
|
test:
|
2006-04-05 01:14:44 +04:00
|
|
|
gmcs -debug test.cs
|
2003-07-02 17:04:44 +04:00
|
|
|
mono --profile=monocov:outfile=res.cov test.exe
|
2003-07-02 16:13:13 +04:00
|
|
|
|
|
|
|
cortests:
|
2004-04-15 22:27:05 +04:00
|
|
|
MONO_PATH=../mcs/class/corlib mono --profile=monocov:outfile=corlib-tests.cov,+[mscorlib] nunit-console.exe corlib_test.dll
|
2003-07-02 16:13:13 +04:00
|
|
|
|
2004-04-15 22:27:05 +04:00
|
|
|
xml-cortests:
|
2004-05-07 03:35:49 +04:00
|
|
|
mono ./monocov.exe --export-xml=export corlib-tests.cov
|
2003-07-02 16:13:13 +04:00
|
|
|
tar cvzf corlib-tests.tar.gz export
|
|
|
|
|
|
|
|
html-cortests:
|
2004-05-07 03:35:49 +04:00
|
|
|
mono ./monocov.exe --export-html=html-export corlib-tests.cov
|
2003-07-02 16:13:13 +04:00
|
|
|
tar cvzf html-tests.tar.gz html-export
|
|
|
|
|
2004-04-15 22:27:05 +04:00
|
|
|
emittests:
|
|
|
|
MONO_PATH=../mcs/class/corlib/Test mono --profile=monocov:outfile=emittests.cov,+[corlib]System.Reflection.Emit nunit-console.exe corlib_test.dll Reflection.Emit
|
2003-07-02 16:13:13 +04:00
|
|
|
|
|
|
|
hash-test:
|
2004-04-15 22:27:05 +04:00
|
|
|
mono --profile=monocov:+Hashtable hash-table.exe
|
2003-07-02 16:13:13 +04:00
|
|
|
|
|
|
|
test-colorizer.exe: test-colorizer.cs SyntaxHighlighter.cs
|
2006-04-05 01:14:44 +04:00
|
|
|
gmcs -debug /out:$@ $^
|
2003-07-02 16:13:13 +04:00
|
|
|
|
|
|
|
clean:
|
2006-04-04 19:37:46 +04:00
|
|
|
rm -f monocov.exe monocov.exe.mdb symbols.exe symbols.exe.mdb nunit-console.exe libmono-profiler-monocov.so
|
2003-07-02 16:13:13 +04:00
|
|
|
|
2006-11-24 20:07:18 +03:00
|
|
|
distclean:
|
2006-11-30 14:17:13 +03:00
|
|
|
rm -f monocov config.make Constants.cs
|
2006-11-24 20:07:18 +03:00
|
|
|
|
|
|
|
dist:
|
|
|
|
tar -chzf $(PROJECTNAME)-$(VERSION).tar.gz `cat MANIFEST` \
|
|
|
|
&& DIRNAME=$(PROJECTNAME)-$(VERSION) && rm -rf $$DIRNAME \
|
|
|
|
&& mkdir $$DIRNAME && mv $(PROJECTNAME)-$(VERSION).tar.gz $$DIRNAME \
|
|
|
|
&& cd $$DIRNAME && tar -xzf $(PROJECTNAME)-$(VERSION).tar.gz \
|
|
|
|
&& rm $(PROJECTNAME)-$(VERSION).tar.gz && cd - && tar -cvzf $$DIRNAME.tar.gz $$DIRNAME \
|
|
|
|
&& rm -rf $$DIRNAME
|
|
|
|
|
2003-07-02 16:13:13 +04:00
|
|
|
distrib:
|
|
|
|
tar -cvhzf $(PROJECTNAME).tar.gz `cat MANIFEST` && DIRNAME=$(PROJECTNAME)-`date +%d-%b-%y` && rm -rf $$DIRNAME && mkdir $$DIRNAME && mv $(PROJECTNAME).tar.gz $$DIRNAME && cd $$DIRNAME && tar -xzf $(PROJECTNAME).tar.gz && rm $(PROJECTNAME).tar.gz && cd - && tar -cvzf $$DIRNAME.tar.gz $$DIRNAME && rm -rf $$DIRNAME
|