source: trunk/third/gnome-system-monitor/po/Makefile.in.in @ 18394

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