2003-06-13 21:05:42 +00:00
|
|
|
# Copyright (C) 1991,1992,1995-2002,2003 Free Software Foundation, Inc.
|
1995-02-18 01:27:10 +00:00
|
|
|
# This file is part of the GNU C Library.
|
|
|
|
|
|
|
|
|
|
# The GNU C Library is free software; you can redistribute it and/or
|
2001-07-06 04:58:11 +00:00
|
|
|
# modify it under the terms of the GNU Lesser General Public
|
|
|
|
|
# License as published by the Free Software Foundation; either
|
|
|
|
|
# version 2.1 of the License, or (at your option) any later version.
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
|
# The GNU C Library is distributed in the hope that it will be useful,
|
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
2001-07-06 04:58:11 +00:00
|
|
|
# Lesser General Public License for more details.
|
1995-02-18 01:27:10 +00:00
|
|
|
|
2001-07-06 04:58:11 +00:00
|
|
|
# You should have received a copy of the GNU Lesser General Public
|
|
|
|
|
# License along with the GNU C Library; if not, write to the Free
|
|
|
|
|
# Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
|
|
|
|
|
# 02111-1307 USA.
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Makefile for locales.
|
|
|
|
|
#
|
|
|
|
|
subdir := locale
|
|
|
|
|
|
2001-01-26 09:22:30 +00:00
|
|
|
headers = locale.h bits/locale.h langinfo.h xlocale.h
|
1999-08-31 07:04:41 +00:00
|
|
|
distribute = localeinfo.h categories.def iso-639.def iso-3166.def \
|
2000-06-14 00:55:24 +00:00
|
|
|
iso-4217.def weight.h weightwc.h strlen-hash.h elem-hash.h \
|
2000-01-29 02:54:27 +00:00
|
|
|
indigits.h indigitswc.h outdigits.h outdigitswc.h \
|
2000-08-29 01:20:23 +00:00
|
|
|
coll-lookup.h C-translit.h.in C-translit.h gen-translit.pl \
|
2002-08-28 08:41:52 +00:00
|
|
|
locarchive.h hashval.h \
|
1996-06-25 13:56:54 +00:00
|
|
|
$(addprefix programs/, \
|
1996-09-08 02:07:08 +00:00
|
|
|
locale.c localedef.c \
|
1996-06-25 13:56:54 +00:00
|
|
|
$(localedef-modules:=.c) $(locale-modules:=.c) \
|
|
|
|
|
$(lib-modules:=.c) config.h simple-hash.h \
|
|
|
|
|
charmap-kw.gperf charmap-kw.h locfile-token.h \
|
|
|
|
|
locfile-kw.gperf locfile-kw.h linereader.h \
|
2000-08-29 01:20:23 +00:00
|
|
|
locfile.h charmap.h repertoire.h localedef.h \
|
2002-04-18 08:08:23 +00:00
|
|
|
3level.h charmap-dir.h locarchive.c)
|
2002-08-10 06:22:37 +00:00
|
|
|
routines = setlocale findlocale loadlocale loadarchive \
|
|
|
|
|
localeconv nl_langinfo nl_langinfo_l mb_cur_max \
|
2002-08-04 01:41:55 +00:00
|
|
|
newlocale duplocale freelocale uselocale
|
2000-10-26 23:41:17 +00:00
|
|
|
tests = tst-C-locale
|
1999-08-31 07:04:41 +00:00
|
|
|
categories = ctype messages monetary numeric time paper name \
|
|
|
|
|
address telephone measurement identification collate
|
2001-08-14 23:29:55 +00:00
|
|
|
aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name \
|
2003-06-13 21:05:42 +00:00
|
|
|
xlocale localename global-locale coll-lookup
|
1999-10-29 17:38:14 +00:00
|
|
|
others = localedef locale
|
1999-12-27 05:05:12 +00:00
|
|
|
#others-static = localedef locale
|
1996-04-03 16:31:49 +00:00
|
|
|
install-bin = localedef locale
|
2002-08-31 09:43:13 +00:00
|
|
|
extra-objs = $(localedef-modules:=.o) $(localedef-aux:=.o) \
|
|
|
|
|
$(locale-modules:=.o) $(lib-modules:=.o)
|
1995-05-18 09:00:09 +00:00
|
|
|
|
1996-12-11 01:40:39 +00:00
|
|
|
extra-libs = libBrokenLocale
|
|
|
|
|
extra-libs-others = $(extra-libs)
|
|
|
|
|
|
|
|
|
|
libBrokenLocale-routines = broken_cur_max
|
|
|
|
|
|
1996-06-05 19:22:44 +00:00
|
|
|
subdir-dirs = programs
|
2002-04-18 08:08:23 +00:00
|
|
|
vpath %.c programs ../crypt
|
1996-03-28 08:30:38 +00:00
|
|
|
vpath %.h programs
|
1996-06-06 04:54:33 +00:00
|
|
|
vpath %.gperf programs
|
1996-03-28 08:30:38 +00:00
|
|
|
|
1999-08-31 07:04:41 +00:00
|
|
|
localedef-modules := $(categories:%=ld-%) charmap linereader locfile \
|
2002-08-27 12:10:11 +00:00
|
|
|
repertoire locarchive
|
|
|
|
|
localedef-aux := md5
|
1996-07-29 03:49:00 +00:00
|
|
|
locale-modules := locale-spec
|
2000-10-01 19:15:29 +00:00
|
|
|
lib-modules := charmap-dir simple-hash xmalloc xstrdup
|
1995-05-18 09:00:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
GPERF = gperf
|
1999-08-31 07:04:41 +00:00
|
|
|
GPERFFLAGS = -acCgopt -k1,2,5,9,$$ -L ANSI-C
|
1995-02-18 01:27:10 +00:00
|
|
|
|
|
|
|
|
include ../Rules
|
1995-05-18 09:00:09 +00:00
|
|
|
|
1996-03-28 08:30:38 +00:00
|
|
|
programs/%-kw.h: programs/%-kw.gperf
|
|
|
|
|
$(GPERF) $(GPERFFLAGS) -N $(@F:-kw.h=_hash) $< > $@.new
|
1995-05-18 09:00:09 +00:00
|
|
|
mv -f $@.new $@
|
|
|
|
|
|
|
|
|
|
$(objpfx)localedef: $(localedef-modules:%=$(objpfx)%.o)
|
2002-08-27 12:10:11 +00:00
|
|
|
$(objpfx)localedef: $(localedef-aux:%=$(objpfx)%.o)
|
1995-05-18 09:00:09 +00:00
|
|
|
$(objpfx)locale: $(locale-modules:%=$(objpfx)%.o)
|
|
|
|
|
$(objpfx)localedef $(objpfx)locale: $(lib-modules:%=$(objpfx)%.o)
|
|
|
|
|
|
2000-07-22 21:22:08 +00:00
|
|
|
C-translit.h: C-translit.h.in gen-translit.pl
|
|
|
|
|
$(PERL) gen-translit.pl < $< > $@.tmp
|
2000-07-29 06:45:51 +00:00
|
|
|
mv -f $@.tmp $@
|
2000-07-22 21:22:08 +00:00
|
|
|
ifeq ($(with-cvs),yes)
|
|
|
|
|
test ! -d CVS || cvs $(CVSOPTS) commit -mRegenerated $@
|
|
|
|
|
endif
|
|
|
|
|
|
1996-12-04 01:41:39 +00:00
|
|
|
localepath = "$(localedir):$(i18ndir)"
|
1996-12-02 04:00:15 +00:00
|
|
|
|
2000-05-08 05:02:46 +00:00
|
|
|
locale-CPPFLAGS := -DLOCALE_PATH='$(localepath)' \
|
|
|
|
|
-DLOCALEDIR='"$(localedir)"' \
|
2000-08-10 04:40:02 +00:00
|
|
|
-DLOCALE_ALIAS_PATH='"$(msgcatdir)"' \
|
2000-05-08 05:02:46 +00:00
|
|
|
-DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
|
|
|
|
|
-DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \
|
|
|
|
|
-DLOCSRCDIR='"$(i18ndir)/locales"' -DHAVE_CONFIG_H \
|
|
|
|
|
-Iprograms
|
1996-01-24 06:03:37 +00:00
|
|
|
|
1997-11-18 02:50:07 +00:00
|
|
|
CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts
|
|
|
|
|
CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts
|
2000-10-01 19:15:29 +00:00
|
|
|
CFLAGS-charmap-dir.c = -Wno-write-strings
|
1996-12-11 01:40:39 +00:00
|
|
|
|
2002-09-01 12:39:40 +00:00
|
|
|
# This makes sure -DNOT_IN_libc is passed for all these modules.
|
|
|
|
|
cpp-srcs-left := $(addsuffix .c,$(localedef-modules) $(localedef-aux) \
|
|
|
|
|
$(locale-modules) $(lib-modules))
|
2002-10-16 22:09:55 +00:00
|
|
|
lib := nonlib
|
2002-09-01 12:39:40 +00:00
|
|
|
include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
|
2002-07-25 08:19:59 +00:00
|
|
|
|
1996-12-11 01:40:39 +00:00
|
|
|
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
|
|
|
|
|
# This ensures they will load libc.so for needed symbols if loaded by
|
|
|
|
|
# a statically-linked program that hasn't already loaded it.
|
2001-03-18 21:34:58 +00:00
|
|
|
$(objpfx)libBrokenLocale.so: $(common-objpfx)libc.so \
|
|
|
|
|
$(common-objpfx)libc_nonshared.a
|