1 SOURCE=MadewithCreativeCommonsmostup-to-dateversion
3 # Versioning: I'm using the date on which I got the source document
4 # (2017-06-09), plus an incrementing local part, that *should*
5 # increase every time the generated Markdown is modified.
8 # --top-level-diversion is not available in pandoc in Jessie
9 PANDOCOPTS = --top-level-division=part -t docbook -f markdown+inline_notes
10 PANDOCOPTS = -t docbook -f markdown+inline_notes
12 $(SOURCE).md: $(SOURCE).odt fixup.rb
13 TEMP=`tempfile -p mwcc` && \
14 pandoc -f odt $(SOURCE).odt -t markdown > $$TEMP && \
15 ruby fixup.rb $$TEMP $(SOURCE).md && \
18 pot: po/mwcc.pot po/*/mwcc.po
19 po/mwcc.pot: $(SOURCE).md
20 TEMP=`tempfile -p mwcc` && \
21 po4a-gettextize -f text -m $(SOURCE).md -p $$TEMP -M utf-8 --package-name 'Made with Creative Commons' --package-version $(VERSION) && \
22 echo '# MADE WITH CREATIVE COMMONS' > $@ && \
23 echo '# Copyright (C) 2017 by Creative Commons.' >> $@ && \
24 echo '# This file is published under a Creative Commons Attribution-ShareAlike license (CC BY-SA), version 4.0' >> $@ && \
25 echo '# Authors: Paul Stacey and Sarah Hinchliff Pearson' >> $@ && \
26 tail --lines=+5 $$TEMP >> $@ && \
28 set -e; for LANG in po/*/mwcc.po; do \
30 msgmerge $$LANG po/mwcc.pot -U ; \
33 $(SOURCE).es.md: $(SOURCE).md po/es/mwcc.po
34 po4a-translate -f text -m $(SOURCE).md -p po/es/mwcc.po -l $@ -l $@ -L utf8 -M utf8 -k 20
37 pandoc -s -o $@ $(PANDOCOPTS) $^
43 XMLLINTOPTS = --nonet --noout --xinclude --postvalid
45 xmllint $(XMLLINTOPTS) $^