summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2026-11-05 20:41:25 +0100
committerJoel Klinghed <the_jk@spawned.biz>2026-11-05 20:41:25 +0100
commitaefb3dbf687b46775bca1b600317bc053648b211 (patch)
treefc20afdc03ee7cd60bb7fa7bae438fcad033fa5a /Makefile
parenta22e0810f6473ff9063166f75b7e4e0236324b6b (diff)
First steps for overrides
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile26
1 files changed, 26 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..7f4f548
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,26 @@
+.PHONY: all clean compileStubs
+
+all: dist/kotlin-proxy-compiler-stubs.jar
+
+clean:
+ rm -f dist/kotlin-proxy-compiler-stubs.jar
+ rm -rf stubs/classes_min/*
+
+stubs/classes_min/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.class: tools/gen_class.py jars/scan.txt jars/defs.txt jars/fallback.txt
+ python3 tools/gen_class.py \
+ --scan-jars jars/scan.txt \
+ --def-jars jars/defs.txt \
+ --fallback-jars jars/fallback.txt \
+ --seed-only --no-closure \
+ --seed 'org/jetbrains/kotlin/cli/jvm/K2JVMCompiler,org/jetbrains/kotlin/cli/jvm/K2JVMCompiler$Companion,org/jetbrains/kotlin/cli/jvm/K2JVMCompilerKt' \
+ --out stubs/classes_min
+
+DEFS = $(shell grep -v '^[[:space:]]*#' jars/defs.txt | tr '\n' ':')
+
+compileStubs: stubs/classes_min/org/jetbrains/kotlin/cli/jvm/K2JVMCompiler.class jars/defs.txt stubs/src/kotlin/proxy/*.java
+ javac -nowarn -proc:none -d stubs/classes_min \
+ -cp "$(DEFS)" \
+ stubs/src/kotlin/proxy/*.java
+
+dist/kotlin-proxy-compiler-stubs.jar: compileStubs
+ jar cf $@ -C stubs/classes_min .