This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[patch v1] Install charmaps uncompressed in testroot
- From: DJ Delorie <dj at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Wed, 23 Oct 2019 18:36:34 -0400
- Subject: [patch v1] Install charmaps uncompressed in testroot
>From e3027d399f52f1a8bb74ef2fa3c360b396539342 Mon Sep 17 00:00:00 2001
From: DJ Delorie <dj@redhat.com>
Date: Wed, 23 Oct 2019 17:52:26 -0400
Subject: Install charmaps uncompressed in testroot
The testroot does not have a gunzip command, so the charmap files
should not be installed gzipped else they cannot be used (and thus
tested). With this patch, installing with INSTALL_UNCOMPRESSED=yes
installs uncompressed charmaps instead.
Note that we must purge the $(symbolic_link_list) as it contains
references to $(DESTDIR), which we change during the testroot
installation.
diff --git a/Makefile b/Makefile
index 0711b9725d..586437911a 100644
--- a/Makefile
+++ b/Makefile
@@ -580,8 +580,10 @@ ifeq ($(run-built-tests),yes)
$(test-wrapper) cp $$dso $(objpfx)testroot.pristine$$dso ;\
done
endif
+ rm -f $(symbolic_link_list)
$(MAKE) install DESTDIR=$(objpfx)testroot.pristine \
- subdirs='$(sorted-subdirs)'
+ INSTALL_UNCOMPRESSED=yes subdirs='$(sorted-subdirs)'
+ rm -f $(symbolic_link_list)
touch $(objpfx)testroot.pristine/install.stamp
tests-special-notdir = $(patsubst $(objpfx)%, %, $(tests-special))
diff --git a/localedata/Makefile b/localedata/Makefile
index 33e473a883..6c73e26df2 100644
--- a/localedata/Makefile
+++ b/localedata/Makefile
@@ -167,9 +167,15 @@ endif
endif
# Files to install.
+ifeq ($(INSTALL_UNCOMPRESSED),yes)
+install-others := $(addprefix $(inst_i18ndir)/, \
+ $(charmaps) \
+ $(locales))
+else
install-others := $(addprefix $(inst_i18ndir)/, \
$(addsuffix .gz, $(charmaps)) \
$(locales))
+endif
tests: $(objdir)/iconvdata/gconv-modules
@@ -283,12 +289,20 @@ endif
include ../Rules
+ifeq ($(INSTALL_UNCOMPRESSED),yes)
+# Install the charmap files as-is.
+$(inst_i18ndir)/charmaps/%: charmaps/% $(+force)
+ $(make-target-directory)
+ rm -f $@
+ $(INSTALL_DATA) $< $@
+else
# Install the charmap files in gzipped format.
$(inst_i18ndir)/charmaps/%.gz: charmaps/% $(+force)
$(make-target-directory)
rm -f $(@:.gz=) $@
$(INSTALL_DATA) $< $(@:.gz=)
gzip -9n $(@:.gz=)
+endif
# Install the locale source files in the appropriate directory.
$(inst_i18ndir)/locales/%: locales/% $(+force); $(do-install)