--- /dev/null
+SRC = a2cho cho2tex
+TRG = $(HOME)/.local/bin
+
+.PHONY: all install uninstall test clean
+
+all:
+
+# Installation
+
+install: $(SRC)
+ /usr/bin/install -m 755 -t "$(TRG)" $^
+
+uninstall:
+ /usr/bin/rm -f $(addprefix $(TRG)/, $(SRC))
+ /usr/bin/rmdir --ignore-fail-on-non-empty $(TRG)
+
+# Tests
+
+ifdef XDG_RUNTIME_DIR
+ RUN = $(XDG_RUNTIME_DIR)
+else
+ RUN = /tmp
+endif
+
+TXT = $(notdir $(basename $(wildcard tests/*.txt)))
+CHO = $(notdir $(basename $(wildcard tests/*.cho)))
+
+print:
+ echo $(RUN)
+ echo $(TXT)
+ echo $(join $(TXT), $(CHO))
+
+
+test:
+ sts=0; \
+ for f in $(TXT); do \
+ echo a2cho: $$f ; \
+ bash a2cho < tests/$$f.txt > $(RUN)/$$f.cho; \
+ diff tests/$$f.cho $(RUN)/$$f.cho; \
+ sts=$$(( $$sts + $$? )); \
+ done; \
+ exit $$sts
+
+# Cleaning
+
+clean: