@@ -478,11 +478,13 @@ target-purgelocales:
for dir in $(wildcard $(addprefix $(TARGET_DIR),/usr/share/locale /usr/share/X11/locale /usr/man /usr/share/man)); \
do \
- for lang in $$(cd $$dir; ls .|grep -v man); \
+ (cd $$dir && rm -f locale.dir && \
+ for lang in $$(ls .|grep -v "man\|locale\.dir"); \
do \
- grep -qx $$lang $(LOCALE_WHITELIST) || rm -rf $$dir/$$lang; \
- done; \
- done
+ grep -qx $$lang $(LOCALE_WHITELIST) || rm -rf $$lang; \
+ [ ! -f $$lang/XLC_LOCALE ] || echo "$$lang/XLC_LOCALE: $$lang" >> locale.dir; \
+ done) \
+ done;
endif
ifneq ($(GENERATE_LOCALE),)
The /usr/share/X11/locale/locale.dir file is needed by libX11. Removing it breaks locale support in X11. However, make removes not only directories but also all files, which are not listed in the BR2_ENABLE_LOCALE_WHITELIST. This re-creates locale.dir database file where needed. Signed-off-by: Valentine Barshak <gvaxon@gmail.com> --- Makefile | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)