#!/usr/bin/make -f

%:
	dh $@

override_dh_auto_build:
	# generate the Rats! parsers first
	java -cp /usr/share/java/rats.jar xtc.parser.Rats \
		-out $(CURDIR)/sweble-wikitext-components-parent/swc-parser-lazy/src/main/java/org/sweble/wikitext/parser/preprocessor/ \
		-in $(CURDIR)/sweble-wikitext-components-parent/swc-parser-lazy/src/main/rats \
		$(CURDIR)/sweble-wikitext-components-parent/swc-parser-lazy/src/main/rats/org/sweble/wikitext/parser/preprocessor/RatsWikitextPreprocessor.rats
	java -cp /usr/share/java/rats.jar xtc.parser.Rats \
		-out $(CURDIR)/sweble-wikitext-components-parent/swc-parser-lazy/src/main/java/org/sweble/wikitext/parser/parser/ \
		-in $(CURDIR)/sweble-wikitext-components-parent/swc-parser-lazy/src/main/rats \
		$(CURDIR)/sweble-wikitext-components-parent/swc-parser-lazy/src/main/rats/org/sweble/wikitext/parser/parser/RatsWikitextParser.rats
	dh_auto_build
