Make: simplify locales whitelisting
authorYann E. MORIN <yann.morin.1998@free.fr>
Mon, 15 Jun 2020 11:16:43 +0000 (13:16 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Thu, 18 Jun 2020 20:15:36 +0000 (22:15 +0200)
Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Peter Korsgaard <peter@korsgaard.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Makefile

index ce1c08a6f6880d8825e1756b795751971852899d..04c29b1c7113d484a9a166a4f4205866775d5cb4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -695,8 +695,7 @@ LOCALE_NOPURGE = $(call qstrip,$(BR2_ENABLE_LOCALE_WHITELIST))
 # in the whitelist file. If it doesn't, kill it.
 # Finally, specifically for X11, regenerate locale.dir from the whitelist.
 define PURGE_LOCALES
-       rm -f $(LOCALE_WHITELIST)
-       for i in $(LOCALE_NOPURGE) locale-archive; do echo $$i >> $(LOCALE_WHITELIST); done
+       printf '%s\n' $(LOCALE_NOPURGE) locale-archive > $(LOCALE_WHITELIST)
 
        for dir in $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/lib/locale); \
        do \