|
1 # po/Makefile for libelf. |
|
2 # Copyright (C) 1995 - 2006 Michael Riepe |
|
3 # |
|
4 # This library is free software; you can redistribute it and/or |
|
5 # modify it under the terms of the GNU Library General Public |
|
6 # License as published by the Free Software Foundation; either |
|
7 # version 2 of the License, or (at your option) any later version. |
|
8 # |
|
9 # This library is distributed in the hope that it will be useful, |
|
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
12 # Library General Public License for more details. |
|
13 # |
|
14 # You should have received a copy of the GNU Library General Public |
|
15 # License along with this library; if not, write to the Free Software |
|
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|
17 |
|
18 # @(#) $Id: Makefile.in,v 1.17 2006/04/21 17:16:51 michael Exp $ |
|
19 |
|
20 instroot = |
|
21 |
|
22 prefix = @prefix@ |
|
23 exec_prefix = @exec_prefix@ |
|
24 localedir = @localedir@ |
|
25 |
|
26 CC = @CC@ |
|
27 RM = rm -f |
|
28 MV = mv -f |
|
29 INSTALL = @INSTALL@ |
|
30 INSTALL_DATA = @INSTALL_DATA@ |
|
31 |
|
32 GENCAT = @GENCAT@ |
|
33 GMSGFMT = @GMSGFMT@ |
|
34 MSGFMT = @MSGFMT@ |
|
35 XGETTEXT = @XGETTEXT@ |
|
36 MSGMERGE = @MSGMERGE@ |
|
37 |
|
38 CFLAGS = @CFLAGS@ |
|
39 CPPFLAGS = @CPPFLAGS@ |
|
40 DEFS = -DHAVE_CONFIG_H |
|
41 LDFLAGS = @LDFLAGS@ |
|
42 LIBS = @LIBS@ |
|
43 LIBINTL = @LIBINTL@ |
|
44 |
|
45 # no user serviceable parts below |
|
46 |
|
47 PACKAGE = @PACKAGE@ |
|
48 VERSION = @VERSION@ |
|
49 |
|
50 SHELL = /bin/sh |
|
51 @SET_MAKE@ |
|
52 |
|
53 srcdir = @srcdir@ |
|
54 top_srcdir = @top_srcdir@ |
|
55 VPATH = @srcdir@ |
|
56 |
|
57 topdir = .. |
|
58 subdir = po |
|
59 |
|
60 .SUFFIXES: |
|
61 .SUFFIXES: .po .mo .gmo .msg .cat |
|
62 |
|
63 .po.mo: |
|
64 @$(RM) $@ |
|
65 $(MSGFMT) -o $@ $< |
|
66 |
|
67 .po.gmo: |
|
68 file=$(srcdir)/`echo $*|sed 's,.*/,,'`.gmo; \ |
|
69 $(RM) $$file && $(GMSGFMT) -o $$file $< |
|
70 |
|
71 .msg.cat: |
|
72 @$(RM) $@ |
|
73 $(GENCAT) $@ $< |
|
74 |
|
75 POFILES = @POFILES@ |
|
76 GMOFILES = @GMOFILES@ |
|
77 MSGFILES = @MSGFILES@ |
|
78 |
|
79 DISTFILES = \ |
|
80 gmo2msg.c Makefile.in $(PACKAGE).pot stamp-po \ |
|
81 $(POFILES) $(GMOFILES) $(MSGFILES) |
|
82 |
|
83 POTFILES = $(top_srcdir)/lib/errors.h |
|
84 |
|
85 CATALOGS = @CATALOGS@ |
|
86 CATOBJEXT = @CATOBJEXT@ |
|
87 INSTOBJEXT = @INSTOBJEXT@ |
|
88 |
|
89 all: $(CATALOGS) |
|
90 |
|
91 check: |
|
92 |
|
93 install: all install-data |
|
94 |
|
95 install-data: $(top_srcdir)/mkinstalldirs |
|
96 catalogs="$(CATALOGS)"; for cat in $$catalogs; do \ |
|
97 lang=`echo $$cat | sed 's,$(CATOBJEXT)$$,,'`; \ |
|
98 dir=$(localedir)/$$lang/LC_MESSAGES; \ |
|
99 $(SHELL) $(top_srcdir)/mkinstalldirs $(instroot)$$dir; \ |
|
100 if test -r $$cat; then \ |
|
101 $(INSTALL_DATA) $$cat $(instroot)$$dir/$(PACKAGE)$(INSTOBJEXT); \ |
|
102 else \ |
|
103 $(INSTALL_DATA) $(srcdir)/$$cat $(instroot)$$dir/$(PACKAGE)$(INSTOBJEXT); \ |
|
104 fi; \ |
|
105 done |
|
106 |
|
107 uninstall: |
|
108 catalogs="$(CATALOGS)"; for cat in $$catalogs; do \ |
|
109 lang=`echo $$cat | sed 's,$(CATOBJEXT)$$,,'`; \ |
|
110 $(RM) $(instroot)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \ |
|
111 done |
|
112 |
|
113 mostlyclean: |
|
114 $(RM) core core.* $(PACKAGE).po *.po.tmp |
|
115 |
|
116 clean: mostlyclean |
|
117 |
|
118 distclean: clean |
|
119 $(RM) gmo2msg *.mo *.cat |
|
120 $(RM) Makefile |
|
121 |
|
122 maintainer-clean: distclean |
|
123 $(RM) stamp-po |
|
124 |
|
125 $(PACKAGE).pot: $(POTFILES) |
|
126 $(XGETTEXT) -c -d$(PACKAGE) -k_ $(POTFILES) |
|
127 if cmp -s $(PACKAGE).po $(srcdir)/$(PACKAGE).pot; then \ |
|
128 $(RM) $(PACKAGE).po; \ |
|
129 else \ |
|
130 $(RM) $(srcdir)/$(PACKAGE).pot && \ |
|
131 $(MV) $(PACKAGE).po $(srcdir)/$(PACKAGE).pot; \ |
|
132 fi |
|
133 |
|
134 update-po: stamp-po |
|
135 stamp-po: $(PACKAGE).pot |
|
136 pofiles="$(POFILES)"; cd $(srcdir) && for po in $$pofiles; do \ |
|
137 $(RM) $$po.tmp; \ |
|
138 if $(MSGMERGE) $$po $(PACKAGE).pot > $$po.tmp; then \ |
|
139 $(RM) $$po; \ |
|
140 $(MV) $$po.tmp $$po; \ |
|
141 else \ |
|
142 echo "update for $$po failed!"; \ |
|
143 $(RM) $$po.tmp; \ |
|
144 fi; \ |
|
145 done |
|
146 $(RM) $@ && echo timestamp > $@ |
|
147 |
|
148 # Create X/Open message catalog sources from .gmo files. |
|
149 |
|
150 .gmo.msg: |
|
151 $(MAKE) $(srcdir)/gmo2msg |
|
152 cd $(srcdir) && ./gmo2msg `echo $*|sed 's,.*/,,'` |
|
153 |
|
154 .SUFFIXES: .c |
|
155 |
|
156 .c: |
|
157 @$(RM) $@ |
|
158 $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) \ |
|
159 $(LDFLAGS) $*.c $(LIBS) $(LIBINTL) -o $@ |
|
160 |
|
161 INCLUDES = -I$(topdir) -I. -I$(topdir)/lib -I$(srcdir) -I$(top_srcdir)/lib |
|
162 |
|
163 # maintainer only |
|
164 |
|
165 MAINT = @MAINT@ |
|
166 |
|
167 distdir = $(PACKAGE)-$(VERSION) |
|
168 distsubdir = $(topdir)/$(distdir)/$(subdir) |
|
169 $(MAINT)dist: update-po $(DISTFILES) |
|
170 if test -d $(distsubdir); then true; else mkdir $(distsubdir); fi |
|
171 files="$(DISTFILES)"; for file in $$files; do \ |
|
172 ln $(srcdir)/$$file $(distsubdir) >/dev/null 2>&1 || \ |
|
173 cp -p $(srcdir)/$$file $(distsubdir) || exit 1; \ |
|
174 done |
|
175 |
|
176 # For the justification of the following Makefile rules, see node |
|
177 # `Automatic Remaking' in GNU Autoconf documentation. |
|
178 |
|
179 $(MAINT)Makefile: Makefile.in $(topdir)/config.status |
|
180 cd $(topdir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status |
|
181 |
|
182 # Tell versions [3.59,3.63) of GNU make not to export all variables. |
|
183 # Otherwise a system limit (for SysV at least) may be exceeded. |
|
184 .NOEXPORT: |