summaryrefslogtreecommitdiff
path: root/po/makefile.mingw
blob: 21f4069010ae295a8b6b38bf74d9113891f2324f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
## Makefile for compiling message catalogs on Win32 with cygwin
##
## Use: make -f makefile.mingw install
##
## To convert the clear-text message catalogs to binary form (.gmo)
## files you will need msgfmt, from GNU gettext.

# This file is included from other po directories, too.
# They should define their own PACKAGE and possibly INSTALLSUBDIR
# and LOCALEDIR macros

ifndef PACKAGE
PACKAGE = gtk20
endif
ifndef INSTALLSUBDIR
INSTALLSUBDIR = $(PACKAGE)
endif
ifndef LOCALEDIR
# This is what I use as installation target, from where the installer-builder
# will pick it up. The end-user installation location will be asked by
# the installer (typically %WinDir%\gtk+).
LOCALEDIR = /install/$(INSTALLSUBDIR)/locale
endif

LANGUAGES = $(subst .po,,$(wildcard *.po))

################################################################

all : $(addsuffix .gmo,$(LANGUAGES))

install : all
	mkdir -p $(addsuffix /LC_MESSAGES,$(addprefix $(LOCALEDIR)/,$(LANGUAGES)))
	for l in $(LANGUAGES); do cp $$l.gmo $(LOCALEDIR)/$$l/LC_MESSAGES/$(PACKAGE).mo; done

.SUFFIXES: .po .gmo

.po.gmo:
	msgfmt -o $@ $<

clean:
	-rm *.gmo