Add Makefile

Change-Id: I98dd6213595cadc09e66476646b0a9f73f29b6c3
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..13f6e72
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,27 @@
+.DELETE_ON_ERROR:
+
+all: json
+
+./output/corpus.p5.xml: gle2tei.py
+	mkdir -p output
+	python irish2tei.py `find ICC-GA-XML -name "*.xml"`
+
+icc-gle.p5.xml: ./output/GA_corpus.p5.xml
+	cat $< | xmllint - > $@
+
+icc-gle.zip: icc-gle.p5.xml
+	pv $< | tei2korapxml -s -tk - > $@
+
+icc-gle.ud.zip: icc-gle.zip
+	korapxml2conllu $< | pv | /usr/local/kl/bin/udpipe2 -r -m irish-idt-ud-2.10-220711 | conllu2korapxml > $@
+
+
+icc-gle.krill.tar: icc-gle.zip icc-gle.ud.zip
+	 /vol/work/kupietz/KorAP/KorAP-XML-Krill/script/korapxml2krill archive -w -cfg /vol/corpora/ICC/icc-gle.cfg -j 0 --meta ICC -i icc-gle.zip -i icc-gle.ud.zip -o icc-gle.krill
+
+json: icc-gle.krill.tar
+	rm -rf json
+	mkdir -p json
+	tar -C json -xf icc-gle.krill.tar
+	rsync -avz --delete json korap@korap-worker-07:/opt/korap/icc/gle/
+	ssh korap@korap-worker-07 "cd /opt/korap/icc/gle && rm -rf index && mkdir -p index && docker run  -u root --rm -v /opt/korap/icc/gle:/data:z korap/kustvakt Krill-Indexer.jar -c /kustvakt/kustvakt-lite.conf -i /data/json -o /data/index/ && INDEX=./index docker-compose --profile=full -p icc-gle restart"