
include common.mk

build:
	-rm -r bin
	-mkdir bin
	find src/ tests/ -name "*.java" | xargs javac -classpath $(CLASSPATH) -nowarn -g -d bin
	mkdir bin/randoop/test/resources
	cp tests/randoop/test/resources/*.txt bin/randoop/test/resources
	cp src/randoop/version.txt bin/randoop/

temp:
	java -classpath $(CLASSPATH) randoop.main.Main gen-inputs-naive --classlist=java.util.classlist.txt --maxsize=20

temp2:
	java -classpath $(CLASSPATH) randoop.main.Main genfailures --classlist=java.util.classlist.txt --maxsize=20

# The tests run correctly under Java 1.6. Using an earlier version of
# Java may result in test failures.
unittests:
	java -classpath $(CLASSPATH) junit.textui.TestRunner randoop.test.AllJoeTests


# Creates the zip file for other people to download.
distribution:
	-rm -r dist
	mkdir dist
	cp -R src/ dist/src/
	cp -R tests/ dist/tests/
	find dist -name "CVS" | xargs rm -r
	mkdir dist/lib
	cp lib/*.jar lib/*.txt dist/lib
	cp Makefile common.mk dist/
	cp license.txt dist/
	cp README.txt dist/
	tar cvfz dist.tgz dist

distribution-exp:
	-rm -r exp
	mkdir exp
	cp systemtests/src.tgz exp/
	cp systemtests/Makefile exp/
	tar cvfz exp.tgz exp

# Updates the web page
webpage:
	java -classpath $(CLASSPATH) randoop.main.Main html-help
	mv randoop_commands.php doc/
	mv randoop_commands_list.php doc/
	cp dist.tgz ~/public_html/randoop/0.1/dist.tgz
	cp -r doc   ~/public_html/randoop/0.1/

tags:
	find src/ tests/ -name "*.java" | xargs etags
