# Makefile ### IntelliJs play buttons do not work. Run in "src/test" folder with "make" command to run all ### Or run only parts with "make compile-javac", "make clean" etc. all: compile-javac compile-miniCompiler compile-javac: javac -d .\resources\output\javac .\resources\input\CompilerInput.java compile-miniCompiler: cd ../.. ; mvn -DskipTests install cd ../.. ; mvn exec:java -DgenJar=true -DgenClass=true -Dexec.mainClass="main.Main" -Dexec.args="'src/main/resources/input/CompilerInput.java' 'src/main/resources/output'" # cp ../main/resources/output/CompilerInput.class .java/resources/output/miniCompiler test-miniCompiler: # move the compiled class to the test/main folder mv ../main/resources/output/CompilerInput.class .java/main/ # compile the test class javac .java/main.EndToEndTester.java # run the test class java .java/main.EndToEndTester clean: # clean main output folders rm -f ../main/resources/output/*.class rm -f ../main/resources/output/*.jar # clean resources output folders rm -f ./resources/output/javac/*.class rm -f ./resources/output/miniCompiler/*.class rm -f ./resources/output/miniCompiler/*.jar # clean logs rm -f ../main/resources/logs/* # clean test/java/main folders from .class files for End-to-End tests rm -f ./java/main/*.class # clean javac output from every folder rm -f ./resources/input/*/*.class # clean test results from maven surefire plugin rm -f ../../target/surefire-reports/*.txt