OSDN Git Service

Update translations: chroot, csplit, dd, du, pwd
[linuxjm/coreutils.git] / help2man.ja / Makefile
1 PACKAGE_STRING = GNU coreutils
2 srcdir = ../source
3 DEST = ../draft/man1
4
5 FILES = $(wildcard *.x)
6 MANPAGES = $(patsubst %.x,%.1,$(FILES))
7
8 LANG = ja_JP.UTF-8
9 HELP2MAN = /usr/bin/help2man
10 LN_S = ln -s
11 INSTALL = install
12 AM_V_GEN = @echo "  GEN     " $@;
13
14 .SUFFIXES: .x .1
15
16 # Ensure that help2man runs the ../src/ginstall binary as
17 # 'install' when creating install.1.
18 # Similarly, ensure that it uses the ../src/[ binary to create test.1.
19 t = $*.td
20 mapped_name = `echo $*|sed 's/^install$$/ginstall/; s/^test$$/[/'`
21
22 all:    build-man
23
24 build-man:      $(MANPAGES)
25
26 install:        build-man
27         $(INSTALL) --mode=644 $(MANPAGES) $(DEST)
28
29 clean:
30         $(RM) $(MANPAGES)
31
32 $(MANPAGES):    $(srcdir)/locale/ja/LC_MESSAGES/coreutils.mo
33
34 .x.1:
35         $(AM_V_GEN)rm -f $@ $@-t                        \
36         && {                                            \
37              rm -rf $t;                                 \
38              mkdir $t;                                  \
39              sed -e '/^\.\\\"O/d' ./$*.x > $t/$*.x;     \
40              (cd $t && $(LN_S) ../$(srcdir)/src/$(mapped_name) $*); \
41              $(HELP2MAN)                                \
42                 --locale=$(LANG)                        \
43                 --source='$(PACKAGE_STRING)'            \
44                 --include=$t/$*.x                       \
45                 --output=$t/$@ $t/$*;                   \
46         }                                               \
47         && sed 's|$*\.td/||g' $t/$@ > $@-t              \
48         && rm -rf $t                                    \
49         && chmod -w $@-t                                \
50         && mv $@-t $@