TARGETS=migratetags all: $(TARGETS) .cpp: g++ -g `pkg-config --cflags sword` $< -o $@ `pkg-config --libs sword` # example usages, Codex Sinaiticus transcription A_DOWNLOAD_BASE=https://github.com/itsee-birmingham/codex-sinaiticus/raw/main/beta-versions_not-for-release A_NT_XML=NT_version193.xml A_FULL_XML=FINAL_TRANSCRIPTION_version193.xml A_NT_TAGGED_XML=$(shell basename $(A_NT_XML) .xml)-tagged.xml A_FULL_TAGGED_XML=$(shell basename $(A_FULL_XML) .xml)-tagged.xml EXAMPLE_TARGETS=$(A_NT_XML) $(A_FULL_XML) $(A_NT_TAGGED_XML) $(A_FULL_TAGGED_XML) $(A_NT_XML): wget $(A_DOWNLOAD_BASE)/$(A_NT_XML) $(A_FULL_XML): wget $(A_DOWNLOAD_BASE)/$(A_FULL_XML) $(A_NT_TAGGED_XML): $(A_NT_XML) $(TARGETS) ./migratetags -v -l -ss NA28 -tei $(A_NT_XML) > $(A_NT_TAGGED_XML) 2> errata-nt.txt $(A_FULL_TAGGED_XML): $(A_FULL_XML) $(TARGETS) ./migratetags -l -ss NA28 -ssot LXX -tei $(A_FULL_XML) > $(A_FULL_TAGGED_XML) 2> errata-full.txt examples: $(EXAMPLE_TARGETS) diff: $(A_FULL_TAGGED_XML) xmllint --format $(A_FULL_XML) > a.xml xmllint --format $(A_FULL_TAGGED_XML) > b.xml diff -Pru a.xml b.xml | more rm a.xml b.xml clean: rm -f $(TARGETS) $(EXAMPLE_TARGETS) errata-nt.txt errata-full.txt