1 # Generated automatically from Makefile.in.in by configure.
2 # Makefile for program source directory in GNU NLS utilities package.
3 # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
5 # This file file be copied and used freely without restrictions. It can
6 # be used in projects which are not available under the GNU Public License
7 # but which still want to provide support for the GNU gettext functionality.
8 # Please note that the actual code is *not* freely available.
20 exec_prefix = ${prefix}
21 datadir = $(prefix)/share
22 localedir = $(datadir)/locale
23 gnulocaledir = $(prefix)/share/locale
24 gettextsrcdir = $(prefix)/share/gettext/po
29 INSTALL = /usr/bin/install -c
30 INSTALL_DATA = ${INSTALL} -m 644
31 MKINSTALLDIRS = $(top_srcdir)/./mkinstalldirs
35 GMSGFMT = PATH=../src:$$PATH /usr/bin/msgfmt
36 MSGFMT = /usr/bin/msgfmt
37 XGETTEXT = PATH=../src:$$PATH /usr/bin/xgettext
38 MSGMERGE = PATH=../src:$$PATH msgmerge
40 DEFS = -DHAVE_CONFIG_H
41 CFLAGS = -g -O2 -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations
42 CPPFLAGS = -I/usr/include/gtk-1.2 -I/usr/include/glib-1.2 -I/usr/lib/glib/include -I/usr/X11R6/include
44 INCLUDES = -I.. -I$(top_srcdir)/intl
46 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
48 SOURCES = cat-id-tbl.c
51 DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
52 stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
61 .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
67 $(MAKE) $(PACKAGE).pot
68 $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
74 file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
75 && rm -f $$file && $(GMSGFMT) -o $$file $<
78 sed -f ../intl/po2msg.sed < $< > $*.msg \
79 && rm -f $@ && $(GENCAT) $@ $*.msg
84 all-yes: cat-id-tbl.c $(CATALOGS)
87 $(srcdir)/$(PACKAGE).pot: $(POTFILES)
88 $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
89 --add-comments --keyword=_ --keyword=N_ \
90 --files-from=$(srcdir)/POTFILES.in \
91 && test ! -f $(PACKAGE).po \
92 || ( rm -f $(srcdir)/$(PACKAGE).pot \
93 && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
95 $(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
96 $(srcdir)/stamp-cat-id: $(PACKAGE).pot
98 sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
99 | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
100 if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
103 echo cat-id-tbl.c changed; \
104 rm -f $(srcdir)/cat-id-tbl.c; \
105 mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
107 cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
110 install: install-exec install-data
112 install-data: install-data-yes
114 install-data-yes: all
115 if test -r "$(MKINSTALLDIRS)"; then \
116 $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
118 $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
120 @catalogs='$(CATALOGS)'; \
121 for cat in $$catalogs; do \
122 cat=`basename $$cat`; \
124 *.gmo) destdir=$(DESTDIR)$(gnulocaledir);; \
125 *) destdir=$(DESTDIR)$(localedir);; \
127 lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
128 dir=$$destdir/$$lang/LC_MESSAGES; \
129 if test -r "$(MKINSTALLDIRS)"; then \
130 $(MKINSTALLDIRS) $$dir; \
132 $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
134 if test -r $$cat; then \
135 $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
136 echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
138 $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
139 echo "installing $(srcdir)/$$cat as" \
140 "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
142 if test -r $$cat.m; then \
143 $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
144 echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
146 if test -r $(srcdir)/$$cat.m ; then \
147 $(INSTALL_DATA) $(srcdir)/$$cat.m \
148 $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
149 echo "installing $(srcdir)/$$cat as" \
150 "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
156 if test "$(PACKAGE)" = "gettext"; then \
157 if test -r "$(MKINSTALLDIRS)"; then \
158 $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
160 $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
162 $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
163 $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
168 # Define this as empty until I found a useful application.
172 catalogs='$(CATALOGS)'; \
173 for cat in $$catalogs; do \
174 cat=`basename $$cat`; \
175 lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
176 rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
177 rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
178 rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
179 rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
181 rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
185 cat-id-tbl.o: ../intl/libgettext.h
187 dvi info tags TAGS ID:
190 rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
196 rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
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."
203 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
204 dist distdir: update-po $(DISTFILES)
205 dists="$(DISTFILES)"; \
206 for file in $$dists; do \
207 ln $(srcdir)/$$file $(distdir) 2> /dev/null \
208 || cp -p $(srcdir)/$$file $(distdir); \
212 $(MAKE) $(PACKAGE).pot
213 PATH=`pwd`/../src:$$PATH; \
215 catalogs='$(CATALOGS)'; \
216 for cat in $$catalogs; do \
217 cat=`basename $$cat`; \
218 lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
219 mv $$lang.po $$lang.old.po; \
221 if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
222 rm -f $$lang.old.po; \
224 echo "msgmerge for $$cat failed!"; \
226 mv $$lang.old.po $$lang.po; \
230 POTFILES: POTFILES.in
231 ( if test 'x$(srcdir)' != 'x.'; then \
232 posrcprefix='$(top_srcdir)/'; \
237 && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
238 -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
239 | sed -e '$$s/\\$$//') > $@-t \
243 Makefile: Makefile.in.in ../config.status POTFILES
245 && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
246 $(SHELL) ./config.status
248 # Tell versions [3.59,3.63) of GNU make not to export all variables.
249 # Otherwise a system limit (for SysV at least) may be exceeded.