File: Makefile

package info (click to toggle)
ddtc 0.17.2
  • links: PTS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 252 kB
  • sloc: perl: 2,260; makefile: 90
file content (38 lines) | stat: -rw-r--r-- 762 bytes parent folder | download | duplicates (4)
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
XGETTEXT = xgettext
MSGFMT = msgfmt
MSGMERGE = msgmerge

LOCALEDIR = "usr/share/locale"

.SUFFIXES: .po .mo .pot

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

%.pox: %.po ddtc.pot
	$(MSGMERGE) -o $@ $^

LANG = $(basename $(shell ls *.po))
MO = $(addsuffix .mo,$(LANG))
POX = $(addsuffix .pox,$(LANG))

all: $(MO)
update: $(POX)

ddtc.pot: ../ddtc ../Package.pm ../Common.pm ../Menu.pm
	$(XGETTEXT)\
		--copyright-holder="2001-2003 Nicolas Bertolissio"\
		--msgid-bugs-address="Nicolas Bertolissio <nico.bertol@free.fr>"\
		--keyword=__\
		--output=$@\
		../ddtc ../*.pm

install: $(MO)
	for i in $(MO) ; do \
	  t=$(DESTDIR)/$(LOCALEDIR)/`basename $$i .mo`/LC_MESSAGES ;\
	  install -d $$t ;\
	  install -m 644 $$i $$t/ddtc.mo ;\
	done

clean:
	$(RM) $(MO) *~ ddtc.pot *.pox