diff --git a/Makefile.am b/Makefile.am index 41a6bf3ee9..3b5ea42697 100644 --- a/Makefile.am +++ b/Makefile.am @@ -431,5 +431,14 @@ pkgbuild:: clean-local: rm -rf benchmark coverage +# Makevars is generated in top source directory, even for out-of-tree distclean-local: - rm -f po/Makevars + rm -f $(top_srcdir)/po/Makevars + +# we need this to remove Makevars from dist +dist-hook: + rm -f $(distdir)/po/Makevars + +# in dist tree po is read only, and we need to generate Makevars in there +distcheck-hook: + chmod +w $(distdir)/po diff --git a/configure.ac b/configure.ac index 51ffe927f4..3fa2515006 100644 --- a/configure.ac +++ b/configure.ac @@ -247,14 +247,14 @@ AM_GNU_GETTEXT_VERSION([0.17]) m4_ifdef([AC_GNU_GETTEXT], [ AC_GNU_GETTEXT([external]) po_makefile_in=po/Makefile.in -po_makevars=po/Makevars +po_makevars="${srcdir}/po/Makevars:po/Makevars.in" have_po="yes" ], [ m4_ifdef([AM_GNU_GETTEXT], [ AM_GNU_GETTEXT([external]) po_makefile_in=po/Makefile.in -po_makevars=po/Makevars +po_makevars="${srcdir}/po/Makevars:po/Makevars.in" have_po="yes" ], [