build: avoid locale-specific changes in generated, VC'd file
authorJim Meyering <jim@meyering.net>
Wed, 29 Jul 2009 12:16:03 +0000 (14:16 +0200)
committerRichard Jones <rjones@trick.home.annexia.org>
Wed, 29 Jul 2009 14:58:41 +0000 (15:58 +0100)
When I build with LC_ALL=C in my environment,
the all-local rule generates po/POTFILES.in that
is sorted differently from the on that is checked in:

    diff --git a/po/POTFILES.in b/po/POTFILES.in
    index ca01b3d..154915a 100644
    --- a/po/POTFILES.in
    +++ b/po/POTFILES.in
    @@ -63,12 +63,11 @@ fish/tilde.c
     fish/time.c
     inspector/virt-inspector.pl
     java/com_redhat_et_libguestfs_GuestFS.c
    -ocaml/guestfs_c_actions.c
     ocaml/guestfs_c.c
    +ocaml/guestfs_c_actions.c
     perl/bindtests.pl
    -perl/Guestfs.c
    -perl/lib/Sys/Guestfs/Lib.pm
     perl/lib/Sys/Guestfs.pm
    +perl/lib/Sys/Guestfs/Lib.pm
     python/guestfs-py.c
     ruby/ext/guestfs/_guestfs.c
     src/guestfs-actions.c

If we generate that file so that sort always uses the C locale, then,
this type of difference will not arise.  Here's the patch to fix the
rule as well as to reflect the change in the generated file:

>From 609e1d1840da25614a7c9e8954e5356050c9f2ad Mon Sep 17 00:00:00 2001
From: Jim Meyering <meyering@redhat.com>
Date: Wed, 29 Jul 2009 08:13:35 -0400
Subject: [PATCH] build: avoid locale-specific changes in generated, VC'd file

* Makefile.am (all-local): Use LC_ALL=C to sort in C locale.
* po/POTFILES.in: Regenerate.

Makefile.am
po/POTFILES.in

index f118291..3cba8bc 100644 (file)
@@ -165,7 +165,7 @@ all-local:
        grep -v 'examples/' | \
        grep -v '/guestfs_protocol.c' | \
        grep -v '/rc_protocol.c' | \
-       sort | \
+       LC_ALL=C sort | \
        sed 's,^\./,,' > po/POTFILES.in
 
 # Pkgconfig.
index ca01b3d..154915a 100644 (file)
@@ -63,12 +63,11 @@ fish/tilde.c
 fish/time.c
 inspector/virt-inspector.pl
 java/com_redhat_et_libguestfs_GuestFS.c
-ocaml/guestfs_c_actions.c
 ocaml/guestfs_c.c
+ocaml/guestfs_c_actions.c
 perl/bindtests.pl
-perl/Guestfs.c
-perl/lib/Sys/Guestfs/Lib.pm
 perl/lib/Sys/Guestfs.pm
+perl/lib/Sys/Guestfs/Lib.pm
 python/guestfs-py.c
 ruby/ext/guestfs/_guestfs.c
 src/guestfs-actions.c