ff0d6cfcbed699ecb5281e6a32bc277770985501
[live-manual.git] / manual / Makefile
1 # Makefile
2
3 SHELL := sh -e
4
5 LANGUAGES = $(shell cd po && ls)
6
7 all: build
8
9 po4a.cfg:
10 echo "[po4a_langs] $(LANGUAGES)" > po4a.cfg
11 echo "[po4a_paths] pot/\$$master.pot \$$lang:po/\$$lang/\$$master.po" >> po4a.cfg
12
13 for FILE in en/*.ssm en/*.ssi; \
14 do \
15 echo "[type: text] $${FILE} \$$lang:\$$lang/$$(basename $${FILE})" >> po4a.cfg; \
16 done
17
18 echo "[type: xhtml] en/index.html.in \$$lang:\$$lang/index.html.in" >> po4a.cfg
19
20 update:
21 @./bin/update-version.sh
22
23 build: po4a.cfg
24 @if [ ! -x "$$(which po4a 2>/dev/null)" ]; \
25 then \
26 echo "E: po4a - command not found"; \
27 echo "I: po4a can be optained from http://po4a.alioth.debian.org/"; \
28 echo "I: On Debian systems, po4a can be installed with 'apt-get install po4a'."; \
29 exit 1; \
30 fi
31
32 po4a --keep 0 --no-backups --package-name live-manual po4a.cfg
33
34 for LANGUAGE in $(LANGUAGES); \
35 do \
36 cp -a en/_sisu $${LANGUAGE}; \
37 done
38
39 clean:
40 rm -f po/*/*.po~
41
42 distclean: clean
43 rm -f po4a.cfg
44 rm -rf $(LANGUAGES)
45
46 rebuild: distclean update build