summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-08-11 10:59:13 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-08-11 10:59:13 +0100
commite2cea5fc249272e38f9cd4b23faa7f44667b6525 (patch)
tree616c959e3d0fff692565a53343786dc2bee7d9b0
parent355e96bd64d12d41069914735f8c7bedb6ae60c0 (diff)
autotools: proper fix for generated Makevars and distcheck
Reverts 21da4a54545cd6871d1d888566ce9fe488afef67. It is needed to generate Makevars in-tree even when building out-of-tree because of how Autotools work. However, distcheck doesn't properly remove the Makevars file in the generated distdir and makes po/ read only, preventing the build system from generating an up-to-date version of Makevars. This commit adds the required hooks needed to fix this behavior.
-rw-r--r--Makefile.am11
-rw-r--r--configure.ac4
2 files changed, 12 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index 41a6bf3..3b5ea42 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -431,5 +431,14 @@ pkgbuild::
431clean-local: 431clean-local:
432 rm -rf benchmark coverage 432 rm -rf benchmark coverage
433 433
434# Makevars is generated in top source directory, even for out-of-tree
434distclean-local: 435distclean-local:
435 rm -f po/Makevars 436 rm -f $(top_srcdir)/po/Makevars
437
438# we need this to remove Makevars from dist
439dist-hook:
440 rm -f $(distdir)/po/Makevars
441
442# in dist tree po is read only, and we need to generate Makevars in there
443distcheck-hook:
444 chmod +w $(distdir)/po
diff --git a/configure.ac b/configure.ac
index 51ffe92..3fa2515 100644
--- a/configure.ac
+++ b/configure.ac
@@ -247,14 +247,14 @@ AM_GNU_GETTEXT_VERSION([0.17])
247m4_ifdef([AC_GNU_GETTEXT], [ 247m4_ifdef([AC_GNU_GETTEXT], [
248AC_GNU_GETTEXT([external]) 248AC_GNU_GETTEXT([external])
249po_makefile_in=po/Makefile.in 249po_makefile_in=po/Makefile.in
250po_makevars=po/Makevars 250po_makevars="${srcdir}/po/Makevars:po/Makevars.in"
251have_po="yes" 251have_po="yes"
252], 252],
253[ 253[
254m4_ifdef([AM_GNU_GETTEXT], [ 254m4_ifdef([AM_GNU_GETTEXT], [
255AM_GNU_GETTEXT([external]) 255AM_GNU_GETTEXT([external])
256po_makefile_in=po/Makefile.in 256po_makefile_in=po/Makefile.in
257po_makevars=po/Makevars 257po_makevars="${srcdir}/po/Makevars:po/Makevars.in"
258have_po="yes" 258have_po="yes"
259], 259],
260[ 260[