source: trunk/third/gnome-nettool/po/Makefile.in.in @ 21079

Revision 21079, 6.9 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21078, 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
35
36INSTALL = @INSTALL@
37INSTALL_DATA = @INSTALL_DATA@
38
39CC = @CC@
40GENCAT = @GENCAT@
41GMSGFMT = @GMSGFMT@
42MSGFMT = @MSGFMT@
43XGETTEXT = @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        @mkdir_p@ $(DESTDIR)$(datadir)
105        @catalogs='$(CATALOGS)'; \
106        for cat in $$catalogs; do \
107          cat=`basename $$cat`; \
108          case "$$cat" in \
109            *.gmo) destdir=$(gnulocaledir);; \
110            *)     destdir=$(localedir);; \
111          esac; \
112          lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
113          dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \
114          @mkdir_p@ $$dir; \
115          if test -r $$cat; then \
116            $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
117            echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
118          else \
119            $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
120            echo "installing $(srcdir)/$$cat as" \
121                 "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \
122          fi; \
123          if test -r $$cat.m; then \
124            $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
125            echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
126          else \
127            if test -r $(srcdir)/$$cat.m ; then \
128              $(INSTALL_DATA) $(srcdir)/$$cat.m \
129                $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
130              echo "installing $(srcdir)/$$cat as" \
131                   "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \
132            else \
133              true; \
134            fi; \
135          fi; \
136        done
137        if test "$(PACKAGE)" = "glib"; then \
138          @mkdir_p@ $(DESTDIR)$(gettextsrcdir); \
139          $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
140                          $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
141        else \
142          : ; \
143        fi
144
145# Define this as empty until I found a useful application.
146installcheck:
147
148uninstall:
149        catalogs='$(CATALOGS)'; \
150        for cat in $$catalogs; do \
151          cat=`basename $$cat`; \
152          lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
153          rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
154          rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
155          rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
156          rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
157        done
158        if test "$(PACKAGE)" = "glib"; then \
159          rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
160        fi
161
162check: all
163
164dvi info tags TAGS ID:
165
166mostlyclean:
167        rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
168        rm -fr *.o
169        rm -f .intltool-merge-cache
170
171clean: mostlyclean
172
173distclean: clean
174        rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
175
176maintainer-clean: distclean
177        @echo "This command is intended for maintainers to use;"
178        @echo "it deletes files that may require special tools to rebuild."
179        rm -f $(GMOFILES)
180
181distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
182dist distdir: update-po $(DISTFILES)
183        dists="$(DISTFILES)"; \
184        for file in $$dists; do \
185          ln $(srcdir)/$$file $(distdir) 2> /dev/null \
186            || cp -p $(srcdir)/$$file $(distdir); \
187        done
188
189update-po: Makefile
190        $(MAKE) $(GETTEXT_PACKAGE).pot
191        tmpdir=`pwd`; \
192        cd $(srcdir); \
193        catalogs='$(CATALOGS)'; \
194        for cat in $$catalogs; do \
195          cat=`basename $$cat`; \
196          lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
197          echo "$$lang:"; \
198          if $$tmpdir/$(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist -o $$tmpdir/$$lang.new.po $$lang; then \
199            if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
200              rm -f $$tmpdir/$$lang.new.po; \
201            else \
202              if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
203                :; \
204              else \
205                echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
206                rm -f $$tmpdir/$$lang.new.po; \
207                exit 1; \
208              fi; \
209            fi; \
210          else \
211            echo "msgmerge for $$cat failed!"; \
212            rm -f $$tmpdir/$$lang.new.po; \
213          fi; \
214        done
215
216# POTFILES is created from POTFILES.in by stripping comments, empty lines
217# and Intltool tags (enclosed in square brackets), and appending a full
218# relative path to them
219POTFILES: POTFILES.in
220        ( if test 'x$(srcdir)' != 'x.'; then \
221            posrcprefix='$(top_srcdir)/'; \
222          else \
223            posrcprefix="../"; \
224          fi; \
225          rm -f $@-t $@ \
226            && (sed -e '/^#/d'                                          \
227                    -e "s/^\[.*\] +//"                                  \
228                    -e '/^[     ]*$$/d'                                 \
229                    -e "s@.*@   $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
230                | sed -e '$$s/\\$$//') > $@-t \
231            && chmod a-w $@-t \
232            && mv $@-t $@ )
233
234Makefile: Makefile.in.in ../config.status POTFILES
235        cd .. \
236          && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
237               $(SHELL) ./config.status
238
239# Tell versions [3.59,3.63) of GNU make not to export all variables.
240# Otherwise a system limit (for SysV at least) may be exceeded.
241.NOEXPORT:
Note: See TracBrowser for help on using the repository browser.