File: Makefile

package info (click to toggle)
spellcast 1.0-21
  • links: PTS
  • area: non-free
  • in suites: etch, etch-m68k, jessie, jessie-kfreebsd, lenny, squeeze, wheezy
  • size: 768 kB
  • ctags: 834
  • sloc: ansic: 7,660; makefile: 128; sh: 11
file content (31 lines) | stat: -rw-r--r-- 749 bytes parent folder | download | duplicates (3)
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
INSTALL= /usr/bin/install -c
INSTALL_CMD= ${INSTALL} -m 644
INSTALLDIR=${DESTDIR}/usr/share/locale
PACKAGE = spellcast

CATALOGS = es.mo 

POTFILES= ../*.c ../*.h

all: $(PACKAGE).pot $(CATALOGS)

$(PACKAGE).pot: $(POTFILES)
	xgettext --default-domain=$(PACKAGE) --add-comments --keyword=_ --keyword=S_ $(POTFILES)
	if cmp -s $(PACKAGE).po $(PACKAGE).pot; then \
	rm -f $(PACKAGE).po; \
	else \
	mv $(PACKAGE).po $(PACKAGE).pot; \
	fi

clean:
	rm -f *mo $(PACKAGE).pot *~

install: $(CATALOGS)
	for n in $(CATALOGS); do \
	l=`basename $$n .mo`; \
	$(INSTALL) -m 755 -d $(INSTALLDIR)/$$l; \
	$(INSTALL) -m 755 -d $(INSTALLDIR)/$$l/LC_MESSAGES; \
	$(INSTALL) -m 644 $$n $(INSTALLDIR)/$$l/LC_MESSAGES/$(PACKAGE).mo; \
	done
%.mo: %.po
	msgfmt -o $@ $<