1 # Makefile for directory with message catalog handling library of GNU gettext
2 # Copyright (C) 1995-2021 Free Software Foundation, Inc.
4 # This program is free software; you can redistribute it and/or modify it
5 # under the terms of the GNU Library General Public License as published
6 # by the Free Software Foundation; either version 2, or (at your option)
9 # This program 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.
14 # You should have received a copy of the GNU Library General Public
15 # License along with this program; if not, write to the Free Software
16 # Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
19 # This Makefile has been modified from the original shipped with
20 # gettext 0.12.1 to remove the ability to install libintl (which
21 # we do not need nor want), the ability to build a shared library
22 # (likewise), and a large number of heinous kludges.
30 exec_prefix = @
exec_prefix@
31 transform
= @program_transform_name@
33 includedir = @
includedir@
34 datarootdir
= @datarootdir@
36 localedir
= $(datadir)/locale
37 aliaspath
= $(localedir
)
42 AUTOHEADER
= @AUTOHEADER@
45 YACC
= @INTLBISON@
-y
-d
46 YFLAGS
= --name-prefix
=__gettext
48 CFLAGS
= @CFLAGS@ @PICFLAG@
51 DEFS
= -DHAVE_CONFIG_H
57 COMPILE
= $(CC
) -c
$(CPPFLAGS
) $(CFLAGS
) $(DEFS
) $(DEFS-
$@
) $(INCLUDES
)
117 DEFS-dcigettext.o
= -DLOCALEDIR
="\"$(localedir)\""
118 DEFS-localealias.o
= -DLOCALE_ALIAS_PATH
="\"$(aliaspath)\""
119 DEFS-localcharset.o
= -DLIBDIR
="\"$(libdir)\""
120 DEFS-relocatable.o
= -DINSTALLDIR
="\"$(libdir)\""
122 all: all-@USE_INCLUDED_LIBINTL@
123 all-yes
: libintl.a libintl.h config.intl
126 libintl.a
: $(OBJECTS
)
128 $(AR
) cru
$@
$(OBJECTS
)
131 libintl.h
: $(srcdir)/libgnuintl.h
132 cp
$(srcdir)/libgnuintl.h
$@
141 @BISON3_YES@ echo
'#define USE_BISON3' > $(patsubst %.c
,%-config.h
,$@
)
142 @BISON3_YES@ sed
's,%pure_parser,,;s,^/\* BISON3 \(.*\) \*/$$,\1,' $< > $@.y
143 @BISON3_YES@
$(YACC
) $(YFLAGS
) --output
$@.c
$@.y
144 @BISON3_YES@ sed
's/\.c\.y"/.y"/' $@.c
> $@
145 @BISON3_YES@
rm -f
$@.c
$@.y
$@.h
146 @BISON3_NO@ echo
'/* #define USE_BISON3 */' > $(patsubst %.c
,%-config.h
,$@
)
147 @BISON3_NO@
$(YACC
) $(YFLAGS
) --output
$@
$<
150 INCLUDES
= -I.
-I
$(srcdir)
154 # The installation targets have been disabled.
155 install: install-exec install-data
158 install-strip
: install
163 .PHONY
: info dvi ps pdf html
164 .PHONY
: install-info install-dvi install-ps install-pdf install-html
166 info dvi ps pdf html
:
167 install-info install-dvi install-ps install-pdf install-html
:
169 $(OBJECTS
): config.h libintl.h
170 bindtextdom.o dcgettext.o dcigettext.o dcngettext.o dgettext.o \
171 dngettext.o finddomain.o gettext.o intl-compat.o loadmsgcat.o \
172 localealias.o ngettext.o textdomain.o
: gettextP.h gmo.h loadinfo.h
173 dcigettext.o loadmsgcat.o
: hash-string.h
174 explodename.o l10nflist.o
: loadinfo.h
175 dcigettext.o loadmsgcat.o plural.o plural-exp.o
: plural-exp.h plural-config.h
176 dcigettext.o
: eval-plural.h
177 localcharset.o
: localcharset.h
178 localealias.o localcharset.o relocatable.o
: relocatable.h
181 TAGS
: $(HEADERS
) $(SOURCES
)
182 here
=`pwd`; cd
$(srcdir) && \
183 $(ETAGS
) -o
$$here/TAGS
$(HEADERS
) $(SOURCES
)
186 CTAGS
: $(HEADERS
) $(SOURCES
)
187 here
=`pwd`; cd
$(srcdir) && \
188 $(CTAGS
) -o
$$here/CTAGS
$(HEADERS
) $(SOURCES
)
191 ID
: $(HEADERS
) $(SOURCES
)
192 here
=`pwd`; cd
$(srcdir) && \
193 $(MKID
) -f
$$here/ID
$(HEADERS
) $(SOURCES
)
196 rm -f
*.a
*.la
*.o
*.obj
*.lo core core.
* libintl.h
201 rm -f config.status config.cache config.log config.intl config.h
202 rm -f Makefile ID TAGS
204 maintainer-clean
: distclean
206 # The 'make dist' targets have been disabled; the GNU toolchain handles this
207 # with a script maintained separately from the Makefile.
211 # Rules to rebuild the configuration
213 Makefile
: $(srcdir)/Makefile.in config.status
214 $(SHELL
) .
/config.status Makefile
216 config.intl
: $(srcdir)/config.intl.in config.status
217 $(SHELL
) .
/config.status config.intl
219 config.status
: $(srcdir)/configure
220 $(SHELL
) .
/config.status
--recheck
222 $(srcdir)/configure
: @MAINT@
$(srcdir)/aclocal.m4
$(srcdir)/configure.ac
223 cd
$(srcdir) && $(AUTOCONF
)
226 $(srcdir)/configure.ac \
227 $(srcdir)/..
/config
/codeset.m4 \
228 $(srcdir)/..
/config
/gettext.m4 \
229 $(srcdir)/..
/config
/glibc21.m4 \
230 $(srcdir)/..
/config
/iconv.m4 \
231 $(srcdir)/..
/config
/intdiv0.m4 \
232 $(srcdir)/..
/config
/inttypes-pri.m4 \
233 $(srcdir)/..
/config
/inttypes.m4 \
234 $(srcdir)/..
/config
/inttypes_h.m4 \
235 $(srcdir)/..
/config
/lcmessage.m4 \
236 $(srcdir)/..
/config
/lib-ld.m4 \
237 $(srcdir)/..
/config
/lib-link.m4 \
238 $(srcdir)/..
/config
/lib-prefix.m4 \
239 $(srcdir)/..
/config
/nls.m4 \
240 $(srcdir)/..
/config
/po.m4 \
241 $(srcdir)/..
/config
/progtest.m4 \
242 $(srcdir)/..
/config
/stdint_h.m4 \
243 $(srcdir)/..
/config
/uintmax_t.m4 \
244 $(srcdir)/..
/config
/ulonglong.m4
246 $(srcdir)/aclocal.m4
: @MAINT@
$(aclocal_deps
)
247 cd
$(srcdir) && $(ACLOCAL
) -I ..
/config
250 test -f config.h ||
(rm -f stamp-h1
&& $(MAKE
) stamp-h1
)
252 plural-config.h
: plural.c
254 stamp-h1
: $(srcdir)/config.h.in config.status
256 $(SHELL
) .
/config.status config.h
258 $(srcdir)/config.h.in
: @MAINT@
$(srcdir)/aclocal.m4
$(srcdir)/configure.ac
259 cd
$(srcdir) && $(AUTOHEADER
)
262 # Tell versions [3.59,3.63) of GNU make not to export all variables.
263 # Otherwise a system limit (for SysV at least) may be exceeded.