TARGET = 2ndQPG.pdf

SRC = overview.md txnrollback.md jdbctxnrollback.md compat.md \
	  replication.md operation.md parameters.md libraries.md

$(TARGET): cache/header.md $(SRC)
	sed -e '$$s/$$/\n/' -s $^ | gpp $(GPPDEF) -T > cache/2ndQPG.md
	2ndq-pandoc cache/2ndQPG.md --filter=tools/single-pdf.py --listings
	cp cache/2ndQPG.pdf $@

cache/header.md: $(IMG)
	bash tools/make-header.sh >$@

clean:
	rm -f cache/* $(TARGET)

distprep all: $(TARGET)

.PHONY: all $(SUBDIRS)
