[libvirt] [PATCH 1/5] po: provide custom make rules for po file management

Daniel P. Berrangé berrange at redhat.com
Thu May 3 13:02:56 UTC 2018


On Thu, May 03, 2018 at 02:19:27PM +0200, Martin Kletzander wrote:
> On Thu, Apr 12, 2018 at 02:28:18PM +0100, Daniel P. Berrangé wrote:
> > Historically we have relied on autopoint/gettextize to install a
> > standard po/Makefile.in.in. There is very limited scope for customizing
> > this and it also causes a bunch of extra stuff to be pulled into
> > configure.ac which potentially clashes with gnulib. Writing make rules
> > for po file management is no more difficult than any other rules libvirt
> > has, so stop using autopoint/gettextize.
> > 
> > Signed-off-by: Daniel P. Berrangé <berrange at redhat.com>
> > ---
> > .gitignore                   |  6 +--
> > ABOUT-NLS                    |  1 +
> > autogen.sh                   |  3 +-
> > bootstrap.conf               | 38 -----------------
> > configure.ac                 | 33 +++------------
> > m4/virt-nls.m4               | 70 ++++++++++++++++++++++++++++++++
> > po/Makefile.am               | 97 ++++++++++++++++++++++++++++++++++++++++++++
> > po/{POTFILES.in => POTFILES} |  0
> > po/README.md                 | 36 ++++++++++++++++
> > src/internal.h               | 16 ++++----
> > src/libvirt-admin.c          |  2 +
> > src/libvirt.c                |  2 +
> > src/util/virgettext.c        |  3 +-
> > tools/virt-host-validate.c   |  4 +-
> > 14 files changed, 228 insertions(+), 83 deletions(-)
> > create mode 120000 ABOUT-NLS
> > create mode 100644 m4/virt-nls.m4
> > create mode 100644 po/Makefile.am
> > rename po/{POTFILES.in => POTFILES} (100%)
> > create mode 100644 po/README.md
> > 
> > diff --git a/configure.ac b/configure.ac
> > index ae798faa54..0aecf68c38 100644
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -732,33 +734,7 @@ if test "$enable_test_locking" = "yes"; then
> > fi
> > AM_CONDITIONAL([WITH_CIL],[test "$enable_test_locking" = "yes"])
> > 
> > -dnl Check for gettext - don't go any newer than what RHEL 5 supports
> > -dnl
> > -dnl save and restore CPPFLAGS around gettext check as the internal iconv
> > -dnl check might leave -I/usr/local/include in CPPFLAGS on FreeBSD resulting
> > -dnl in the build picking up previously installed libvirt/libvirt.h instead
> > -dnl of the correct one from the source tree.
> > -dnl compute the difference between save_CPPFLAGS and CPPFLAGS and append it
> > -dnl to INCLUDES in order to preserve changes made by gettext but in a place
> > -dnl that does not break the build
> > -save_CPPFLAGS="$CPPFLAGS"
> > -AM_GNU_GETTEXT_VERSION([0.17])
> > -AM_GNU_GETTEXT([external])
> > -GETTEXT_CPPFLAGS=
> > -if test "x$save_CPPFLAGS" != "x$CPPFLAGS"; then
> > - set dummy $CPPFLAGS; shift
> > - for var
> > - do
> > -   case " $var " in
> > -     " $save_CPPFLAGS ") ;;
> > -     *) GETTEXT_CPPFLAGS="$GETTEXT_CPPFLAGS $var" ;;
> > -   esac
> > - done
> > -fi
> > -CPPFLAGS="$save_CPPFLAGS"
> > -AC_SUBST([GETTEXT_CPPFLAGS])
> > -
> > -ALL_LINGUAS=`cd "$srcdir/po" > /dev/null && ls *.po | sed 's+\.po$++'`
> > +LIBVIRT_GETTEXT
> > 
> 
> This is defined nowhere and each configure now gives me anthe following error:
> 
>  ./configure: line 75099: LIBVIRT_GETTEXT: command not found
> 
> It does not fail the configure, however, so the build continues and that's
> probably why nobody noticed.  I'm not sure what this was supposed to do, but I'm
> not sure if we just want to remove it, so that's why I'm replying here.

Oh that's left over cruft. I changed to LIBVIRT_CHECK_NLS in the end

Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|




More information about the libvir-list mailing list