source: live-build/trunk/fuentes/manpages/Makefile @ 900

Last change on this file since 900 was 900, checked in by kbut, 4 years ago

add original source

File size: 945 bytes
RevLine 
[900]1# Makefile
2
3SHELL := sh -e
4
5LANGUAGES = $(shell cd po && ls)
6
7all: build
8
9po4a.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 MANPAGE in en/*; \
14        do \
15                SECTION="$$(basename $${MANPAGE} | sed -e 's|\.|\n|g' | tail -n1)"; \
16                echo "[type: man] $${MANPAGE} \$$lang:\$$lang/$$(basename $${MANPAGE} .$${SECTION}).\$$lang.$${SECTION}" >> po4a.cfg; \
17        done
18
19update:
20        ./bin/update-version.sh
21
22build: 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 http://po4a.alioth.debian.org/"; \
27                echo "I: On Debian based systems, po4a can be installed with 'apt-get install po4a'."; \
28                exit 1; \
29        fi
30
31        po4a --keep 0 --no-backups --package-name live-build po4a.cfg
32
33clean:
34        rm -f po/*/*.po~
35
36distclean: clean
37        rm -f po4a.cfg
38        rm -rf $(LANGUAGES)
39
40rebuild: distclean update build
Note: See TracBrowser for help on using the repository browser.