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