~ubuntu-branches/ubuntu/oneiric/compizconfig-settings-manager/oneiric

« back to all changes in this revision

Viewing changes to po/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Michael Vogt
  • Date: 2008-06-18 12:28:25 UTC
  • mfrom: (1.1.19 upstream)
  • Revision ID: james.westby@ubuntu.com-20080618122825-qfoex5ntxvrl4ge6
Tags: 0.7.7+git20080618-0ubuntu1
New git snpashot

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Makefile for program source directory in GNU NLS utilities package.
 
2
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
 
3
#
 
4
# This file file be copied and used freely without restrictions.  It can
 
5
# be used in projects which are not available under the GNU Public License
 
6
# but which still want to provide support for the GNU gettext functionality.
 
7
# Please note that the actual code is *not* freely available.
 
8
#
 
9
# - Modified by Owen Taylor <otaylor@redhat.com> to use GETTEXT_PACKAGE
 
10
#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
 
11
#
 
12
# - Modified by jacob berkman <jacob@ximian.com> to install
 
13
#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
 
14
#
 
15
# - Modified by Rodney Dawes <dobey@novell.com> for use with intltool
 
16
#
 
17
# We have the following line for use by intltoolize:
 
18
# INTLTOOL_MAKEFILE
 
19
 
 
20
GETTEXT_PACKAGE = ccsm
 
21
PACKAGE = compizconfig-settings-manager
 
22
VERSION = 0.1.0
 
23
 
 
24
SHELL = /bin/sh
 
25
 
 
26
srcdir = .
 
27
top_srcdir = ..
 
28
top_builddir = ..
 
29
 
 
30
 
 
31
prefix = /usr/local
 
32
exec_prefix = ${prefix}
 
33
datadir = ${datarootdir}
 
34
datarootdir = ${prefix}/share
 
35
libdir = ${exec_prefix}/lib
 
36
DATADIRNAME = share
 
37
itlocaledir = $(prefix)/$(DATADIRNAME)/locale
 
38
subdir = po
 
39
install_sh = /home/egon/devel/compiz/ccsm/ccsm/install-sh
 
40
# Automake >= 1.8 provides mkdir -p --.
 
41
# Until it can be supposed, use the safe fallback:
 
42
mkdir_p = $(install_sh) -d
 
43
 
 
44
INSTALL = /usr/bin/install -c
 
45
INSTALL_DATA = ${INSTALL} -m 644
 
46
 
 
47
GMSGFMT = /usr/bin/msgfmt
 
48
MSGFMT = /usr/bin/msgfmt
 
49
XGETTEXT = /usr/bin/xgettext
 
50
INTLTOOL_UPDATE = $(top_builddir)/intltool-update
 
51
INTLTOOL_EXTRACT = $(top_builddir)/intltool-extract
 
52
MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
 
53
GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
 
54
 
 
55
ALL_LINGUAS = 
 
56
 
 
57
PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; fi)
 
