File: Makefile

package info (click to toggle)
longrun 0.9-21
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 148 kB
  • ctags: 67
  • sloc: ansic: 466; sh: 104; makefile: 64
file content (46 lines) | stat: -rw-r--r-- 926 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
39
40
41
42
43
44
45
46
include ../Makeconfig

POFILES=ja.po sv.po
GMOFILES=ja.gmo sv.gmo

POTFILES=../longrun.c

CATOBJEXT = .gmo
INSTOBJEXT = .mo

.SUFFIXES: .c .o .po .pox .gmo .mo

all: $(GMOFILES)

longrun.pot: ../longrun.c
	xgettext -a -d longrun -k_ -o longrun.pot -s ../longrun.c

.po.pox:
	make longrun.pot
	msgmerge $< longrun.pot -o $*.pox

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

.po.gmo:
	file=`echo $* | sed 's,.*/,,'`.gmo \
	  && rm -f $$file && msgfmt -o $$file $<

install:
	mkdir -p $(DESTDIR)$(LOCALEDIR)

	@catalogs='$(GMOFILES)'; \
	localedir='$(DESTDIR)$(LOCALEDIR)'; \
	for cat in $$catalogs; do \
	  cat=`basename $$cat`; \
	  lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
	  dir=$$localedir/$$lang/LC_MESSAGES; \
	  mkdir -p $$dir; \
	  if test -r $$cat; then \
	    install -m 644 $$cat $$dir/$(PACKAGE)$(INSTOBJEXT) || exit 1; \
	    echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
	  fi \
	done

clean:
	rm -f *.mo *.gmo