Skip to content

Commit 8e87328

Browse files
committed
also install the locales
1 parent 406df32 commit 8e87328

File tree

1 file changed

+28
-2
lines changed

1 file changed

+28
-2
lines changed

GNUmakefile

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ PROFILE ?= debug
55
MULTICALL ?= n
66
COMPLETIONS ?= y
77
MANPAGES ?= y
8+
LOCALES ?= y
89
INSTALL ?= install
910
ifneq (,$(filter install, $(MAKECMDGOALS)))
1011
override PROFILE:=release
@@ -300,7 +301,7 @@ else
300301
endif
301302
endif
302303

303-
build-coreutils:
304+
build-coreutils: locales
304305
${CARGO} build ${CARGOFLAGS} --features "${EXES} $(BUILD_SPEC_FEATURE)" ${PROFILE_CMD} --no-default-features
305306

306307
build: build-coreutils build-pkgs
@@ -396,7 +397,32 @@ else
396397
install-completions:
397398
endif
398399

399-
install: build install-manpages install-completions
400+
ifeq ($(LOCALES),y)
401+
locales:
402+
$(foreach prog, $(INSTALLEES), \
403+
if [ -d "$(BASEDIR)/src/uu/$(prog)/locales" ]; then \
404+
mkdir -p "$(BUILDDIR)/locales/$(prog)"; \
405+
for locale_file in "$(BASEDIR)"/src/uu/$(prog)/locales/*.ftl; do \
406+
$(INSTALL) -v "$$locale_file" "$(BUILDDIR)/locales/$(prog)/"; \
407+
done; \
408+
fi $(newline) \
409+
)
410+
411+
412+
install-locales:
413+
$(foreach prog, $(INSTALLEES), \
414+
if [ -d "$(BASEDIR)/src/uu/$(prog)/locales" ]; then \
415+
mkdir -p "$(DESTDIR)$(DATAROOTDIR)/locales/$(prog)"; \
416+
for locale_file in "$(BASEDIR)"/src/uu/$(prog)/locales/*.ftl; do \
417+
$(INSTALL) -v "$$locale_file" "$(DESTDIR)$(DATAROOTDIR)/locales/$(prog)/"; \
418+
done; \
419+
fi $(newline) \
420+
)
421+
else
422+
install-locales:
423+
endif
424+
425+
install: build install-manpages install-completions install-locales
400426
mkdir -p $(INSTALLDIR_BIN)
401427
ifeq (${MULTICALL}, y)
402428
$(INSTALL) $(BUILDDIR)/coreutils $(INSTALLDIR_BIN)/$(PROG_PREFIX)coreutils

0 commit comments

Comments
 (0)