From patchwork Thu Jul 26 17:27:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos O'Donell X-Patchwork-Id: 949842 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-94795-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="CDvIrkP2"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41bzZB3S6xz9ryn for ; Fri, 27 Jul 2018 03:27:46 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type; q=dns; s=default; b=PaUY1qstU5qEPHSQqXUWS0RgOq3Pw a24FKcEnPRRFqJsBNczrhZfCfcs6dD2FMGRFrCqRlOEGGQAxL26KmV2u+9pd8/qy /AxVURA84M3+rdS6DgKgV7VhAQaI/Xncm+1WbBE4lYY6fnSIIwUMha5czMx6TTm4 BiPHHDqTxa5nho= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type; s=default; bh=XPXB2+gDlZ/gNFGvT38cp9YdS/U=; b=CDv IrkP2KfILTKtPe6BoolCx/FJdYWFBC+EzX3V+iwE5+u1og5XXZ+VA5nm81OedHCV 6YA+pqnmMe/NCXX0qDNHzxY5om84LOr+vAhzt8GUTdAKWBzdn7TKS4GQmevvEDPs QhDcZvQpBdI+8Agc4lhPbEJrD3+8D8fWKZCI+7JY= Received: (qmail 60826 invoked by alias); 26 Jul 2018 17:27:27 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 60807 invoked by uid 89); 26 Jul 2018 17:27:27 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 spammy=HX-Received:sk:h64-v6m, s* X-HELO: mail-qk0-f170.google.com To: GNU C Library , Florian Weimer From: Carlos O'Donell Subject: [PATCH] Add convenience target 'install-locale-files'. Message-ID: <7b4c3d0d-3fa1-3302-5e09-84326cb279d1@redhat.com> Date: Thu, 26 Jul 2018 13:27:21 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 The convenience install target 'install-locale-files' is created to allow distributions to install all of the SUPPORTED locales as files instead of into the locale-archive. You invoke the new convenience target like this: make localedata/install-locale-files install_root= OK for 2.29 when it opens? Signed-off-by: Carlos O'Donell Cheers, Carlos. From fde96ec607c2720a1c3e184447f932b83c8abfdf Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Thu, 26 Jul 2018 10:14:55 -0400 Subject: [PATCH] Add convenience target 'install-locale-files'. The convenience install target 'install-locale-files' is created to allow distributions to install all of the SUPPORTED locales as files instead of into the locale-archive. You invoke the new convenience target like this: make localedata/install-locale-files install_root= --- ChangeLog | 10 ++++++++++ localedata/Makefile | 26 ++++++++++++++++++++------ 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8b509d4a34..3606b912ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2018-07-26 Carlos O'Donell + + * localedata/Makefile (INSTALL-SUPPORTED-LOCALES): Remove. + (INSTALL-SUPPORTED-LOCALE-ARCHIVE): Define. + (INSTALL-SUPPORTED-LOCALE-FILES): Define. + (install-locales): Depend on install-locale-archive. + (install-locale-archive): Define. + (install-lcoale-files): Define. + (build-one-locale): Define macro. + 2018-07-25 Carlos O'Donell [BZ #23393] diff --git a/localedata/Makefile b/localedata/Makefile index 13c5423e0e..0eea396ad8 100644 --- a/localedata/Makefile +++ b/localedata/Makefile @@ -380,12 +380,18 @@ endif include SUPPORTED -INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES)) +INSTALL-SUPPORTED-LOCALE-ARCHIVE=$(addprefix install-archive-, $(SUPPORTED-LOCALES)) +INSTALL-SUPPORTED-LOCALE-FILES=$(addprefix install-files-, $(SUPPORTED-LOCALES)) # Sometimes the whole collection of locale files should be installed. LOCALEDEF=I18NPATH=. GCONV_PATH=$(common-objpfx)iconvdata LC_ALL=C \ $(rtld-prefix) $(common-objpfx)locale/localedef -install-locales: $(INSTALL-SUPPORTED-LOCALES) +install-locales: install-locale-archive + +# Create and install the locale-archive file. +install-locale-archive: $(INSTALL-SUPPORTED-LOCALE-ARCHIVE) +# Create and install the locales individually (no archive). +install-locale-files: $(INSTALL-SUPPORTED-LOCALE-FILES) install-locales-dir: $(..)./scripts/mkinstalldirs $(inst_complocaledir) @@ -393,11 +399,10 @@ install-locales-dir: # The SHIFT_JIS and SHIFT_JISX0213 character maps are not ASCII compatible, # therefore we have to use --no-warnings=ascii to disable the ASCII check. # See localedata/gen-locale.sh for the same logic. -$(INSTALL-SUPPORTED-LOCALES): install-locales-dir - @locale=`echo $@ | sed -e 's/^install-//'`; \ +define build-one-locale + locale=`echo $@ | sed -e 's/^install-[a-z]*-//'`; \ charset=`echo $$locale | sed -e 's,.*/,,'`; \ locale=`echo $$locale | sed -e 's,/[^/]*,,'`; \ - flags="-c"; \ if [ "$$charset" = 'SHIFT_JIS' ] \ || [ "$$charset" = 'SHIFT_JISX0213' ]; then \ flags="$$flags --no-warnings=ascii"; \ @@ -410,7 +415,16 @@ $(INSTALL-SUPPORTED-LOCALES): install-locales-dir $(LOCALEDEF) $$flags --alias-file=../intl/locale.alias \ -i locales/$$input -f charmaps/$$charset \ $(addprefix --prefix=,$(install_root)) $$locale \ - && echo ' done'; \ + && echo ' done'; +endef + +$(INSTALL-SUPPORTED-LOCALE-ARCHIVE): install-locales-dir + @flags="-c"; \ + $(build-one-locale) + +$(INSTALL-SUPPORTED-LOCALE-FILES): install-locales-dir + @flags="-c --no-archive"; \ + $(build-one-locale) tst-setlocale-ENV = LC_ALL=ja_JP.EUC-JP tst-wctype-ENV = LC_ALL=ja_JP.EUC-JP -- 2.14.4