source: trunk/third/gtkhtml3/po/Makefile.in.in @ 21116

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