3 # Makefile for gnokii I18n,
4 # based on the Makefile.in.in that comes with gettext
6 # Erwin Dieterich, 20. 1. 1998 Erwin.Dieterich.ED@Bayer-AG.de
10 # Makefile for program source directory in GNU NLS utilities package.
11 # Copyright (C) 1995, 1996 Free Software Foundation, Inc.
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)
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.
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.
34 top_srcdir = @top_srcdir@
38 exec_prefix = @exec_prefix@
39 datadir = $(prefix)/@DATADIRNAME@
40 localedir = @LOCALEDIR@
41 gnulocaledir = @LOCALEDIR@
45 #INSTALL_DATA = @INSTALL_DATA@
46 INSTALL_DATA = @INSTALL@ -m 644
60 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
62 DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot
67 CATOBJEXT = @CATOBJEXT@
68 INSTOBJEXT = @INSTOBJEXT@
71 .SUFFIXES: .c .o .po .pox .gmo .mo .msg
77 $(MAKE) $(PACKAGE).pot
78 $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
84 file=`echo $* | sed 's,.*/,,'`.gmo \
85 && rm -f $$file && $(GMSGFMT) -o $$file $<
91 all-yes: $(PACKAGE).pot $(CATALOGS)
93 @echo "No support for NLS requested"
95 $(PACKAGE).pot: $(POTFILES)
96 if test -n "$(XGETTEXT)"; then \
97 $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(srcdir)/.. \
98 --c++ --keyword=_ --files-from=$(srcdir)/POTFILES.in; \
99 mv $(PACKAGE).po $(PACKAGE).pot; \
101 echo "xgettext not available: $(PACKAGE).pot not updated" 1>&2; \
105 install: install-exec install-data
107 install-data: install-data-@USE_NLS@
109 install-data-yes: all
110 ${SHELL} $(top_srcdir)/mkinstalldirs $(datadir); \
111 catalogs='$(CATALOGS)'; \
112 for cat in $$catalogs; do \
114 *.gmo) destdir=$(gnulocaledir);; \
115 *) destdir=$(localedir);; \
117 lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \
118 dir=$$destdir/$$lang/LC_MESSAGES; \
119 ${SHELL} $(top_srcdir)/mkinstalldirs $$dir; \
120 if test -r $$cat; then \
121 $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
122 echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
124 $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
125 echo "installing $(srcdir)/$$cat as" \
126 "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
128 if test -r $$cat.m; then \
129 $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
130 echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
132 if test -r $(srcdir)/$$cat.m ; then \
133 $(INSTALL_DATA) $(srcdir)/$$cat.m \
134 $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
135 echo "installing $(srcdir)/$$cat as" \
136 "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
143 # Define this as empty until I found a useful application.
147 catalogs='$(CATALOGS)'; \
148 for cat in $$catalogs; do \
149 lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \
150 rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
151 rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
152 rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
153 rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
155 rm -f $(gettextsrcdir)/po-Makefile.in.in
159 dvi info tags TAGS ID:
162 rm -f core core.* *.pox *.old.po *.gmo
168 rm -f Makefile Makefile.in POTFILES *.mo *.gmo *.msg *.cat.m $(PACKAGE).pot
170 maintainer-clean: distclean
171 @echo "This command is intended for maintainers to use;"
172 @echo "it deletes files that may require special tools to rebuild."
174 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
175 dist distdir: update-po $(DISTFILES)
176 dists="$(DISTFILES)"; \
177 for file in $$dists; do \
178 ln $(srcdir)/$$file $(distdir) 2> /dev/null \
179 || cp -p $(srcdir)/$$file $(distdir); \
183 $(MAKE) $(PACKAGE).pot
184 PATH=`pwd`/../src:$$PATH; \
186 catalogs='$(CATALOGS)'; \
187 for cat in $$catalogs; do \
188 lang=`echo $$cat | sed 's/$(CATOBJEXT)$$//'`; \
189 mv $$lang.po $$lang.old.po; \
191 if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
192 rm -f $$lang.old.po; \
194 echo "msgmerge for $$cat failed!"; \
196 mv $$lang.old.po $$lang.po; \
200 POTFILES: POTFILES.in
201 ( if test 'x$(srcdir)' != 'x.'; then \
202 posrcprefix='$(top_srcdir)/'; \
206 sed -e '/^#/d' -e '/^[ ]*$$/d' \
207 -e "s@.*@ $$posrcprefix& \\\\@" \
208 -e '$$s/\(.*\) \\/\1/' < $(srcdir)/POTFILES.in > POTFILES )
210 #Makefile: Makefile.in.in ../config.status POTFILES
212 # && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
213 # $(SHELL) ./config.status
215 # Tell versions [3.59,3.63) of GNU make not to export all variables.
216 # Otherwise a system limit (for SysV at least) may be exceeded.