5 # System-specific configuration is in system.mk
7 include $(TOPDIR
)/build
/system-inc.mk
14 LXGETTEXT
= lua-xgettext
16 TRANSLATIONS
:= fi cs fr de
17 MO_FILES
:= $(patsubst %,%.mo
, $(TRANSLATIONS
))
18 PO_FILES
:= $(patsubst %,%.po
, $(TRANSLATIONS
))
33 EXTRA_POTFILES_LUA
=..
/build
/mkman.lua
40 LOCALEDIR
:= $(PREFIX
)/share
/locale
43 ######################################
45 include $(TOPDIR
)/build
/rules.mk
47 ######################################
49 potfiles
: potdirs_potfiles
50 (for i in
$(POTDIRS
); do cat
$$i/potfiles_c|sed
"s:\w\+:$$i/&:"; done
) > potfiles_c
51 (for i in
$(POTDIRS
); do cat
$$i/potfiles_lua|sed
"s:\w\+:$$i/&:"; done
; \
52 for i in
$(EXTRA_POTFILES_LUA
); do echo
$$i; done
) > potfiles_lua
55 for i in
$(POTDIRS
); do make
-C
$$i _potfiles
; done
59 $(POTFILE
)_c
: potfiles
60 $(XGETTEXT
) -kTR
-kDUMMY_TR
-o
$@
-f potfiles_c
62 $(POTFILE
)_lua
: potfiles
63 $(LXGETTEXT
) -k TR
-k bdoc
-k submenu
-k menuentry
-o
$@ \
66 $(POTFILE
): $(POTFILE
)_c
$(POTFILE
)_lua
68 # GNU gettext sucks bigtime, and refuses to work on POT
69 # files without encoding set. Therefore we'll just have to
70 # use plain old cat and hope that there aren't dupes.
80 for i in
$(TRANSLATIONS
); do \
81 $(INSTALLDIR
) $(DESTDIR
)$(LOCALEDIR
)/$$i/LC_MESSAGES
; \
82 $(INSTALL
) -m
$(DATA_MODE
) $$i.mo
$(DESTDIR
)$(LOCALEDIR
)/$$i/LC_MESSAGES
/notion.mo
; \
86 $(MSGMERGE
) -U fi.po
$(POTFILE
)
89 $(MSGMERGE
) -U cs.po
$(POTFILE
)
92 $(MSGMERGE
) -U fr.po
$(POTFILE
)
95 $(MSGMERGE
) -U de.po
$(POTFILE
)