annotate po/Makefile.in.in @ 1:8b1883341c6f

Initial revision
author masneyb
date Mon, 05 Aug 2002 19:46:57 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
1 # Makefile for program source directory in GNU NLS utilities package.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
2 # Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
3 #
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
4 # This file file be copied and used freely without restrictions. It can
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
5 # be used in projects which are not available under the GNU General Public License
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
6 # but which still want to provide support for the GNU gettext functionality.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
7 # Please note that the actual code is *not* freely available.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
8
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
9 PACKAGE = @PACKAGE@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
10 VERSION = @VERSION@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
11
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
12 # These two variables depend on the location of this directory.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
13 subdir = po
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
14 top_builddir = ..
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
15
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
16 SHELL = /bin/sh
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
17 @SET_MAKE@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
18
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
19 srcdir = @srcdir@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
20 top_srcdir = @top_srcdir@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
21 VPATH = @srcdir@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
22
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
23 prefix = @prefix@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
24 exec_prefix = @exec_prefix@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
25 datadir = @datadir@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
26 localedir = $(datadir)/locale
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
27 gettextsrcdir = $(datadir)/gettext/po
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
28
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
29 INSTALL = @INSTALL@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
30 INSTALL_DATA = @INSTALL_DATA@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
31 MKINSTALLDIRS = @MKINSTALLDIRS@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
32 mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
33
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
34 CC = @CC@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
35 GMSGFMT = @GMSGFMT@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
36 MSGFMT = @MSGFMT@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
37 XGETTEXT = @XGETTEXT@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
38 MSGMERGE = msgmerge
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
39
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
40 DEFS = @DEFS@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
41 CFLAGS = @CFLAGS@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
42 CPPFLAGS = @CPPFLAGS@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
43
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
44 INCLUDES = -I.. -I$(top_srcdir)/intl
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
45
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
46 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
47
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
48 POFILES = @POFILES@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
49 GMOFILES = @GMOFILES@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
50 DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
51 $(POFILES) $(GMOFILES)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
52
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
53 POTFILES = \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
54
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
55 CATALOGS = @CATALOGS@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
56
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
57 .SUFFIXES:
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
58 .SUFFIXES: .c .o .po .pox .gmo .mo
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
59
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
60 .c.o:
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
61 $(COMPILE) $<
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
62
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
63 .po.pox:
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
64 $(MAKE) $(PACKAGE).pot
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
65 $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
66
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
67 .po.mo:
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
68 $(MSGFMT) -o $@ $<
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
69
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
70 .po.gmo:
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
71 file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
72 && rm -f $$file && $(GMSGFMT) --statistics -o $$file $<
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
73
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
74
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
75 all: all-@USE_NLS@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
76
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
77 all-yes: $(CATALOGS)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
78 all-no:
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
79
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
80 # Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot',
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
81 # otherwise packages like GCC can not be built if only parts of the source
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
82 # have been downloaded.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
83
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
84 $(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
85 $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
86 --add-comments --keyword=_ --keyword=N_ \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
87 --files-from=$(srcdir)/POTFILES.in \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
88 && test ! -f $(PACKAGE).po \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
89 || ( rm -f $(srcdir)/$(PACKAGE).pot \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
90 && mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
91
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
92
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
93 install: install-exec install-data
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
94 install-exec:
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
95 install-data: install-data-@USE_NLS@
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
96 if test "$(PACKAGE)" = "gettext"; then \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
97 $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
98 $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
99 $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
100 else \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
101 : ; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
102 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
103 install-data-no: all
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
104 install-data-yes: all
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
105 $(mkinstalldirs) $(DESTDIR)$(datadir)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
106 @catalogs='$(CATALOGS)'; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
107 for cat in $$catalogs; do \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
108 cat=`basename $$cat`; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
109 lang=`echo $$cat | sed 's/\.gmo$$//'`; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
110 dir=$(localedir)/$$lang/LC_MESSAGES; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
111 $(mkinstalldirs) $(DESTDIR)$$dir; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
112 if test -r $$cat; then \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
113 $(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
114 echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
115 else \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
116 $(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
117 echo "installing $(srcdir)/$$cat as" \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
118 "$(DESTDIR)$$dir/$(PACKAGE).mo"; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
119 fi; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
120 done
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
121
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
122 # Define this as empty until I found a useful application.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
123 installcheck:
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
124
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
125 uninstall:
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
126 catalogs='$(CATALOGS)'; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
127 for cat in $$catalogs; do \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
128 cat=`basename $$cat`; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
129 lang=`echo $$cat | sed 's/\.gmo$$//'`; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
130 rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
131 done
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
132 if test "$(PACKAGE)" = "gettext"; then \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
133 rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
134 else \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
135 : ; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
136 fi
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
137
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
138 check: all
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
139
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
140 dvi info tags TAGS ID:
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
141
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
142 mostlyclean:
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
143 rm -f core core.* *.pox $(PACKAGE).po *.new.po
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
144 rm -fr *.o
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
145
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
146 clean: mostlyclean
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
147
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
148 distclean: clean
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
149 rm -f Makefile Makefile.in POTFILES *.mo
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
150
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
151 maintainer-clean: distclean
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
152 @echo "This command is intended for maintainers to use;"
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
153 @echo "it deletes files that may require special tools to rebuild."
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
154 rm -f $(GMOFILES)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
155
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
156 distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
157 dist distdir:
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
158 $(MAKE) update-po
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
159 @$(MAKE) dist2
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
160 # This is a separate target because 'update-po' must be executed before.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
161 dist2: $(DISTFILES)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
162 dists="$(DISTFILES)"; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
163 for file in $$dists; do \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
164 if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
165 cp -p $$dir/$$file $(distdir); \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
166 done
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
167
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
168 update-po: Makefile
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
169 $(MAKE) $(PACKAGE).pot
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
170 if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
171 cd $(srcdir); \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
172 catalogs='$(GMOFILES)'; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
173 for cat in $$catalogs; do \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
174 cat=`basename $$cat`; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
175 lang=`echo $$cat | sed 's/\.gmo$$//'`; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
176 echo "$$lang:"; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
177 if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
178 mv -f $$lang.new.po $$lang.po; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
179 else \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
180 echo "msgmerge for $$cat failed!"; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
181 rm -f $$lang.new.po; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
182 fi; \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
183 done
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
184 $(MAKE) update-gmo
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
185
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
186 update-gmo: Makefile $(GMOFILES)
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
187 @:
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
188
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
189 Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
190 cd $(top_builddir) \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
191 && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
192 $(SHELL) ./config.status
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
193
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
194 # Tell versions [3.59,3.63) of GNU make not to export all variables.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
195 # Otherwise a system limit (for SysV at least) may be exceeded.
8b1883341c6f Initial revision
masneyb
parents:
diff changeset
196 .NOEXPORT: