Import upstream Source
[gamazons.git] / po / Makefile.in
blobcc95ef48c1499be77a561d0fd4cb931fa647ab8a
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 GETTEXT_PACKAGE = gamazons
16 PACKAGE = gamazons
17 VERSION = 0.83rc3
19 SHELL = /bin/sh
22 srcdir = .
23 top_srcdir = ..
26 prefix = /usr/local
27 exec_prefix = ${prefix}
28 datadir = $(prefix)/share
29 localedir = $(datadir)/locale
30 gnulocaledir = $(prefix)/share/locale
31 gettextsrcdir = $(prefix)/share/glib-2.0/gettext/po
32 subdir = po
34 INSTALL = /usr/bin/install -c
35 INSTALL_DATA = ${INSTALL} -m 644
36 MKINSTALLDIRS = $(top_srcdir)/./mkinstalldirs
38 CC = gcc
39 GENCAT = @GENCAT@
40 GMSGFMT = PATH=../src:$$PATH /usr/bin/msgfmt
41 MSGFMT = /usr/bin/msgfmt
42 XGETTEXT = PATH=../src:$$PATH /usr/bin/xgettext
43 MSGMERGE = PATH=../src:$$PATH msgmerge
45 DEFS = -DHAVE_CONFIG_H
46 CFLAGS = -g -O2
47 CPPFLAGS =
49 INCLUDES = -I.. -I$(top_srcdir)/intl
51 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
53 SOURCES =
54 POFILES =
55 GMOFILES =
56 DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \
57 $(POFILES) $(GMOFILES) $(SOURCES)
59 POTFILES = \
61 CATALOGS =
62 CATOBJEXT = .gmo
63 INSTOBJEXT = .mo
65 .SUFFIXES:
66 .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
68 .c.o:
69 $(COMPILE) $<
71 .po.pox:
72 $(MAKE) $(GETTEXT_PACKAGE).pot
73 $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox
75 .po.mo:
76 $(MSGFMT) -o $@ $<
78 .po.gmo:
79 file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
80 && rm -f $$file && $(GMSGFMT) -o $$file $<
82 .po.cat:
83 sed -f ../intl/po2msg.sed < $< > $*.msg \
84 && rm -f $@ && $(GENCAT) $@ $*.msg
87 all: all-yes
89 all-yes: $(CATALOGS)
90 all-no:
92 $(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES)
93 $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \
94 --add-comments --keyword=_ --keyword=N_ \
95 --files-from=$(srcdir)/POTFILES.in \
96 && test ! -f $(GETTEXT_PACKAGE).po \
97 || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \
98 && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot )
100 install: install-exec install-data
101 install-exec:
102 install-data: install-data-yes
103 install-data-no: all
104 install-data-yes: all
105 if test -r "$(MKINSTALLDIRS)"; then \
106 $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
107 else \
108 $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
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 : ; \
158 # Define this as empty until I found a useful application.
159 installcheck:
161 uninstall:
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 rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
173 check: all
175 dvi info tags TAGS ID:
177 mostlyclean:
178 rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
179 rm -fr *.o
181 clean: mostlyclean
183 distclean: clean
184 rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
186 maintainer-clean: distclean
187 @echo "This command is intended for maintainers to use;"
188 @echo "it deletes files that may require special tools to rebuild."
189 rm -f $(GMOFILES)
191 distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir)
192 dist distdir: update-po $(DISTFILES)
193 dists="$(DISTFILES)"; \
194 for file in $$dists; do \
195 ln $(srcdir)/$$file $(distdir) 2> /dev/null \
196 || cp -p $(srcdir)/$$file $(distdir); \
197 done
199 update-po: Makefile
200 $(MAKE) $(GETTEXT_PACKAGE).pot
201 PATH=`pwd`/../src:$$PATH; \
202 cd $(srcdir); \
203 catalogs='$(CATALOGS)'; \
204 for cat in $$catalogs; do \
205 cat=`basename $$cat`; \
206 lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
207 mv $$lang.po $$lang.old.po; \
208 echo "$$lang:"; \
209 if $(MSGMERGE) $$lang.old.po $(GETTEXT_PACKAGE).pot -o $$lang.po; then \
210 rm -f $$lang.old.po; \
211 else \
212 echo "msgmerge for $$cat failed!"; \
213 rm -f $$lang.po; \
214 mv $$lang.old.po $$lang.po; \
215 fi; \
216 done
218 # POTFILES is created from POTFILES.in by stripping comments, empty lines
219 # and Intltool tags (enclosed in square brackets), and appending a full
220 # relative path to them
221 POTFILES: POTFILES.in
222 ( if test 'x$(srcdir)' != 'x.'; then \
223 posrcprefix='$(top_srcdir)/'; \
224 else \
225 posrcprefix="../"; \
226 fi; \
227 rm -f $@-t $@ \
228 && (sed -e '/^#/d' \
229 -e "s/^\[.*\] +//" \
230 -e '/^[ ]*$$/d' \
231 -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
232 | sed -e '$$s/\\$$//') > $@-t \
233 && chmod a-w $@-t \
234 && mv $@-t $@ )
236 Makefile: Makefile.in.in ../config.status POTFILES
237 cd .. \
238 && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
239 $(SHELL) ./config.status
241 # Tell versions [3.59,3.63) of GNU make not to export all variables.
242 # Otherwise a system limit (for SysV at least) may be exceeded.
243 .NOEXPORT: