Message ID | 1456219278-5258-2-git-send-email-stli@linux.vnet.ibm.com |
---|---|
State | Superseded |
Headers |
Received: (qmail 121520 invoked by alias); 23 Feb 2016 09:21:38 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: <libc-alpha.sourceware.org> List-Unsubscribe: <mailto:libc-alpha-unsubscribe-##L=##H@sourceware.org> List-Subscribe: <mailto:libc-alpha-subscribe@sourceware.org> List-Archive: <http://sourceware.org/ml/libc-alpha/> List-Post: <mailto:libc-alpha@sourceware.org> List-Help: <mailto:libc-alpha-help@sourceware.org>, <http://sourceware.org/ml/#faqs> Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 121493 invoked by uid 89); 23 Feb 2016 09:21:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00, KAM_LAZY_DOMAIN_SECURITY, RP_MATCHES_RCVD autolearn=no version=3.3.2 spammy=sk:generat, accelerated, S390, iconv X-HELO: e06smtp13.uk.ibm.com X-IBM-Helo: d06dlp02.portsmouth.uk.ibm.com X-IBM-MailFrom: stli@linux.vnet.ibm.com X-IBM-RcptTo: libc-alpha@sourceware.org From: Stefan Liebler <stli@linux.vnet.ibm.com> To: libc-alpha@sourceware.org Cc: Stefan Liebler <stli@linux.vnet.ibm.com> Subject: [PATCH 01/14] S390: Get rid of make warning: overriding recipe for target gconv-modules. Date: Tue, 23 Feb 2016 10:21:05 +0100 Message-Id: <1456219278-5258-2-git-send-email-stli@linux.vnet.ibm.com> In-Reply-To: <1456219278-5258-1-git-send-email-stli@linux.vnet.ibm.com> References: <1456219278-5258-1-git-send-email-stli@linux.vnet.ibm.com> X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16022309-0013-0000-0000-000008BB68C2 |
Commit Message
Stefan Liebler
Feb. 23, 2016, 9:21 a.m. UTC
This patch introduces a way to provide an architecture dependent gconv-modules file. Before this patch, the gconv-modules file was normally installed from src-dir/iconvdata/gconv-modules. The S390 Makefile had overridden the installation recipe (with a make warning) in order to install the gconv-module-s390 file from build-dir. The iconvdata/Makefile provides another recipe, which copies the gconv-modules file from src to build dir, which are used by the testcases. Thus the testcases does not use the currently build s390-modules. This patch uses build-dir/iconvdata/gconv-modules for installation. If makefile variable GCONV_MODULES is not defined, then gconv-modules file is copied form source to build directory. If an architecture wants to create his own gconv-modules file, then the variable GCONV_MODULE is set to the name of the architecture-dependent gconv-modules file in build-directory, which has to be created by a recipe in sysdeps/.../Makefile. Then the iconvdata/Makefile copies this file to build-dir/iconvdata/gconv-modules, which will be used for installation and test. This way, the s390-Makefile does not need to override the recipe for gconv-modules and no warning is emitted anymore. ChangeLog: * iconvdata/Makefile (GCONV_MODULES): New variable, which can be set by sysdeps Makefile. ($(inst_gconvdir)/gconv-modules): Install file from $(objpfx)gconv-modules. ($(objpfx)gconv-modules): Copy File from src-dir or from build-dir with file-name specified by GCONV_MODULES. * sysdeps/s390/s390-64/Makefile ($(inst_gconvdir)/gconv-modules): Deleted. (GCONV_MODULES): New variable. --- iconvdata/Makefile | 15 +++++++++++++-- sysdeps/s390/s390-64/Makefile | 17 ++--------------- 2 files changed, 15 insertions(+), 17 deletions(-)
Comments
Ping. Is the new handling of gconv-modules in iconvdata/Makefile okay to commit? On 02/23/2016 10:21 AM, Stefan Liebler wrote: > This patch introduces a way to provide an architecture dependent gconv-modules > file. Before this patch, the gconv-modules file was normally installed from > src-dir/iconvdata/gconv-modules. The S390 Makefile had overridden the > installation recipe (with a make warning) in order to install the > gconv-module-s390 file from build-dir. > The iconvdata/Makefile provides another recipe, which copies the gconv-modules > file from src to build dir, which are used by the testcases. > Thus the testcases does not use the currently build s390-modules. > > This patch uses build-dir/iconvdata/gconv-modules for installation. > If makefile variable GCONV_MODULES is not defined, then gconv-modules file > is copied form source to build directory. > If an architecture wants to create his own gconv-modules file, then the variable > GCONV_MODULE is set to the name of the architecture-dependent gconv-modules file > in build-directory, which has to be created by a recipe in sysdeps/.../Makefile. > Then the iconvdata/Makefile copies this file to build-dir/iconvdata/gconv-modules, which will be used for installation and test. > > This way, the s390-Makefile does not need to override the recipe for gconv-modules and no warning is emitted anymore. > > ChangeLog: > > * iconvdata/Makefile (GCONV_MODULES): New variable, which can > be set by sysdeps Makefile. > ($(inst_gconvdir)/gconv-modules): > Install file from $(objpfx)gconv-modules. > ($(objpfx)gconv-modules): Copy File from src-dir or from > build-dir with file-name specified by GCONV_MODULES. > * sysdeps/s390/s390-64/Makefile ($(inst_gconvdir)/gconv-modules): > Deleted. > (GCONV_MODULES): New variable. > --- > iconvdata/Makefile | 15 +++++++++++++-- > sysdeps/s390/s390-64/Makefile | 17 ++--------------- > 2 files changed, 15 insertions(+), 17 deletions(-) > > diff --git a/iconvdata/Makefile b/iconvdata/Makefile > index 357530b..1ac1a5c 100644 > --- a/iconvdata/Makefile > +++ b/iconvdata/Makefile > @@ -244,7 +244,7 @@ headers: $(addprefix $(objpfx), $(generated-modules:=.h)) > $(addprefix $(inst_gconvdir)/, $(modules.so)): \ > $(inst_gconvdir)/%: $(objpfx)% $(+force) > $(do-install-program) > -$(inst_gconvdir)/gconv-modules: gconv-modules $(+force) > +$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules $(+force) > $(do-install) > ifeq (no,$(cross-compiling)) > # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary > @@ -332,6 +332,17 @@ tst-tables-clean: > -rm -f $(objpfx)tst-*.table $(objpfx)tst-EUC-TW.irreversible > > ifdef objpfx > +# Override GCONV_MODULES file name and provide a Makefile recipe, > +# if you want to create your own version. > +ifndef GCONV_MODULES > +# Copy gconv-modules from src-tree for tests and installation. > $(objpfx)gconv-modules: gconv-modules > - cp $^ $@ > + cp $< $@ > +else > +generated += $(GCONV_MODULES) > + > +# Copy overrided GCONV_MODULES file to gconv-modules for tests and installation. > +$(objpfx)gconv-modules: $(objpfx)$(GCONV_MODULES) > + cp $< $@ > +endif > endif > diff --git a/sysdeps/s390/s390-64/Makefile b/sysdeps/s390/s390-64/Makefile > index ce4f0c5..de249a7 100644 > --- a/sysdeps/s390/s390-64/Makefile > +++ b/sysdeps/s390/s390-64/Makefile > @@ -39,7 +39,7 @@ $(patsubst %, $(inst_gconvdir)/%.so, $(s390x-iconv-modules)) : \ > $(inst_gconvdir)/%.so: $(objpfx)%.so $(+force) > $(do-install-program) > > -$(objpfx)gconv-modules-s390: gconv-modules $(+force) > +$(objpfx)gconv-modules-s390: gconv-modules > cp $< $@ > echo >> $@ > echo "# S/390 hardware accelerated modules" >> $@ > @@ -74,19 +74,6 @@ $(objpfx)gconv-modules-s390: gconv-modules $(+force) > echo -n "module ISO-10646/UTF8/ UTF-16BE// " >> $@ > echo " UTF8_UTF16_Z9 1" >> $@ > > -$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules-s390 $(+force) > - $(do-install) > -ifeq (no,$(cross-compiling)) > -# Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary > -# if this libc has more gconv modules than the previously installed one. > - if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \ > - LC_ALL=C \ > - $(rtld-prefix) \ > - $(common-objpfx)iconv/iconvconfig \ > - $(addprefix --prefix=,$(install_root)); \ > - fi > -else > - @echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache' > -endif > +GCONV_MODULES = gconv-modules-s390 > > endif >
Ping. Is the new handling of gconv-modules in iconvdata/Makefile okay to commit? On 04/14/2016 04:16 PM, Stefan Liebler wrote: > Ping. Is the new handling of gconv-modules in iconvdata/Makefile okay to > commit? > > On 02/23/2016 10:21 AM, Stefan Liebler wrote: >> This patch introduces a way to provide an architecture dependent >> gconv-modules >> file. Before this patch, the gconv-modules file was normally installed >> from >> src-dir/iconvdata/gconv-modules. The S390 Makefile had overridden the >> installation recipe (with a make warning) in order to install the >> gconv-module-s390 file from build-dir. >> The iconvdata/Makefile provides another recipe, which copies the >> gconv-modules >> file from src to build dir, which are used by the testcases. >> Thus the testcases does not use the currently build s390-modules. >> >> This patch uses build-dir/iconvdata/gconv-modules for installation. >> If makefile variable GCONV_MODULES is not defined, then gconv-modules >> file >> is copied form source to build directory. >> If an architecture wants to create his own gconv-modules file, then >> the variable >> GCONV_MODULE is set to the name of the architecture-dependent >> gconv-modules file >> in build-directory, which has to be created by a recipe in >> sysdeps/.../Makefile. >> Then the iconvdata/Makefile copies this file to >> build-dir/iconvdata/gconv-modules, which will be used for installation >> and test. >> >> This way, the s390-Makefile does not need to override the recipe for >> gconv-modules and no warning is emitted anymore. >> >> ChangeLog: >> >> * iconvdata/Makefile (GCONV_MODULES): New variable, which can >> be set by sysdeps Makefile. >> ($(inst_gconvdir)/gconv-modules): >> Install file from $(objpfx)gconv-modules. >> ($(objpfx)gconv-modules): Copy File from src-dir or from >> build-dir with file-name specified by GCONV_MODULES. >> * sysdeps/s390/s390-64/Makefile ($(inst_gconvdir)/gconv-modules): >> Deleted. >> (GCONV_MODULES): New variable. >> --- >> iconvdata/Makefile | 15 +++++++++++++-- >> sysdeps/s390/s390-64/Makefile | 17 ++--------------- >> 2 files changed, 15 insertions(+), 17 deletions(-) >> >> diff --git a/iconvdata/Makefile b/iconvdata/Makefile >> index 357530b..1ac1a5c 100644 >> --- a/iconvdata/Makefile >> +++ b/iconvdata/Makefile >> @@ -244,7 +244,7 @@ headers: $(addprefix $(objpfx), >> $(generated-modules:=.h)) >> $(addprefix $(inst_gconvdir)/, $(modules.so)): \ >> $(inst_gconvdir)/%: $(objpfx)% $(+force) >> $(do-install-program) >> -$(inst_gconvdir)/gconv-modules: gconv-modules $(+force) >> +$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules $(+force) >> $(do-install) >> ifeq (no,$(cross-compiling)) >> # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is >> necessary >> @@ -332,6 +332,17 @@ tst-tables-clean: >> -rm -f $(objpfx)tst-*.table $(objpfx)tst-EUC-TW.irreversible >> >> ifdef objpfx >> +# Override GCONV_MODULES file name and provide a Makefile recipe, >> +# if you want to create your own version. >> +ifndef GCONV_MODULES >> +# Copy gconv-modules from src-tree for tests and installation. >> $(objpfx)gconv-modules: gconv-modules >> - cp $^ $@ >> + cp $< $@ >> +else >> +generated += $(GCONV_MODULES) >> + >> +# Copy overrided GCONV_MODULES file to gconv-modules for tests and >> installation. >> +$(objpfx)gconv-modules: $(objpfx)$(GCONV_MODULES) >> + cp $< $@ >> +endif >> endif >> diff --git a/sysdeps/s390/s390-64/Makefile >> b/sysdeps/s390/s390-64/Makefile >> index ce4f0c5..de249a7 100644 >> --- a/sysdeps/s390/s390-64/Makefile >> +++ b/sysdeps/s390/s390-64/Makefile >> @@ -39,7 +39,7 @@ $(patsubst %, $(inst_gconvdir)/%.so, >> $(s390x-iconv-modules)) : \ >> $(inst_gconvdir)/%.so: $(objpfx)%.so $(+force) >> $(do-install-program) >> >> -$(objpfx)gconv-modules-s390: gconv-modules $(+force) >> +$(objpfx)gconv-modules-s390: gconv-modules >> cp $< $@ >> echo >> $@ >> echo "# S/390 hardware accelerated modules" >> $@ >> @@ -74,19 +74,6 @@ $(objpfx)gconv-modules-s390: gconv-modules $(+force) >> echo -n "module ISO-10646/UTF8/ UTF-16BE// " >> $@ >> echo " UTF8_UTF16_Z9 1" >> $@ >> >> -$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules-s390 $(+force) >> - $(do-install) >> -ifeq (no,$(cross-compiling)) >> -# Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is >> necessary >> -# if this libc has more gconv modules than the previously installed one. >> - if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \ >> - LC_ALL=C \ >> - $(rtld-prefix) \ >> - $(common-objpfx)iconv/iconvconfig \ >> - $(addprefix --prefix=,$(install_root)); \ >> - fi >> -else >> - @echo '*@*@*@ You should recreate >> $(inst_gconvdir)/gconv-modules.cache' >> -endif >> +GCONV_MODULES = gconv-modules-s390 >> >> endif >> > >
Ping On 04/21/2016 04:55 PM, Stefan Liebler wrote: > Ping. Is the new handling of gconv-modules in iconvdata/Makefile okay to > commit? > > On 04/14/2016 04:16 PM, Stefan Liebler wrote: >> Ping. Is the new handling of gconv-modules in iconvdata/Makefile okay to >> commit? >> >> On 02/23/2016 10:21 AM, Stefan Liebler wrote: >>> This patch introduces a way to provide an architecture dependent >>> gconv-modules >>> file. Before this patch, the gconv-modules file was normally installed >>> from >>> src-dir/iconvdata/gconv-modules. The S390 Makefile had overridden the >>> installation recipe (with a make warning) in order to install the >>> gconv-module-s390 file from build-dir. >>> The iconvdata/Makefile provides another recipe, which copies the >>> gconv-modules >>> file from src to build dir, which are used by the testcases. >>> Thus the testcases does not use the currently build s390-modules. >>> >>> This patch uses build-dir/iconvdata/gconv-modules for installation. >>> If makefile variable GCONV_MODULES is not defined, then gconv-modules >>> file >>> is copied form source to build directory. >>> If an architecture wants to create his own gconv-modules file, then >>> the variable >>> GCONV_MODULE is set to the name of the architecture-dependent >>> gconv-modules file >>> in build-directory, which has to be created by a recipe in >>> sysdeps/.../Makefile. >>> Then the iconvdata/Makefile copies this file to >>> build-dir/iconvdata/gconv-modules, which will be used for installation >>> and test. >>> >>> This way, the s390-Makefile does not need to override the recipe for >>> gconv-modules and no warning is emitted anymore. >>> >>> ChangeLog: >>> >>> * iconvdata/Makefile (GCONV_MODULES): New variable, which can >>> be set by sysdeps Makefile. >>> ($(inst_gconvdir)/gconv-modules): >>> Install file from $(objpfx)gconv-modules. >>> ($(objpfx)gconv-modules): Copy File from src-dir or from >>> build-dir with file-name specified by GCONV_MODULES. >>> * sysdeps/s390/s390-64/Makefile ($(inst_gconvdir)/gconv-modules): >>> Deleted. >>> (GCONV_MODULES): New variable. >>> --- >>> iconvdata/Makefile | 15 +++++++++++++-- >>> sysdeps/s390/s390-64/Makefile | 17 ++--------------- >>> 2 files changed, 15 insertions(+), 17 deletions(-) >>> >>> diff --git a/iconvdata/Makefile b/iconvdata/Makefile >>> index 357530b..1ac1a5c 100644 >>> --- a/iconvdata/Makefile >>> +++ b/iconvdata/Makefile >>> @@ -244,7 +244,7 @@ headers: $(addprefix $(objpfx), >>> $(generated-modules:=.h)) >>> $(addprefix $(inst_gconvdir)/, $(modules.so)): \ >>> $(inst_gconvdir)/%: $(objpfx)% $(+force) >>> $(do-install-program) >>> -$(inst_gconvdir)/gconv-modules: gconv-modules $(+force) >>> +$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules $(+force) >>> $(do-install) >>> ifeq (no,$(cross-compiling)) >>> # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is >>> necessary >>> @@ -332,6 +332,17 @@ tst-tables-clean: >>> -rm -f $(objpfx)tst-*.table $(objpfx)tst-EUC-TW.irreversible >>> >>> ifdef objpfx >>> +# Override GCONV_MODULES file name and provide a Makefile recipe, >>> +# if you want to create your own version. >>> +ifndef GCONV_MODULES >>> +# Copy gconv-modules from src-tree for tests and installation. >>> $(objpfx)gconv-modules: gconv-modules >>> - cp $^ $@ >>> + cp $< $@ >>> +else >>> +generated += $(GCONV_MODULES) >>> + >>> +# Copy overrided GCONV_MODULES file to gconv-modules for tests and >>> installation. >>> +$(objpfx)gconv-modules: $(objpfx)$(GCONV_MODULES) >>> + cp $< $@ >>> +endif >>> endif >>> diff --git a/sysdeps/s390/s390-64/Makefile >>> b/sysdeps/s390/s390-64/Makefile >>> index ce4f0c5..de249a7 100644 >>> --- a/sysdeps/s390/s390-64/Makefile >>> +++ b/sysdeps/s390/s390-64/Makefile >>> @@ -39,7 +39,7 @@ $(patsubst %, $(inst_gconvdir)/%.so, >>> $(s390x-iconv-modules)) : \ >>> $(inst_gconvdir)/%.so: $(objpfx)%.so $(+force) >>> $(do-install-program) >>> >>> -$(objpfx)gconv-modules-s390: gconv-modules $(+force) >>> +$(objpfx)gconv-modules-s390: gconv-modules >>> cp $< $@ >>> echo >> $@ >>> echo "# S/390 hardware accelerated modules" >> $@ >>> @@ -74,19 +74,6 @@ $(objpfx)gconv-modules-s390: gconv-modules $(+force) >>> echo -n "module ISO-10646/UTF8/ UTF-16BE// " >> $@ >>> echo " UTF8_UTF16_Z9 1" >> $@ >>> >>> -$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules-s390 $(+force) >>> - $(do-install) >>> -ifeq (no,$(cross-compiling)) >>> -# Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is >>> necessary >>> -# if this libc has more gconv modules than the previously installed >>> one. >>> - if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \ >>> - LC_ALL=C \ >>> - $(rtld-prefix) \ >>> - $(common-objpfx)iconv/iconvconfig \ >>> - $(addprefix --prefix=,$(install_root)); \ >>> - fi >>> -else >>> - @echo '*@*@*@ You should recreate >>> $(inst_gconvdir)/gconv-modules.cache' >>> -endif >>> +GCONV_MODULES = gconv-modules-s390 >>> >>> endif >>> >> >> > >
ping. Is the new handling of gconv-modules in iconvdata/Makefile okay to commit? This prevents the make warning due to overriden recipe for gconv-modules. On 04/28/2016 08:50 AM, Stefan Liebler wrote: > Ping > > On 04/21/2016 04:55 PM, Stefan Liebler wrote: >> Ping. Is the new handling of gconv-modules in iconvdata/Makefile okay to >> commit? >> >> On 04/14/2016 04:16 PM, Stefan Liebler wrote: >>> Ping. Is the new handling of gconv-modules in iconvdata/Makefile okay to >>> commit? >>> >>> On 02/23/2016 10:21 AM, Stefan Liebler wrote: >>>> This patch introduces a way to provide an architecture dependent >>>> gconv-modules >>>> file. Before this patch, the gconv-modules file was normally installed >>>> from >>>> src-dir/iconvdata/gconv-modules. The S390 Makefile had overridden the >>>> installation recipe (with a make warning) in order to install the >>>> gconv-module-s390 file from build-dir. >>>> The iconvdata/Makefile provides another recipe, which copies the >>>> gconv-modules >>>> file from src to build dir, which are used by the testcases. >>>> Thus the testcases does not use the currently build s390-modules. >>>> >>>> This patch uses build-dir/iconvdata/gconv-modules for installation. >>>> If makefile variable GCONV_MODULES is not defined, then gconv-modules >>>> file >>>> is copied form source to build directory. >>>> If an architecture wants to create his own gconv-modules file, then >>>> the variable >>>> GCONV_MODULE is set to the name of the architecture-dependent >>>> gconv-modules file >>>> in build-directory, which has to be created by a recipe in >>>> sysdeps/.../Makefile. >>>> Then the iconvdata/Makefile copies this file to >>>> build-dir/iconvdata/gconv-modules, which will be used for installation >>>> and test. >>>> >>>> This way, the s390-Makefile does not need to override the recipe for >>>> gconv-modules and no warning is emitted anymore. >>>> >>>> ChangeLog: >>>> >>>> * iconvdata/Makefile (GCONV_MODULES): New variable, which can >>>> be set by sysdeps Makefile. >>>> ($(inst_gconvdir)/gconv-modules): >>>> Install file from $(objpfx)gconv-modules. >>>> ($(objpfx)gconv-modules): Copy File from src-dir or from >>>> build-dir with file-name specified by GCONV_MODULES. >>>> * sysdeps/s390/s390-64/Makefile ($(inst_gconvdir)/gconv-modules): >>>> Deleted. >>>> (GCONV_MODULES): New variable. >>>> --- >>>> iconvdata/Makefile | 15 +++++++++++++-- >>>> sysdeps/s390/s390-64/Makefile | 17 ++--------------- >>>> 2 files changed, 15 insertions(+), 17 deletions(-) >>>> >>>> diff --git a/iconvdata/Makefile b/iconvdata/Makefile >>>> index 357530b..1ac1a5c 100644 >>>> --- a/iconvdata/Makefile >>>> +++ b/iconvdata/Makefile >>>> @@ -244,7 +244,7 @@ headers: $(addprefix $(objpfx), >>>> $(generated-modules:=.h)) >>>> $(addprefix $(inst_gconvdir)/, $(modules.so)): \ >>>> $(inst_gconvdir)/%: $(objpfx)% $(+force) >>>> $(do-install-program) >>>> -$(inst_gconvdir)/gconv-modules: gconv-modules $(+force) >>>> +$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules $(+force) >>>> $(do-install) >>>> ifeq (no,$(cross-compiling)) >>>> # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is >>>> necessary >>>> @@ -332,6 +332,17 @@ tst-tables-clean: >>>> -rm -f $(objpfx)tst-*.table $(objpfx)tst-EUC-TW.irreversible >>>> >>>> ifdef objpfx >>>> +# Override GCONV_MODULES file name and provide a Makefile recipe, >>>> +# if you want to create your own version. >>>> +ifndef GCONV_MODULES >>>> +# Copy gconv-modules from src-tree for tests and installation. >>>> $(objpfx)gconv-modules: gconv-modules >>>> - cp $^ $@ >>>> + cp $< $@ >>>> +else >>>> +generated += $(GCONV_MODULES) >>>> + >>>> +# Copy overrided GCONV_MODULES file to gconv-modules for tests and >>>> installation. >>>> +$(objpfx)gconv-modules: $(objpfx)$(GCONV_MODULES) >>>> + cp $< $@ >>>> +endif >>>> endif >>>> diff --git a/sysdeps/s390/s390-64/Makefile >>>> b/sysdeps/s390/s390-64/Makefile >>>> index ce4f0c5..de249a7 100644 >>>> --- a/sysdeps/s390/s390-64/Makefile >>>> +++ b/sysdeps/s390/s390-64/Makefile >>>> @@ -39,7 +39,7 @@ $(patsubst %, $(inst_gconvdir)/%.so, >>>> $(s390x-iconv-modules)) : \ >>>> $(inst_gconvdir)/%.so: $(objpfx)%.so $(+force) >>>> $(do-install-program) >>>> >>>> -$(objpfx)gconv-modules-s390: gconv-modules $(+force) >>>> +$(objpfx)gconv-modules-s390: gconv-modules >>>> cp $< $@ >>>> echo >> $@ >>>> echo "# S/390 hardware accelerated modules" >> $@ >>>> @@ -74,19 +74,6 @@ $(objpfx)gconv-modules-s390: gconv-modules $(+force) >>>> echo -n "module ISO-10646/UTF8/ UTF-16BE// " >> $@ >>>> echo " UTF8_UTF16_Z9 1" >> $@ >>>> >>>> -$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules-s390 $(+force) >>>> - $(do-install) >>>> -ifeq (no,$(cross-compiling)) >>>> -# Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is >>>> necessary >>>> -# if this libc has more gconv modules than the previously installed >>>> one. >>>> - if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \ >>>> - LC_ALL=C \ >>>> - $(rtld-prefix) \ >>>> - $(common-objpfx)iconv/iconvconfig \ >>>> - $(addprefix --prefix=,$(install_root)); \ >>>> - fi >>>> -else >>>> - @echo '*@*@*@ You should recreate >>>> $(inst_gconvdir)/gconv-modules.cache' >>>> -endif >>>> +GCONV_MODULES = gconv-modules-s390 >>>> >>>> endif >>>> >>> >>> >> >> > >
Define a variable sysdep-gconv-modules that can be set by sysdeps/.../Makefile, and use it in iconvdata/Makefile to cat the files together. Please also fix the rule in sysdeps/s390/s390-64/Makefile to use a temporary file to make the update atomic. Since we no longer support empty objpfx the conditional test can be removed. Andreas.
On 05/04/2016 03:40 PM, Andreas Schwab wrote: > Define a variable sysdep-gconv-modules that can be set by > sysdeps/.../Makefile, and use it in iconvdata/Makefile to cat the files > together. Please also fix the rule in sysdeps/s390/s390-64/Makefile to > use a temporary file to make the update atomic. Since we no longer > support empty objpfx the conditional test can be removed. > > Andreas. > Okay. I will remove the objpfx conditional test in iconvdata/Makefile. I have to add the s390 specific modules before all the other ones in <source>/iconvdata/gconv-modules. (See my second patch: "S390: Mention s390-specific gconv-modues before common ones.") Thus simply concatenating would lead to something like that: " # GNU libc iconv configuration. # Copyright (C) 1997-2016 Free Software Foundation, Inc. #.... s390-specific modules # GNU libc iconv configuration. # Copyright (C) 1997-2016 Free Software Foundation, Inc. #.... common modules " This doesn't look very nice. Or is it okay? Then I would prefer to create a file <source>/sysdeps/s390/gconv-modules-s390 with the module-definitions, set the variable sysdep-gconv-modules and omit the rule with "cp, echo, echo ..." in sysdeps/s390/s390-64/Makefile at all. Bye Stefan
diff --git a/iconvdata/Makefile b/iconvdata/Makefile index 357530b..1ac1a5c 100644 --- a/iconvdata/Makefile +++ b/iconvdata/Makefile @@ -244,7 +244,7 @@ headers: $(addprefix $(objpfx), $(generated-modules:=.h)) $(addprefix $(inst_gconvdir)/, $(modules.so)): \ $(inst_gconvdir)/%: $(objpfx)% $(+force) $(do-install-program) -$(inst_gconvdir)/gconv-modules: gconv-modules $(+force) +$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules $(+force) $(do-install) ifeq (no,$(cross-compiling)) # Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary @@ -332,6 +332,17 @@ tst-tables-clean: -rm -f $(objpfx)tst-*.table $(objpfx)tst-EUC-TW.irreversible ifdef objpfx +# Override GCONV_MODULES file name and provide a Makefile recipe, +# if you want to create your own version. +ifndef GCONV_MODULES +# Copy gconv-modules from src-tree for tests and installation. $(objpfx)gconv-modules: gconv-modules - cp $^ $@ + cp $< $@ +else +generated += $(GCONV_MODULES) + +# Copy overrided GCONV_MODULES file to gconv-modules for tests and installation. +$(objpfx)gconv-modules: $(objpfx)$(GCONV_MODULES) + cp $< $@ +endif endif diff --git a/sysdeps/s390/s390-64/Makefile b/sysdeps/s390/s390-64/Makefile index ce4f0c5..de249a7 100644 --- a/sysdeps/s390/s390-64/Makefile +++ b/sysdeps/s390/s390-64/Makefile @@ -39,7 +39,7 @@ $(patsubst %, $(inst_gconvdir)/%.so, $(s390x-iconv-modules)) : \ $(inst_gconvdir)/%.so: $(objpfx)%.so $(+force) $(do-install-program) -$(objpfx)gconv-modules-s390: gconv-modules $(+force) +$(objpfx)gconv-modules-s390: gconv-modules cp $< $@ echo >> $@ echo "# S/390 hardware accelerated modules" >> $@ @@ -74,19 +74,6 @@ $(objpfx)gconv-modules-s390: gconv-modules $(+force) echo -n "module ISO-10646/UTF8/ UTF-16BE// " >> $@ echo " UTF8_UTF16_Z9 1" >> $@ -$(inst_gconvdir)/gconv-modules: $(objpfx)gconv-modules-s390 $(+force) - $(do-install) -ifeq (no,$(cross-compiling)) -# Update the $(prefix)/lib/gconv/gconv-modules.cache file. This is necessary -# if this libc has more gconv modules than the previously installed one. - if test -f "$(inst_gconvdir)/gconv-modules.cache"; then \ - LC_ALL=C \ - $(rtld-prefix) \ - $(common-objpfx)iconv/iconvconfig \ - $(addprefix --prefix=,$(install_root)); \ - fi -else - @echo '*@*@*@ You should recreate $(inst_gconvdir)/gconv-modules.cache' -endif +GCONV_MODULES = gconv-modules-s390 endif