blob: ee8a47829959c64fb1e78da30a31aa6ba35d50a8 [file] [log] [blame]
Matt Mower18794c82015-11-11 16:22:45 -06001# Makefile
2
3## dosfstools(7)
4## Copyright (C) 2006-2014 Daniel Baumann <mail@daniel-baumann.ch>
5##
6## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
7## This is free software, and you are welcome to redistribute it
8## under certain conditions; see COPYING for details.
9
10
11SHELL := sh -e
12
13LANGUAGES = $(shell cd po && ls)
14
15all: build
16
17po4a.cfg:
18 echo "[po4a_langs] $(LANGUAGES)" > po4a.cfg
19 echo "[po4a_paths] pot/\$$master.pot \$$lang:po/\$$lang/\$$master.po" >> po4a.cfg
20
21 for MANPAGE in en/*; \
22 do \
23 SECTION="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \
24 echo "[type: man] $${MANPAGE} \$$lang:\$$lang/$$(basename $${MANPAGE} .$${SECTION}).\$$lang.$${SECTION}" >> po4a.cfg; \
25 done
26
27update:
28 ./bin/update-version.sh
29
30build: po4a.cfg
31 @if [ ! -x "$$(which po4a 2>/dev/null)" ]; \
32 then \
33 echo "E: po4a - command not found"; \
34 echo "I: po4a can be obtained from:"; \
35 echo "I: http://po4a.alioth.debian.org/"; \
36 echo "I: On Debian based systems, po4a can be installed with:"; \
37 echo "I: apt-get install po4a"; \
38 exit 1; \
39 fi
40
41 po4a --keep 0 --no-backups -o untranslated=MT,ME \
42 --package-name dosfstools po4a.cfg
43
44clean:
45 rm -rf $(LANGUAGES)
46
47distclean: clean
48 rm -f po4a.cfg
49
50rebuild: distclean update build