From d42960ad354f4f50be001c0dc9d0f763df83212e Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Tue, 20 Jan 2015 22:04:05 +0100 Subject: [PATCH] configure: enable all languages when performing make distcheck In order to improve the amount of things that are checked by the make distcheck command, this patch enables support for I18N with all the languages that are supported. To achieve this, this patch adds the non-standard special case LINGUAS='*' which automatically enable all known languages. Signed-off-by: Christophe CURIS --- Makefile.am | 4 ++++ m4/wm_i18n.m4 | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/Makefile.am b/Makefile.am index 56be4db5..bd1db34e 100644 --- a/Makefile.am +++ b/Makefile.am @@ -26,6 +26,10 @@ config-paths.h: Makefile ACLOCAL_AMFLAGS = -I m4 +# Improve coverage in 'make distcheck' by checking that translations work +AM_DISTCHECK_CONFIGURE_FLAGS = --enable-silent-rules LINGUAS='*' + + SUBDIRS = wrlib WINGs src util po WindowMaker wmlib WPrefs.app doc DIST_SUBDIRS = $(SUBDIRS) test diff --git a/m4/wm_i18n.m4 b/m4/wm_i18n.m4 index 78224b64..e7f52f8d 100644 --- a/m4/wm_i18n.m4 +++ b/m4/wm_i18n.m4 @@ -36,6 +36,8 @@ AC_DEFUN_ONCE([WM_I18N_LANGUAGES], [AC_ARG_VAR([LINGUAS], [list of language translations to support (I18N), use 'list' to get the list of supported languages, default: none])dnl +AC_DEFUN([WM_ALL_LANGUAGES], + [m4_esyscmd([( ls WINGs/po/ ; ls po/ ; ls WPrefs.app/po/ ; ls util/po/ ) | sed -n -e '/po$/{s,\.po,,;p}' | sort -u | tr '\n' ' '])])dnl AS_IF([test "x$LINGUAS" != "x"], [wm_save_LIBS="$LIBS" AC_SEARCH_LIBS([gettext], [intl], [], @@ -62,6 +64,11 @@ AS_IF([test "x$LINGUAS" != "x"], wprefs_locales=" m4_esyscmd([ls WPrefs.app/po/ | sed -n '/po$/{s,.po,,;p}' | tr '\n' ' '])" util_locales=" m4_esyscmd([ls util/po/ | sed -n '/po$/{s,.po,,;p}' | tr '\n' ' '])" + # If the LINGUAS is specified as a simple '*', then we enable all the languages + # we know. This is not standard, but it is useful is some cases + AS_IF([test "x$LINGUAS" = "x*"], + [LINGUAS="WM_ALL_LANGUAGES"]) + # Check every language asked by user against these lists to know what to install for lang in $LINGUAS; do found=0