Matt Mower | 18794c8 | 2015-11-11 16:22:45 -0600 | [diff] [blame] | 1 | # 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 | |
| 11 | SHELL := sh -e |
| 12 | |
| 13 | LANGUAGES = $(shell cd po && ls) |
| 14 | |
| 15 | all: build |
| 16 | |
| 17 | po4a.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 | |
| 27 | update: |
| 28 | ./bin/update-version.sh |
| 29 | |
| 30 | build: 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 | |
| 44 | clean: |
| 45 | rm -rf $(LANGUAGES) |
| 46 | |
| 47 | distclean: clean |
| 48 | rm -f po4a.cfg |
| 49 | |
| 50 | rebuild: distclean update build |