58
 
 
59
USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS`" -o -n "`echo $$ALINGUAS|grep ' ?$$lang ?'`"; then printf "$$lang "; fi; done; fi)
 
60
 
 
61
USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
 
62
 
 
63
POFILES=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
 
64
 
 
65
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(POFILES)
 
66
EXTRA_DISTFILES = POTFILES.skip Makevars LINGUAS
 
67
 
 
68
POTFILES = \
 
69
        ../ccsm.in
 
70
# This comment gets stripped out
 
71
 
 
72
CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
 
73
 
 
74
.SUFFIXES:
 
75
.SUFFIXES: .po .pox .gmo .mo .msg .cat
 
76
 
 
77
.po.pox:
 
78
        $(MAKE) $(GETTEXT_PACKAGE).pot
 
79
        $(MSGMERGE) $< $(GETTEXT_PACKAGE).pot -o $*.pox
 
80
 
 
81
.po.mo:
 
82
        $(MSGFMT) -o $@ $<
 
83
 
 
84
.po.gmo:
 
85
        file=`echo $* | sed 's,.*/,,'`.gmo \
 
86
          && rm -f $$file && $(GMSGFMT) -o $$file $<
 
87
 
 
88
.po.cat:
 
89
        sed -f ../intl/po2msg.sed < $< > $*.msg \
 
90
          && rm -f $@ && gencat $@ $*.msg
 
91
 
 
92
 
 
93
all: all-yes
 
94
 
 
95
all-yes: $(CATALOGS)
 
96
all-no:
 
97
 
 
98
$(GETTEXT_PACKAGE).pot: $(POTFILES)
 
99
        $(GENPOT)
 
100
 
 
101
install: install-data
 
102
install-data: install-data-yes
 
103
install-data-no: all
 
104
install-data-yes: all
 
105
        $(mkdir_p) $(DESTDIR)$(itlocaledir)
 
106
        linguas="$(USE_LINGUAS)"; \
 
107
        for lang in $$linguas; do \
 
108
          dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
 
109
          $(mkdir_p) $$dir; \
 
110
          if test -r $$lang.gmo; then \
 
111
            $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
 
112
            echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
 
113
          else \
 
114
            $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
 
115
            echo "installing $(srcdir)/$$lang.gmo as" \
 
116
                 "$$dir/$(GETTEXT_PACKAGE).mo"; \
 
117
          fi; \
 
118
          if test -r $$lang.gmo.m; then \
 
119
            $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
 
120
            echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
 
121
          else \
 
122
            if test -r $(srcdir)/$$lang.gmo.m ; then \
 
123
              $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
 
124
                $$dir/$(GETTEXT_PACKAGE).mo.m; \
 
125
              echo "installing $(srcdir)/$$lang.gmo.m as" \
 
126
                   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
 
127
            else \
 
128
              true; \
 
129
            fi; \
 
130
          fi; \
 
131
        done
 
132
 
 
133
# Empty stubs to satisfy archaic automake needs
 
134
dvi info tags TAGS ID:
 
135
 
 
136
# Define this as empty until I found a useful application.
 
137
installcheck:
 
138
 
 
139
uninstall:
 
140
        linguas="$(USE_LINGUAS)"; \
 
141
        for lang in $$linguas; do \
 
142
          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
 
143
          rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
 
144
        done
 
145
 
 
146
check: all $(GETTEXT_PACKAGE).pot
 
147
        rm -f missing notexist
 
148
        srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
 
149
        if [ -r missing -o -r notexist ]; then \
 
150
          exit 1; \
 
151
        fi
 
152
 
 
153
mostlyclean:
 
154
        rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
 
155
        rm -f .intltool-merge-cache
 
156
 
 
157
clean: mostlyclean
 
158
 
 
159
distclean: clean
 
160
        rm -f Makefile Makefile.in POTFILES stamp-it
 
161
        rm -f *.mo *.msg *.cat *.cat.m *.gmo
 
162
 
 
163
maintainer-clean: distclean
 
164
        @echo "This command is intended for maintainers to use;"
 
165
        @echo "it deletes files that may require special tools to rebuild."
 
166
        rm -f Makefile.in.in
 
167
 
 
168
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
 
169
dist distdir: $(DISTFILES)
 
170
        dists="$(DISTFILES)"; \
 
171
        extra_dists="$(EXTRA_DISTFILES)"; \
 
172
        for file in $$extra_dists; do \
 
173
          test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
 
174
        done; \
 
175
        for file in $$dists; do \
 
176
          test -f $$file || file="$(srcdir)/$$file"; \
 
177
          ln $$file $(distdir) 2> /dev/null \
 
178
            || cp -p $$file $(distdir); \
 
179
        done
 
180
 
 
181
update-po: Makefile
 
182
        $(MAKE) $(GETTEXT_PACKAGE).pot
 
183
        tmpdir=`pwd`; \
 
184
        linguas="$(USE_LINGUAS)"; \
 
185
        for lang in $$linguas; do \
 
186
          echo "$$lang:"; \
 
187
          result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
 
188
          if $$result; then \
 
189
            if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
 
190
              rm -f $$tmpdir/$$lang.new.po; \
 
191
            else \
 
192
              if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
 
193
                :; \
 
194
              else \
 
195
                echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
 
196
                rm -f $$tmpdir/$$lang.new.po; \
 
197
                exit 1; \
 
198
              fi; \
 
199
            fi; \
 
200
          else \
 
201
            echo "msgmerge for $$lang.gmo failed!"; \
 
202
            rm -f $$tmpdir/$$lang.new.po; \
 
203
          fi; \
 
204
        done
 
205
 
 
206
Makefile POTFILES: stamp-it
 
207
        @if test ! -f $@; then \
 
208
          rm -f stamp-it; \
 
209
          $(MAKE) stamp-it; \
 
210
        fi
 
211
 
 
212
stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
 
213
        cd $(top_builddir) \
 
214
          && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
 
215
               $(SHELL) ./config.status
 
216
 
 
217
# Tell versions [3.59,3.63) of GNU make not to export all variables.
 
218
# Otherwise a system limit (for SysV at least) may be exceeded.
 
219
.NOEXPORT: