File: Makefile

package info (click to toggle)
fslint 2.26-2
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 700 kB
  • ctags: 163
  • sloc: python: 1,494; sh: 1,086; makefile: 83
file content (43 lines) | stat: -rw-r--r-- 1,069 bytes parent folder | download
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
DATADIR = /usr/share/
LOCALEDIR = $(DATADIR)/locale
DOMAIN = fslint

all: mo

#create pot file
$(DOMAIN).pot: ../fslint.glade ../fslint-gui
	xgettext          -d$(DOMAIN) -LGlade  ../fslint.glade -o $(DOMAIN).pot
	xgettext -k_ -kN_ -d$(DOMAIN) -LPython ../fslint-gui   -o $(DOMAIN).pot -j

#update all po fles
update-po: $(DOMAIN).pot
	for po in *.po; do \
		lingua=`basename $$po .po`; \
		mv $$lingua.po $$lingua.old.po; \
		if msgmerge -N -o $$lingua.po $$lingua.old.po $(DOMAIN).pot; then \
		    rm $$lingua.old.po; \
		else \
		    rm -f $$lingua.po; \
		    mv $$lingua.old.po $$lingua.po; \
		fi \
	done

#create all mo files
mo:
	for po in *.po; do \
		lingua=`basename $$po .po` ; \
		msgfmt -cf -o $$lingua.mo $$po ; \
		mkdir -p locale/$$lingua/LC_MESSAGES/ ; \
		ln -f $$lingua.mo locale/$$lingua/LC_MESSAGES/$(DOMAIN).mo ; \
	done

#install mo files
install: mo
	for mo in *.mo; do \
		lingua=`basename $$mo .mo`; \
		install -D --mode=644 $$lingua.mo $(DESTDIR)/$(LOCALEDIR)/$$lingua/LC_MESSAGES/$(DOMAIN).mo ; \
	done

clean:
	rm -Rf locale
	rm -f *.mo