autotools: proper fix for generated Makevars and distcheck
Reverts 21da4a5454
.
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.
This commit is contained in:
parent
355e96bd64
commit
e2cea5fc24
11
Makefile.am
11
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
|
||||
|
|
|
@ -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"
|
||||
],
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue