mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-19 11:30:06 +00:00
6b98979fc9
2001-07-22 Ulrich Drepper <drepper@redhat.com> * iconv/gconv_builtin.c (struct builtin_map): Remove init and end elements. (BUILTIN_TRANSFORMATION): Remove Init and End parameters. (__gconv_get_builtin_trans): Initialize __init_fct and __end_fct to NULL. * iconv/gconv_builtin.h: Remove NULL parameters for Init and End in all BUILTIN_TRANSFORMATION calls. * iconv/gconv_conf.c (BUILTIN_TRANSFORMATION): Remove Init and End parameters. * iconv/gconv_simple.c: Likewise. * iconv/gconv_db.c (gen_steps): Internal converters don't have initializers, move the code accordingly. * iconv/gconv_conf.c (__gconv_read_conf): Don't read configuration file if STATIC_GCONV is defined. * iconv/gconv_conf.c (__gconv_path_envvar): New global variable. (__gconv_get_path): Use it instead of call getenv. (__gconv_read_conf): First see whether cache can be used. If yes, don't do any work here. * iconv/gconv_db.c (__gconv_release_step): Renamed from release_step and exported. Change callers. (__gconv_find_transform): First call __gconv_lookup_cache and only continue if it signals no cache available. Remove some unnecessary tests. * iconv/gconv_int.h: Declare __gconv_path_envvar, __gconv_lookup_cache, __gconv_release_step, and __gconv_loaded_cache. * iconv/gconv_cache.c: New file. * iconv/iconvconfig.c: New file. * iconv/iconvconfig.h: New file. * iconv/strtab.c: New file. * iconv/Makefile: Add rules to build new files and programs.
69 lines
2.3 KiB
Makefile
69 lines
2.3 KiB
Makefile
# Copyright (C) 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
|
|
# This file is part of the GNU C Library.
|
|
|
|
# The GNU C Library is free software; you can redistribute it and/or
|
|
# 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.
|
|
|
|
# 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
|
|
# Lesser General Public License for more details.
|
|
|
|
# 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.
|
|
|
|
#
|
|
# Makefile for iconv.
|
|
#
|
|
subdir := iconv
|
|
|
|
include ../Makeconfig
|
|
|
|
headers = iconv.h gconv.h
|
|
routines = iconv_open iconv iconv_close \
|
|
gconv_open gconv gconv_close gconv_db gconv_conf \
|
|
gconv_builtin gconv_simple gconv_trans gconv_cache
|
|
ifeq ($(elf),yes)
|
|
routines += gconv_dl
|
|
else
|
|
CFLAGS-gconv_db.c = -DSTATIC_GCONV
|
|
CFLAGS-gconv_cache.c = -DSTATIC_GCONV
|
|
CFLAGS-gconv_simple.c = -DSTATIC_GCONV
|
|
endif
|
|
|
|
vpath %.c ../locale/programs
|
|
|
|
iconv_prog-modules = iconv_charmap charmap charmap-dir linereader \
|
|
dummy-repertoire simple-hash xstrdup xmalloc
|
|
iconvconfig-modules = strtab xmalloc
|
|
extra-objs = $(iconv_prog-modules:=.o)
|
|
CFLAGS-iconv_prog.c = -I../locale/programs
|
|
CFLAGS-iconv_charmap.c = -I../locale/programs
|
|
CFLAGS-dummy-repertoire.c = -I../locale/programs
|
|
CFLAGS-charmap.c = -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \
|
|
-DDEFAULT_CHARMAP=null_pointer -DNEED_NULL_POINTER
|
|
|
|
tests = tst-iconv1 tst-iconv2 tst-iconv3
|
|
|
|
distribute = gconv_builtin.h gconv_int.h loop.c skeleton.c iconv_prog.h \
|
|
iconv_charmap.c dummy-repertoire.c gconv_charset.h
|
|
|
|
others = iconv_prog iconvconfig
|
|
install-others = $(inst_bindir)/iconv
|
|
|
|
CFLAGS-gconv_cache.c = -DGCONV_DIR='"$(gconvdir)"'
|
|
CFLAGS-gconv_conf.c = -DGCONV_PATH='"$(gconvdir)"'
|
|
CFLAGS-iconvconfig.c = -DGCONV_PATH='"$(gconvdir)"' -DGCONV_DIR='"$(gconvdir)"'
|
|
|
|
include ../Rules
|
|
|
|
$(inst_bindir)/iconv: $(objpfx)iconv_prog $(+force)
|
|
$(do-install-program)
|
|
|
|
$(objpfx)iconv_prog: $(iconv_prog-modules:%=$(objpfx)%.o)
|
|
$(objpfx)iconvconfig: $(iconvconfig-modules:%=$(objpfx)%.o)
|