summaryrefslogtreecommitdiff
path: root/sysutils/gkrellm/files/po.Makefile
blob: 90c303604b236b7381634a79f42d2c564fc9efb0 (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
include ../Makefile.inc

PACKAGE?=	gkrellm

ifeq ($(ENABLE_NLS),yes)
FILES_PO:=	$(wildcard *.po)
FILES_MO:=	$(FILES_PO:.po=.mo)
else
FILES_MO=
endif

all: build

build: $(FILES_MO)

install: $(FILES_MO)
	for f in $(FILES_MO); do							\
	$(INSTALL_DIR) $(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES;			\
	$(INSTALL_DATA) $$f $(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES/$(PACKAGE).mo;	\
	done

uninstall:
ifneq ($(FILES_MO),)
	for f in $(FILES_MO) ; do 							\
	rm -f $(INSTALL_PREFIX)$(LOCALEDIR)/`basename $$f .mo`/LC_MESSAGES/$(PACKAGE).mo ; done
endif

clean:
ifneq ($(FILES_MO),)
	$(RM) $(FILES_MO)
endif

%.mo: %.po
	$(MSGFMT) $(MSGFMT_OPT) -o $@ $<

.PHONY: all build install clean uninstall