Internationalised the opcodes library.
[deliverable/binutils-gdb.git] / opcodes / po / Make-in
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>
3 #
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.
8
9 PACKAGE = @PACKAGE@
10 VERSION = @VERSION@
11
12 SHELL = /bin/sh
13 @SET_MAKE@
14
15 srcdir = @srcdir@
16 top_srcdir = @top_srcdir@
17 VPATH = @srcdir@
18
19 prefix = @prefix@
20 exec_prefix = @exec_prefix@
21 datadir = $(prefix)/@DATADIRNAME@
22 localedir = $(datadir)/locale
23 gnulocaledir = $(prefix)/share/locale
24 gettextsrcdir = $(prefix)/share/gettext/po
25 subdir = po
26
27 INSTALL = @INSTALL@
28 INSTALL_DATA = @INSTALL_DATA@
29 MKINSTALLDIRS = @MKINSTALLDIRS@
30
31 CC = @CC@
32 GENCAT = @GENCAT@
33 GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
34 MSGFMT = @MSGFMT@
35 XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
36 MSGMERGE = PATH=../src:$$PATH msgmerge
37
38 DEFS = @DEFS@
39 CFLAGS = @CFLAGS@
40 CPPFLAGS = @CPPFLAGS@
41
42 INCLUDES = -I.. -I$(top_srcdir)/intl
43
44 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
45
46 SOURCES = cat-id-tbl.c
47 POFILES = @POFILES@
48 GMOFILES = @GMOFILES@
49 DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
50 stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
51
52 POTFILES = \
53
54 CATALOGS = @CATALOGS@
55 CATOBJEXT = @CATOBJEXT@
56 INSTOBJEXT = @INSTOBJEXT@
57
58 .SUFFIXES:
59 .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
60
61 .c.o:
62 $(COMPILE) $<
63
64 .po.pox:
65 $(MAKE) $(PACKAGE).pot
66 $(MSGMERGE) $< $(srcdir)/$(PACKAGE).pot -o $*.pox
67
68 .po.mo:
69 $(MSGFMT) -o $@ $<
70
71 .po.gmo:
72 file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
73 && rm -f $$file && $(GMSGFMT) -o $$file $<
74
75 .po.cat:
76 sed -f ../intl/po2msg.sed < $< > $*.msg \
77 && rm -f $@ && $(GENCAT) $@ $*.msg
78
79
80 all: all-@USE_NLS@
81
82 all-yes: $(CATALOGS)
83 all-no:
84
85 $(srcdir)/$(PACKAGE).pot: @MAINT@ $(POTFILES)
86 $(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
87 --add-comments --keyword=_ --keyword=N_ \
88 --files-from=$(srcdir)/POTFILES.in
89 rm -f $(srcdir)/$(PACKAGE).pot
90 mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot
91
92 $(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
93 $(srcdir)/stamp-cat-id: $(PACKAGE).pot
94 rm -f cat-id-tbl.tmp
95 sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
96 | sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
97 if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
98 rm cat-id-tbl.tmp; \
99 else \
100 echo cat-id-tbl.c changed; \
101 rm -f $(srcdir)/cat-id-tbl.c; \
102 mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
103 fi
104 cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
105
106
107 install: install-exec install-data
108 install-exec:
109 install-data: install-data-@USE_NLS@
110 install-data-no: all
111 install-data-yes: all
112 if test -r $(MKINSTALLDIRS); then \
113 $(MKINSTALLDIRS) $(datadir); \
114 else \
115 $(top_srcdir)/mkinstalldirs $(datadir); \
116 fi
117 @catalogs='$(CATALOGS)'; \
118 for cat in $$catalogs; do \
119 cat=`basename $$cat`; \
120 case "$$cat" in \
121 *.gmo) destdir=$(gnulocaledir);; \
122 *) destdir=$(localedir);; \
123 esac; \
124 lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
125 dir=$$destdir/$$lang/LC_MESSAGES; \
126 if test -r $(MKINSTALLDIRS); then \
127 $(MKINSTALLDIRS) $$dir; \
128 else \
129 $(top_srcdir)/mkinstalldirs $$dir; \
130 fi; \
131 if test -r $$cat; then \
132 $(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
133 echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
134 else \
135 $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
136 echo "installing $(srcdir)/$$cat as" \
137 "$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
138 fi; \
139 if test -r $$cat.m; then \
140 $(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
141 echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
142 else \
143 if test -r $(srcdir)/$$cat.m ; then \
144 $(INSTALL_DATA) $(srcdir)/$$cat.m \
145 $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
146 echo "installing $(srcdir)/$$cat as" \
147 "$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
148 else \
149 true; \
150 fi; \
151 fi; \
152 done
153 if test "$(PACKAGE)" = "gettext"; then \
154 if test -r $(MKINSTALLDIRS); then \
155 $(MKINSTALLDIRS) $(gettextsrcdir); \
156 else \
157 $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
158 fi; \
159 $(INSTALL_DATA) $(srcdir)/Makefile.in.in \
160 $(gettextsrcdir)/Makefile.in.in; \
161 else \
162 : ; \
163 fi
164
165 # Define this as empty until I found a useful application.
166 installcheck:
167
168 uninstall:
169 catalogs='$(CATALOGS)'; \
170 for cat in $$catalogs; do \
171 cat=`basename $$cat`; \
172 lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
173 rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
174 rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
175 rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
176 rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
177 done
178 rm -f $(gettextsrcdir)/po-Makefile.in.in
179
180 check: all
181
182 cat-id-tbl.o: ../intl/libgettext.h
183
184 dvi info tags TAGS ID:
185
186 mostlyclean:
187 rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
188 rm -fr *.o
189
190 clean: mostlyclean
191
192 distclean: clean
193 rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
194
195 maintainer-clean: distclean
196 @echo "This command is intended for maintainers to use;"
197 @echo "it deletes files that may require special tools to rebuild."
198 rm -f $(GMOFILES)
199
200 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
201 dist distdir: update-po $(DISTFILES)
202 dists="$(DISTFILES)"; \
203 for file in $$dists; do \
204 ln $(srcdir)/$$file $(distdir) 2> /dev/null \
205 || cp -p $(srcdir)/$$file $(distdir); \
206 done
207
208 update-po: Makefile
209 $(MAKE) $(PACKAGE).pot
210 PATH=`pwd`/../src:$$PATH; \
211 cd $(srcdir); \
212 catalogs='$(CATALOGS)'; \
213 for cat in $$catalogs; do \
214 cat=`basename $$cat`; \
215 lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
216 mv $$lang.po $$lang.old.po; \
217 echo "$$lang:"; \
218 if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
219 rm -f $$lang.old.po; \
220 else \
221 echo "msgmerge for $$cat failed!"; \
222 rm -f $$lang.po; \
223 mv $$lang.old.po $$lang.po; \
224 fi; \
225 done
226
227 POTFILES: POTFILES.in
228 ( if test 'x$(srcdir)' != 'x.'; then \
229 posrcprefix='$(top_srcdir)/'; \
230 else \
231 posrcprefix="../"; \
232 fi; \
233 rm -f $@-t $@ \
234 && (sed -e '/^#/d' -e '/^[ ]*$$/d' \
235 -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
236 | sed -e '$$s/\\$$//') > $@-t \
237 && chmod a-w $@-t \
238 && mv $@-t $@ )
239
240 POTFILES.in: @MAINT@ ../Makefile
241 cd .. && $(MAKE) po/POTFILES.in
242
243 Makefile: Make-in ../config.status POTFILES
244 cd .. \
245 && CONFIG_FILES=$(subdir)/Makefile.in:$(subdir)/Make-in \
246 CONFIG_HEADERS= $(SHELL) ./config.status
247
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.
250 .NOEXPORT:
This page took 0.037094 seconds and 4 git commands to generate.