Changing location of Makefile
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
This commit is contained in:
parent
bd61a0e595
commit
2b7e0d0d42
37
Makefile
Normal file
37
Makefile
Normal file
@ -0,0 +1,37 @@
|
||||
### 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 src/test/resources/output/javac src/test/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 src/main/resources/output/CompilerInput.class src/test/resources/output/miniCompiler
|
||||
|
||||
test-miniCompiler:
|
||||
# move the compiled class to the test/main folder
|
||||
mv src/main/resources/output/CompilerInput.class src/test/java/main/
|
||||
# compile the test class
|
||||
javac src/test/java/main/EndToEndTester.java
|
||||
# run the test class
|
||||
java -cp src/test/java/main EndToEndTester
|
||||
|
||||
clean:
|
||||
# clean main output folders
|
||||
rm -f src/main/resources/output/*.class
|
||||
rm -f src/main/resources/output/*.jar
|
||||
# clean resources output folders
|
||||
rm -f src/test/resources/output/javac/*.class
|
||||
rm -f src/test/resources/output/miniCompiler/*.class
|
||||
rm -f src/test/resources/output/miniCompiler/*.jar
|
||||
# clean logs
|
||||
rm -f src/main/resources/logs/*
|
||||
# clean test/java/main folders from .class files for End-to-End tests
|
||||
rm -f src/test/java/main/*.class
|
||||
# clean javac output from every folder
|
||||
rm -f src/test/resources/input/*/*.class
|
||||
# clean test results from maven surefire plugin
|
||||
rm -f ../../target/surefire-reports/*.txt
|
Loading…
Reference in New Issue
Block a user