source: trunk/third/gnome-desktop/po/Makefile.in.in @ 21376

Revision 21376, 7.3 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21375, which included commits to RCS files with non-trunk default branches.
Line 
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
15GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
16PACKAGE = @PACKAGE@
17VERSION = @VERSION@
18
19SHELL = /bin/sh
20@SET_MAKE@
21
22srcdir = @srcdir@
23top_srcdir = @top_srcdir@
24top_builddir = ..
25VPATH = @srcdir@
26
27prefix = @prefix@
28exec_prefix = @exec_prefix@
29datadir = @datadir@
30libdir = @libdir@
31localedir = $(libdir)/locale
32gnulocaledir = $(datadir)/locale
33gettextsrcdir = $(datadir)/glib-2.0/gettext/po
34subdir = po
35install_sh = @install_sh@
36mkdir_p = @mkdir_p@
37mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
38
39INSTALL = @INSTALL@
40INSTALL_DATA = @INSTALL_DATA@
41
42CC = @CC@
43GENCAT = @GENCAT@
44GMSGFMT = @GMSGFMT@
45MSGFMT = @MSGFMT@
46XGETTEXT = @XGETTEXT@
47INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
48INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
49MSGMERGE = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
50GENPOT   = INTLTOOL_EXTRACT=$(INTLTOOL_EXTRACT) srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
51
52DEFS = @DEFS@
53CFLAGS = @CFLAGS@
54CPPFLAGS = @CPPFLAGS@
55
56INCLUDES = -I.. -I$(top_srcdir)/intl
57
58COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
59
60SOURCES =
61POFILES = @POFILES@
62GMOFILES = @GMOFILES@
63DISTFILES = ChangeLog Makefile.in.in POTFILES.in \
64$(POFILES) $(GMOFILES) $(SOURCES)
65
66POTFILES = \
67
68CATALOGS = @CATALOGS@
69CATOBJEXT = @CATOBJEXT@
70INSTOBJEXT = @INSTOBJEXT@
71
72.SUFFIXES:
73.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
74
75.c.o:
76        $(COMPILE) $<
77
78.po.pox:
79        $(MAKE) $(GETTEXT_PACKAGE).pot
80        $(MSGMERGE) $< $(top_builddir)/po/$(GETTEXT_PACKAGE).pot -o $*pox
81
82.po.mo:
83        $(MSGFMT) -o $@ $<
84
85.po.gmo:
86        file=`echo $* | sed 's,.*/,,'`.gmo \
87          && rm -f $$file && $(GMSGFMT) -o $$file $<
88
89.po.cat:
90        sed -f ../intl/po2msg.sed < $< > $*.msg \
91          && rm -f $@ && $(GENCAT) $@ $*.msg
92
93
94all: all-@USE_NLS@
95
96all-yes: $(CATALOGS)
97all-no:
98
99$(GETTEXT_PACKAGE).pot: $(POTFILES)
100        $(GENPOT)
101
102install: install-exec install-data
103install-exec:
104install-data: install-data-@USE_NLS@
105install-data-no: all
106install-data-yes: all
107        if test -n "$(MKINSTALLDIRS)"; then \
108          $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
109        else \
110          $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
111        fi
112        @catalogs='$(CATALOGS)'; \
113        for cat in $$catalogs; do \
114          cat=`basename $$cat`; \
115          case "$$cat" in \
116            *.gmo) destdir=$(gnulocaledir);; \
117            *)     destdir=$(localedir);; \
118          esac; \
119          lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
120          dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
121          if test -n "$(MKINSTALLDIRS)"; then \
122            $(MKINSTALLDIRS) $$dir; \
123          else \
124            $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
125          fi; \
126          if test -r $$cat; then \
127            $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
128            echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
129          else \
130            $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
131            echo "installing $(srcdir)/$$cat as" \
132                 "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
133          fi; \
134          if test -r $$cat.m; then \
135            $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
136            echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
137          else \
138            if test -r $(srcdir)/$$cat.m ; then \
139              $(INSTALL_DATA) $(srcdir)/$$cat.m \
140                $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
141              echo "installing $(srcdir)/$$cat as" \
142                   "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
143            else \
144              true; \
145            fi; \
146          fi; \
147        done
148        if test "$(PACKAGE)" = "glib"; then \
149          if test -n "$(MKINSTALLDIRS)"; then \
150            $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
151          else \
152            $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
153          fi; \
154          $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
155                          $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
156        else \
157          : ; \
158        fi
159
160# Define this as empty until I found a useful application.
161installcheck:
162
163uninstall:
164        catalogs='$(CATALOGS)'; \
165        for cat in $$catalogs; do \
166          cat=`basename $$cat`; \
167          lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
168          rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
169          rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
170          rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
171          rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
172        done
173        if test "$(PACKAGE)" = "glib"; then \
174          rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
175        fi
176
177check: all
178
179dvi info tags TAGS ID:
180
181mostlyclean:
182        rm -f core core.* *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
183        rm -fr *.o
184        rm -f .intltool-merge-cache
185
186clean: mostlyclean
187
188distclean: clean
189        rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
190
191maintainer-clean: distclean
192        @echo "This command is intended for maintainers to use;"
193        @echo "it deletes files that may require special tools to rebuild."
194        rm -f $(GMOFILES)
195
196distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
197dist distdir: $(DISTFILES) $(GETTEXT_PACKAGE).pot
198        dists="$(DISTFILES)"; \
199        for file in $$dists; do \
200          ln $(srcdir)/$$file $(distdir) 2> /dev/null \
201            || cp -p $(srcdir)/$$file $(distdir); \
202        done
203
204update-po: Makefile
205        $(MAKE) $(GETTEXT_PACKAGE).pot
206        tmpdir=`pwd`; \
207        catalogs='$(CATALOGS)'; \
208        for cat in $$catalogs; do \
209          cat=`basename $$cat`; \
210          lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
211          echo "$$lang:"; \
212          result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
213          if $$result; then \
214            if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
215              rm -f $$tmpdir/$$lang.new.po; \
216            else \
217              if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
218                :; \
219              else \
220                echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
221                rm -f $$tmpdir/$$lang.new.po; \
222                exit 1; \
223              fi; \
224            fi; \
225          else \
226            echo "msgmerge for $$cat failed!"; \
227            rm -f $$tmpdir/$$lang.new.po; \
228          fi; \
229        done
230
231# POTFILES is created from POTFILES.in by stripping comments, empty lines
232# and Intltool tags (enclosed in square brackets), and appending a full
233# relative path to them
234POTFILES: POTFILES.in
235        ( if test 'x$(srcdir)' != 'x.'; then \
236            posrcprefix='$(top_srcdir)/'; \
237          else \
238            posrcprefix="../"; \
239          fi; \
240          rm -f $@-t $@ \
241            && (sed -e '/^#/d'                                          \
242                    -e "s/^\[.*\] +//"                                  \
243                    -e '/^[     ]*$$/d'                                 \
244                    -e "s@.*@   $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
245                | sed -e '$$s/\\$$//') > $@-t \
246            && chmod a-w $@-t \
247            && mv $@-t $@ )
248
249Makefile: Makefile.in.in ../config.status POTFILES
250        cd .. \
251          && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
252               $(SHELL) ./config.status
253
254# Tell versions [3.59,3.63) of GNU make not to export all variables.
255# Otherwise a system limit (for SysV at least) may be exceeded.
256.NOEXPORT:
Note: See TracBrowser for help on using the repository browser.