This commit was manufactured by cvs2svn to create branch 'uc'.
[gnokii.git] / po / Makefile.in.in
1 #
2 #
3 #  Makefile for gnokii I18n, 
4 #             based on the Makefile.in.in that comes with gettext
5 #
6 #  Erwin Dieterich, 20. 1. 1998 Erwin.Dieterich.ED@Bayer-AG.de
7 #
8 #
9 #
10 # Makefile for program source directory in GNU NLS utilities package.
11 # Copyright (C) 1995, 1996 Free Software Foundation, Inc.
12 #
13 # This program is free software; you can redistribute it and/or modify
14 # it under the terms of the GNU General Public License as published by
15 # the Free Software Foundation; either version 2, or (at your option)
16 # any later version.
17 #
18 # This program is distributed in the hope that it will be useful,
19 # but WITHOUT ANY WARRANTY; without even the implied warranty of
20 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21 # GNU General Public License for more details.
22 #
23 # You should have received a copy of the GNU General Public License
24 # along with this program; if not, write to the Free Software
25 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
27 PACKAGE = @PACKAGE@
28 VERSION = @VERSION@
29
30 SHELL = @SHELL@
31 @SET_MAKE@
32
33 srcdir = @srcdir@
34 top_srcdir = @top_srcdir@
35 VPATH = @srcdir@
36
37 prefix = @prefix@
38 exec_prefix = @exec_prefix@
39 datadir = $(prefix)/@DATADIRNAME@
40 localedir = @LOCALEDIR@
41 gnulocaledir = @LOCALEDIR@
42 subdir = po
43
44 INSTALL = @INSTALL@
45 #INSTALL_DATA = @INSTALL_DATA@
46 INSTALL_DATA = @INSTALL@ -m 644
47
48 CC = @CC@
49 GMSGFMT = @GMSGFMT@
50 MSGFMT = @MSGFMT@
51 XGETTEXT = @XGETTEXT@
52 MSGMERGE = @MSGMERGE@
53
54 DEFS = @DEFS@
55 CFLAGS = @CFLAGS@
56 CPPFLAGS = @CPPFLAGS@
57
58 INCLUDES = -I.. 
59
60 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
61
62 DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot
63
64 POTFILES = \
65
66 CATALOGS = @CATALOGS@
67 CATOBJEXT = @CATOBJEXT@
68 INSTOBJEXT = @INSTOBJEXT@
69
70 .SUFFIXES:
71 .SUFFIXES: .c .o .po .pox .gmo .mo .msg 
72
73 .c.o:
74         $(COMPILE) $<
75
76 .po.pox:
77         $(MAKE) $(PACKAGE).pot
78         $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
79
80 .po.mo:
81         $(MSGFMT) -o $@ $<
82
83 .po.gmo:
84         file=`echo $* | sed 's,.*/,,'`.gmo \
85           && rm -f $$file && $(GMSGFMT) -o $$file $<
86
87 all: all-@USE_NLS@
88
89 all-yes: $(PACKAGE).pot $(CATALOGS)
90 all-no:
91         @echo "No support for NLS requested"
92
93 $(PACKAGE).pot: $(POTFILES)
94         if test -n "$(XGETTEXT)"; then \
95                 $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(srcdir)/.. \
96                        --keyword=_  --files-from=$(srcdir)/POTFILES.in; \
97                 mv $(PACKAGE).po $(PACKAGE).pot; \
98         else \
99                 echo "xgettext not available: $(PACKAGE).pot not updated" 1>&2; \
100         fi
101
102 makelib: all-@USE_NLS@
103
104 install: install-exec install-data
105 install-exec:
106 install-data: install-data-@USE_NLS@
107 install-data-no: all
108 install-data-yes: all
109         ${SHELL} $(top_srcdir)/mkinstalldirs $(datadir); \
110         catalogs='$(CATALOGS)'; \
111         for cat in $$catalogs; do \
112           case "$$cat" in \
113             *.gmo) destdir=$(gnulocaledir);; \
114             *)     destdir=$(localedir);; \
115           esac; \
116           lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \
117           dir=$$destdir/$$lang/LC_MESSAGES; \
118           ${SHELL} $(top_srcdir)/mkinstalldirs $$dir; \
119           if test -r $$cat; then \
120             $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
121             echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
122           else \
123             $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
124             echo "installing $(srcdir)/$$cat as" \
125                  "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
126           fi; \
127           if test -r $$cat.m; then \
128             $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
129             echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
130           else \
131             if test -r $(srcdir)/$$cat.m ; then \
132               $(INSTALL_DATA) $(srcdir)/$$cat.m \
133                 $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
134               echo "installing $(srcdir)/$$cat as" \
135                    "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
136             else \
137               true; \
138             fi; \
139           fi; \
140         done
141
142 # Define this as empty until I found a useful application.
143 installcheck:
144
145 uninstall:
146         catalogs='$(CATALOGS)'; \
147         for cat in $$catalogs; do \
148           lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \
149           rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
150           rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
151           rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
152           rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
153         done
154         rm -f $(gettextsrcdir)/po-Makefile.in.in
155
156 check: all
157
158 dvi info tags TAGS ID:
159
160 mostlyclean:
161         rm -f core core.* *.pox *.old.po *.gmo
162         rm -fr *.o *~
163
164 clean: mostlyclean
165
166 distclean: clean
167         rm -f Makefile Makefile.in POTFILES *.mo *.gmo *.msg *.cat.m $(PACKAGE).pot
168
169 maintainer-clean: distclean
170         @echo "This command is intended for maintainers to use;"
171         @echo "it deletes files that may require special tools to rebuild."
172
173 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
174 dist distdir: update-po $(DISTFILES)
175         dists="$(DISTFILES)"; \
176         for file in $$dists; do \
177           ln $(srcdir)/$$file $(distdir) 2> /dev/null \
178             || cp -p $(srcdir)/$$file $(distdir); \
179         done
180
181 update-po: Makefile
182         $(MAKE) $(PACKAGE).pot
183         PATH=`pwd`/../src:$$PATH; \
184         cd $(srcdir); \
185         catalogs='$(CATALOGS)'; \
186         for cat in $$catalogs; do \
187           lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \
188           mv $$lang.po $$lang.old.po; \
189           echo "$$lang:"; \
190           if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
191             rm -f $$lang.old.po; \
192           else \
193             echo "msgmerge for $$cat failed!"; \
194             rm -f $$lang.po; \
195             mv $$lang.old.po $$lang.po; \
196           fi; \
197         done
198
199 POTFILES: POTFILES.in
200         ( if test 'x$(srcdir)' != 'x.'; then \
201             posrcprefix='$(top_srcdir)/'; \
202           else \
203             posrcprefix="../"; \
204           fi; \
205           sed -e '/^#/d' -e '/^[        ]*$$/d' \
206               -e "s@.*@ $$posrcprefix& \\\\@" \
207               -e '$$s/\(.*\) \\/\1/' < $(srcdir)/POTFILES.in > POTFILES )
208
209 #Makefile: Makefile.in.in ../config.status POTFILES
210 #       cd .. \
211 #         && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
212 #              $(SHELL) ./config.status
213
214 # Tell versions [3.59,3.63) of GNU make not to export all variables.
215 # Otherwise a system limit (for SysV at least) may be exceeded.
216 .NOEXPORT: