summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorPetr Spacek <pspacek@redhat.com>2016-11-14 14:53:42 +0100
committerMartin Basti <mbasti@redhat.com>2016-11-22 16:14:50 +0100
commit9ef5a7de781f2508c2925225533973417458d0ea (patch)
treed7e91759edf792c08b322a80a3465ba4d477050b /configure.ac
parent166257ec5b33dd2c95bbaf8463867c77fd6ef5db (diff)
downloadfreeipa-9ef5a7de781f2508c2925225533973417458d0ea.tar.gz
freeipa-9ef5a7de781f2508c2925225533973417458d0ea.tar.xz
freeipa-9ef5a7de781f2508c2925225533973417458d0ea.zip
Build: automatically generate list of files to be translated in configure
configure is easiest option how to automatically generate POTFILES.in. Attempts to add it to po/Makefile* have big potential to create cyclic depedencies and cause other trouble. Given how rare operation adding a source file is, I think it is sufficient to document that configure needs to be run again after adding a source file with translatable strings. https://fedorahosted.org/freeipa/ticket/6418 Reviewed-By: Martin Basti <mbasti@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com> Reviewed-By: Lukas Slebodnik <lslebodn@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac15
1 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 385836e0a..8b8f556f9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -283,6 +283,21 @@ AC_SUBST(IPA_SYSCONF_DIR)
dnl ---------------------------------------------------------------------------
dnl Translations
dnl ---------------------------------------------------------------------------
+# POTFILES.in needs to be created before calling AM_GNU_GETTEXT
+AC_CONFIG_COMMANDS([po/POTFILES.in],
+ [find_start_pwd=`pwd` && dnl
+ cd "${ac_abs_top_srcdir}" && dnl strip prefixes from find
+ find . dnl
+ -path "./rpmbuild" -prune -o dnl
+ -path "./${PACKAGE}-*" -prune -o dnl dist directories
+ -path '*/build' -prune -o dnl Python builds
+ -path '*/dist' -prune -o dnl Python dists
+ -path './conf*' -prune -o dnl generated by configure
+ -name '*.py' -print -o dnl
+ -name '*.c' -print -o dnl
+ -name '*.h' -print dnl
+ > po/POTFILES.in && dnl
+ cd "${find_start_pwd}"])
AC_SUBST(GETTEXT_DOMAIN, [ipa])
AM_GNU_GETTEXT_VERSION([0.19.8])
AM_GNU_GETTEXT([external])