~khurshid-alam/system-config-samba/libuser-file-error-fix

« back to all changes in this revision

Viewing changes to po/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2007-09-01 13:47:34 UTC
  • Revision ID: james.westby@ubuntu.com-20070901134734-90lwevshl4gkesvy
Tags: upstream-1.2.50
ImportĀ upstreamĀ versionĀ 1.2.50

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#
 
2
# Makefile for the PO files (translation) catalog
 
3
#
 
4
# $Id: Makefile,v 1.6 2005/05/06 11:58:48 nphilipp Exp $
 
5
 
 
6
TOP      = ../..
 
7
 
 
8
# What is this package?
 
9
NLSPACKAGE      = system-config-samba
 
10
POTFILE         = $(NLSPACKAGE).pot
 
11
INSTALL         = /usr/bin/install -c
 
12
INSTALL_DATA    = $(INSTALL) -m 644
 
13
INSTALL_DIR     = /usr/bin/install -d
 
14
 
 
15
# destination directory
 
16
INSTALL_NLS_DIR = $(DESTDIR)/usr/share/locale
 
17
 
 
18
# PO catalog handling
 
19
MSGMERGE        = msgmerge -v
 
20
XGETTEXT        = xgettext --default-domain=$(NLSPACKAGE) \
 
21
                  --add-comments                  
 
22
MSGFMT          = msgfmt --statistics --verbose
 
23
 
 
24
# What do we need to do
 
25
POFILES         = $(wildcard *.po)
 
26
MOFILES         = $(patsubst %.po,%.mo,$(POFILES))
 
27
PYSRC           = $(wildcard ../src/*.py)
 
28
SRCFILES        = $(PYSRC) system-config-samba.gladestrings ../system-config-samba.desktop.in.h
 
29
 
 
30
#default:: clean
 
31
 
 
32
all::  update-po $(MOFILES)
 
33
 
 
34
$(POTFILE): $(SRCFILES)
 
35
        $(XGETTEXT) --keyword=_ --keyword=N_ $(SRCFILES)
 
36
        @if cmp -s $(NLSPACKAGE).po $(POTFILE); then \
 
37
            rm -f $(NLSPACKAGE).po; \
 
38
        else \
 
39
            mv -f $(NLSPACKAGE).po $(POTFILE); \
 
40
        fi; \
 
41
 
 
42
update-po: Makefile $(POTFILE) refresh-po
 
43
 
 
44
refresh-po: Makefile
 
45
        for cat in $(POFILES); do \
 
46
                lang=`basename $$cat .po`; \
 
47
                if $(MSGMERGE) $$lang.po $(POTFILE) > $$lang.pot ; then \
 
48
                        mv -f $$lang.pot $$lang.po ; \
 
49
                        echo "$(MSGMERGE) of $$lang succeeded" ; \
 
50
                else \
 
51
                        echo "$(MSGMERGE) of $$lang failed" ; \
 
52
                        rm -f $$lang.pot ; \
 
53
                fi \
 
54
        done
 
55
 
 
56
clean:
 
57
        @rm -fv *mo *~ .depend
 
58
 
 
59
install: $(MOFILES)
 
60
        @for n in $(MOFILES); do \
 
61
            l=`basename $$n .mo`; \
 
62
            $(INSTALL_DIR) $(INSTALL_NLS_DIR)/$$l/LC_MESSAGES; \
 
63
            $(INSTALL_DATA) --verbose $$n $(INSTALL_NLS_DIR)/$$l/LC_MESSAGES/$(NLSPACKAGE).mo; \
 
64
        done
 
65
 
 
66
%.mo: %.po
 
67
        $(MSGFMT) -o $@ $<
 
68
 
 
69
.PHONY: missing depend
 
70
 
 
71