mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-15 04:20:28 +08:00
5a82c74822
Also, change sources.redhat.com to sourceware.org. This patch was automatically generated by running the following shell script, which uses GNU sed, and which avoids modifying files imported from upstream: sed -ri ' s,(http|ftp)(://(.*\.)?(gnu|fsf|sourceware)\.org($|[^.]|\.[^a-z])),https\2,g s,(http|ftp)(://(.*\.)?)sources\.redhat\.com($|[^.]|\.[^a-z]),https\2sourceware.org\4,g ' \ $(find $(git ls-files) -prune -type f \ ! -name '*.po' \ ! -name 'ChangeLog*' \ ! -path COPYING ! -path COPYING.LIB \ ! -path manual/fdl-1.3.texi ! -path manual/lgpl-2.1.texi \ ! -path manual/texinfo.tex ! -path scripts/config.guess \ ! -path scripts/config.sub ! -path scripts/install-sh \ ! -path scripts/mkinstalldirs ! -path scripts/move-if-change \ ! -path INSTALL ! -path locale/programs/charmap-kw.h \ ! -path po/libc.pot ! -path sysdeps/gnu/errlist.c \ ! '(' -name configure \ -execdir test -f configure.ac -o -f configure.in ';' ')' \ ! '(' -name preconfigure \ -execdir test -f preconfigure.ac ';' ')' \ -print) and then by running 'make dist-prepare' to regenerate files built from the altered files, and then executing the following to cleanup: chmod a+x sysdeps/unix/sysv/linux/riscv/configure # Omit irrelevant whitespace and comment-only changes, # perhaps from a slightly-different Autoconf version. git checkout -f \ sysdeps/csky/configure \ sysdeps/hppa/configure \ sysdeps/riscv/configure \ sysdeps/unix/sysv/linux/csky/configure # Omit changes that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/powerpc/powerpc64/ppc-mcount.S: trailing lines git checkout -f \ sysdeps/powerpc/powerpc64/ppc-mcount.S \ sysdeps/unix/sysv/linux/s390/s390-64/syscall.S # Omit change that caused a pre-commit check to fail like this: # remote: *** error: sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S: last line does not end in newline git checkout -f sysdeps/sparc/sparc64/multiarch/memcpy-ultra3.S
78 lines
2.6 KiB
Bash
78 lines
2.6 KiB
Bash
#!/bin/sh
|
|
# Generate test locale files.
|
|
# Copyright (C) 2000-2019 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, see
|
|
# <https://www.gnu.org/licenses/>.
|
|
|
|
set -e
|
|
|
|
common_objpfx="$1"; shift
|
|
localedef_before_env="$1"; shift
|
|
run_program_env="$1"; shift
|
|
localedef_after_env="$1"; shift
|
|
locfile="$1"; shift
|
|
|
|
generate_locale ()
|
|
{
|
|
charmap=$1
|
|
input=$2
|
|
out=$3
|
|
flags=$4
|
|
ret=0
|
|
${localedef_before_env} ${run_program_env} I18NPATH=../localedata \
|
|
${localedef_after_env} $flags -f $charmap -i $input \
|
|
${common_objpfx}localedata/$out || ret=$?
|
|
if [ $ret -eq 0 ]; then
|
|
# The makefile checks the timestamp of the LC_CTYPE file,
|
|
# but localedef won't have touched it if it was able to
|
|
# hard-link it to an existing file.
|
|
touch ${common_objpfx}localedata/$out/LC_CTYPE
|
|
else
|
|
echo "Charmap: \"${charmap}\" Inputfile: \"${input}\"" \
|
|
"Outputdir: \"${out}\" failed"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
locfile=`echo $locfile|sed 's|.*/\([^/]*/LC_CTYPE\)|\1|'`
|
|
locale=`echo $locfile|sed 's|\([^.]*\)[.].*/LC_CTYPE|\1|'`
|
|
charmap=`echo $locfile|sed 's|[^.]*[.]\([^@ ]*\)\(@[^ ]*\)\?/LC_CTYPE|\1|'`
|
|
modifier=`echo $locfile|sed 's|[^.]*[.]\([^@ ]*\)\(@[^ ]*\)\?/LC_CTYPE|\2|'`
|
|
|
|
echo "Generating locale $locale.$charmap: this might take a while..."
|
|
|
|
# Run quietly and force output.
|
|
flags="--quiet -c"
|
|
|
|
# For SJIS the charmap is SHIFT_JIS. We just want the locale to have
|
|
# a slightly nicer name instead of using "*.SHIFT_SJIS", but that
|
|
# means we need a mapping here.
|
|
charmap_real="$charmap"
|
|
if [ "$charmap" = "SJIS" ]; then
|
|
charmap_real="SHIFT_JIS"
|
|
fi
|
|
|
|
# In addition to this the SHIFT_JIS character maps are not ASCII
|
|
# compatible so we must use `--no-warnings=ascii' to disable the
|
|
# warning. See localedata/Makefile $(INSTALL-SUPPORTED-LOCALES)
|
|
# for the same logic.
|
|
if [ "$charmap_real" = 'SHIFT_JIS' ] \
|
|
|| [ "$charmap_real" = 'SHIFT_JISX0213' ]; then
|
|
flags="$flags --no-warnings=ascii"
|
|
fi
|
|
|
|
generate_locale $charmap_real $locale$modifier $locale.$charmap$modifier "$flags"
|