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
17 rm -f $(SOURCE).pdf $(SOURCE).xml $(SOURCE).md
18 for LANG in $(LANGS); do \
19 rm -f $(SOURCE).$$LANG.pdf $(SOURCE).$$LANG.xml $(SOURCE).$$LANG.md ;\
22 $(SOURCE).md: $(SOURCE).odt fixup.rb
23 TEMP=`tempfile -p mwcc` && \
24 pandoc -f odt $(SOURCE).odt -t markdown > $$TEMP && \
25 ruby fixup.rb $$TEMP $(SOURCE).md && \
28 pot: po/mwcc.pot po/*/mwcc.po
29 po/mwcc.pot: $(SOURCE).md
30 TEMP=`tempfile -p mwcc` && \
31 po4a-gettextize -f text -m $(SOURCE).md -p $$TEMP -M utf-8 --package-name 'Made with Creative Commons' --package-version $(VERSION) && \
32 echo '# MADE WITH CREATIVE COMMONS' > $@ && \
33 echo '# Copyright (C) 2017 by Creative Commons.' >> $@ && \
34 echo '# This file is published under a Creative Commons Attribution-ShareAlike license (CC BY-SA), version 4.0' >> $@ && \
35 echo '# Authors: Paul Stacey and Sarah Hinchliff Pearson' >> $@ && \
36 tail --lines=+5 $$TEMP >> $@ && \
38 set -e; for LANG in po/*/mwcc.po; do \
40 msgmerge $$LANG po/mwcc.pot -U ; \
43 $(SOURCE).es.md: $(SOURCE).md po/es/mwcc.po
44 po4a-translate -f text -m $(SOURCE).md -p po/es/mwcc.po -l $@ -l $@ -L utf8 -M utf8 -k 20
47 pandoc -s -o $@ $(PANDOCOPTS) $^
53 XMLLINTOPTS = --nonet --noout --xinclude --postvalid
55 xmllint $(XMLLINTOPTS) $^