2024-05-31 15:09:04 +00:00
|
|
|
# Makefile
|
|
|
|
### IntelliJs play buttons do not work. Run in "src/test" folder with "make" command to run all
|
2024-06-19 10:49:46 +00:00
|
|
|
### Or run only parts with "make compile-javac", "make clean" etc.
|
2024-05-31 15:09:04 +00:00
|
|
|
|
2024-07-04 14:49:14 +00:00
|
|
|
all: compile-javac compile-miniCompiler
|
2024-05-31 15:09:04 +00:00
|
|
|
|
|
|
|
compile-javac:
|
2024-06-12 09:17:16 +00:00
|
|
|
javac -d .\resources\output\javac .\resources\input\CompilerInput.java
|
2024-05-31 15:09:04 +00:00
|
|
|
|
2024-07-04 14:49:14 +00:00
|
|
|
compile-miniCompiler:
|
2024-06-19 14:32:46 +00:00
|
|
|
cd ../.. ; mvn -DskipTests install
|
2024-07-03 13:21:58 +00:00
|
|
|
cd ../.. ; mvn exec:java -DgenJar=true -DgenClass=true -Dexec.mainClass="main.Main" -Dexec.args="'src/main/resources/input/CompilerInput.java' 'src/main/resources/output'"
|
2024-07-04 14:49:14 +00:00
|
|
|
# cp ../main/resources/output/CompilerInput.class .java/resources/output/miniCompiler
|
2024-06-17 11:42:56 +00:00
|
|
|
|
2024-07-04 14:49:14 +00:00
|
|
|
test-miniCompiler:
|
2024-06-26 09:25:24 +00:00
|
|
|
# move the compiled class to the test/main folder
|
2024-06-25 14:41:04 +00:00
|
|
|
mv ../main/resources/output/CompilerInput.class .java/main/
|
2024-06-26 09:25:24 +00:00
|
|
|
# compile the test class
|
|
|
|
javac .java/main.EndToEndTester.java
|
|
|
|
# run the test class
|
|
|
|
java .java/main.EndToEndTester
|
2024-06-25 14:41:04 +00:00
|
|
|
|
|
|
|
|
2024-06-12 16:01:21 +00:00
|
|
|
|
|
|
|
clean:
|
2024-07-04 13:22:05 +00:00
|
|
|
# clean main output folders
|
2024-06-26 09:25:24 +00:00
|
|
|
rm -f ../main/resources/output/*.class
|
2024-07-03 11:04:33 +00:00
|
|
|
rm -f ../main/resources/output/*.jar
|
2024-07-04 13:22:05 +00:00
|
|
|
# clean resources output folders
|
2024-05-31 15:09:04 +00:00
|
|
|
rm -f ./resources/output/javac/*.class
|
2024-07-04 14:49:14 +00:00
|
|
|
rm -f ./resources/output/miniCompiler/*.class
|
|
|
|
rm -f ./resources/output/miniCompiler/*.jar
|
2024-06-26 09:25:24 +00:00
|
|
|
# clean logs
|
2024-07-04 13:22:05 +00:00
|
|
|
rm -f ../main/resources/logs/*
|
2024-07-02 21:51:06 +00:00
|
|
|
# clean test/java/main folders from .class files for End-to-End tests
|
2024-06-26 09:25:24 +00:00
|
|
|
rm -f ./java/main/*.class
|
2024-07-04 13:22:05 +00:00
|
|
|
# clean javac output from every folder
|
|
|
|
rm -f ./resources/input/*/*.class
|
|
|
|
# clean test results from maven surefire plugin
|
|
|
|
rm -f ../../target/surefire-reports/*.txt
|
2024-05-31 15:09:04 +00:00
|
|
|
|