~ubuntu-branches/ubuntu/utopic/newt/utopic

« back to all changes in this revision

Viewing changes to .pc/endianness.patch/po/Makefile

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-07-01 23:06:29 UTC
  • mfrom: (2.1.23 sid)
  • Revision ID: package-import@ubuntu.com-20130701230629-vn7p5llzt03j09mv
Tags: 0.52.15-2ubuntu1
* Merge with Debian; remaining changes:
  - Fix python-* package descriptions.
  - Install/remove alternatives for the ubuntu palette.
  - Don't install python-newt example files.
  - Install whiptail in /bin instead of /usr/bin.
* Still build with tcl8.5 (8.6 is in universe).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
INSTALL= /usr/bin/install -c
 
2
INSTALL_PROGRAM= ${INSTALL}
 
3
INSTALL_DATA= ${INSTALL} -m 644
 
4
INSTALLNLSDIR=$(datadir)/locale
 
5
 
 
6
MSGMERGE = msgmerge
 
7
 
 
8
NLSPACKAGE = newt
 
9
 
 
10
CATALOGS = $(shell ls *.po)
 
11
FMTCATALOGS = $(patsubst %.po,%.mo,$(CATALOGS))
 
12
 
 
13
POTFILES  = ../dialogboxes.c
 
14
 
 
15
all: $(NLSPACKAGE).pot $(FMTCATALOGS)
 
16
 
 
17
$(NLSPACKAGE).pot: $(POTFILES)
 
18
        xgettext --default-domain=$(NLSPACKAGE) \
 
19
                --add-comments --keyword=_ --keyword=N_ $(POTFILES)
 
20
        if cmp -s $(NLSPACKAGE).po $(NLSPACKAGE).pot; then \
 
21
            rm -f $(NLSPACKAGE).po; \
 
22
        else \
 
23
            mv $(NLSPACKAGE).po $(NLSPACKAGE).pot; \
 
24
        fi
 
25
 
 
26
refresh-po: Makefile
 
27
        catalogs='$(CATALOGS)'; \
 
28
        for cat in $$catalogs; do \
 
29
                lang=`echo $$cat | sed 's/.po//'`; \
 
30
                if $(MSGMERGE) $$lang.po $(NLSPACKAGE).pot > $$lang.pot ; then \
 
31
                        mv -f $$lang.pot $$lang.po ; \
 
32
                        echo "$(MSGMERGE) of $$lang succeeded" ; \
 
33
                else \
 
34
                        echo "$(MSGMERGE) of $$lang failed" ; \
 
35
                        rm -f $$lang.pot ; \
 
36
                fi \
 
37
        done
 
38
 
 
39
update-po: $(NLSPACKAGE).pot Makefile refresh-po
 
40
 
 
41
report:
 
42
        @for cat in $(CATALOGS); do \
 
43
                echo -n "$$cat: "; \
 
44
                msgfmt -v --statistics -o /dev/null $$cat; \
 
45
        done
 
46
 
 
47
clean:
 
48
        rm -f *mo
 
49
 
 
50
distclean: clean
 
51
        rm -f .depend Makefile
 
52
 
 
53
depend:
 
54
 
 
55
install: all
 
56
        mkdir -p $(INSTALLNLSDIR)
 
57
        for n in $(CATALOGS); do \
 
58
            l=`basename $$n .po`; \
 
59
            mo=$$l.mo; \
 
60
            $(INSTALL) -m 755 -d $(INSTALLNLSDIR)/$$l; \
 
61
            $(INSTALL) -m 755 -d $(INSTALLNLSDIR)/$$l/LC_MESSAGES; \
 
62
            if [ -f $$n ]; then \
 
63
                $(INSTALL) -m 644 $$mo $(INSTALLNLSDIR)/$$l/LC_MESSAGES/$(NLSPACKAGE).mo; \
 
64
            fi; \
 
65
        done
 
66
 
 
67
%.mo: %.po
 
68
        msgfmt -v -o $@ $<