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