Improving test targets in Makefile a bit.
[debian-live-boot/hramrach.git] / manpages / Makefile
blobdef1408c36dbb73553ca8d2660d8987edcc902e7
1 # Makefile
3 SHELL := sh -e
5 LANGUAGES = $(shell cd po && ls)
7 all: build
9 po4a.cfg:
10 echo "[po4a_langs] $(LANGUAGES)" > po4a.cfg
11 echo "[po4a_paths] pot/\$$master.pot \$$lang:po/\$$lang/\$$master.po" >> po4a.cfg
13 for MANPAGE in en/*; \
14 do \
15 SECTION="$$(basename $${MANPAGE} | awk -F. '{ print $$2 }')"; \
16 echo "[type: man] $${MANPAGE} \$$lang:\$$lang/$$(basename $${MANPAGE} .$${SECTION}).\$$lang.$${SECTION}" >> po4a.cfg; \
17 done
19 update:
20 ./bin/update-version.sh
22 build: po4a.cfg
23 @if [ ! -x "$$(which po4a 2>/dev/null)" ]; \
24 then \
25 echo "E: po4a - command not found"; \
26 echo "I: po4a can be optained from:"; \
27 echo "I: http://po4a.alioth.debian.org/"; \
28 echo "I: On Debian systems, po4a can be installed with:"; \
29 echo "I: apt-get install po4a"; \
30 exit 1; \
33 po4a --keep 0 --no-backups --package-name live-boot po4a.cfg
35 clean:
36 rm -f po/*/*.po~
38 distclean: clean
39 rm -f po4a.cfg
40 rm -rf $(LANGUAGES)
42 rebuild: distclean update build