Mercurial > hg > MauveTestCoverage
changeset 1:17f81193758a
2012-01-05 Pavel Tisnovsky <ptisnovs@redhat.com>
* adding Makefile:
Make sure that ./bin and ./report directories
are created during build.
author | ptisnovs |
---|---|
date | Thu, 05 Jan 2012 16:38:45 +0100 |
parents | 29318fe8d6d0 |
children | 8612fcdfab82 |
files | ChangeLog Makefile |
diffstat | 2 files changed, 18 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Jan 04 11:20:55 2012 +0100 +++ b/ChangeLog Thu Jan 05 16:38:45 2012 +0100 @@ -1,3 +1,9 @@ +2012-01-05 Pavel Tisnovsky <ptisnovs@redhat.com> + + * adding Makefile: + Make sure that ./bin and ./report directories + are created during build. + 2012-01-04 Pavel Tisnovsky <ptisnovs@redhat.com> * adding .classpath:
--- a/Makefile Wed Jan 04 11:20:55 2012 +0100 +++ b/Makefile Thu Jan 05 16:38:45 2012 +0100 @@ -68,14 +68,15 @@ rm -f $(CLASSDIR)/*.class rm -f $(REPORTDIR)/* -build: $(CLASSDIR)/PrintClassList.class \ +build: $(CLASSDIR) \ + $(CLASSDIR)/PrintClassList.class \ $(CLASSDIR)/PrintPublicMethods.class \ $(CLASSDIR)/PrintTestCoverage.class \ $(CLASSDIR)/ReportGenerator.class -api_class_list: $(REPORTDIR)/$(ALL_CLASS_LIST) +api_class_list: $(REPORTDIR) $(REPORTDIR)/$(ALL_CLASS_LIST) -public_method_list: $(CLASS_LIST) +public_method_list: $(REPORTDIR) $(CLASS_LIST) if [ ! -f $(CLASS_LIST) ]; \ then \ echo "Please create file $(CLASS_LIST) containing list of classes to check"; \ @@ -89,7 +90,7 @@ java -cp $(CLASSDIR) PrintPublicMethods $${line} > $(REPORTDIR)/$${line}_api.txt; \ done < $(CLASS_LIST); -tested_method_list: $(TEST_DIRECTORY_FILE) +tested_method_list: $(REPORTDIR) $(TEST_DIRECTORY_FILE) if [ ! -f $(TEST_DIRECTORY_FILE) ]; \ then \ echo "Please create file $(TEST_DIRECTORY_FILE) containing path to test directory"; \ @@ -110,9 +111,15 @@ java -cp $(CLASSDIR) PrintTestCoverage $${line} > $(REPORTDIR)/$${line}_test.txt; \ done < $(CLASS_LIST); +$(CLASSDIR): + mkdir -p $(CLASSDIR) + $(CLASSDIR)/%.class: $(SOURCEPATH)/%.java $(JAVAC) -d $(CLASSDIR) -sourcepath $(SOURCEPATH)/ $< +$(REPORTDIR): + mkdir -p $(REPORTDIR) + # Target to make the file containing list of all API classes $(REPORTDIR)/$(ALL_CLASS_LIST): $(PATH_TO_RT_JAR_FILE) if [ ! -f $(PATH_TO_RT_JAR_FILE) ]; \ @@ -131,7 +138,7 @@ fi $(JAVA) -cp $(CLASSDIR) PrintClassList `cat $(PATH_TO_RT_JAR_FILE)` > $(REPORTDIR)/$(ALL_CLASS_LIST) -gen_report: +gen_report: $(REPORTDIR) cp -u $(SOURCEPATH)/index.html $(REPORTDIR) cp -u $(SOURCEPATH)/style.css $(REPORTDIR) java -cp $(CLASSDIR) ReportGenerator $(REPORTDIR)/$(ALL_CLASS_LIST) $(CLASS_LIST) $(REPORTDIR)