[libvirt PATCH 7/7] syntax-check: Introduce sc_linguas_sorting

Andrea Bolognani abologna at redhat.com
Tue May 17 08:32:17 UTC 2022


Make sure LINGUAS remains sorted correctly.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 build-aux/syntax-check.mk | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/build-aux/syntax-check.mk b/build-aux/syntax-check.mk
index e7aa2444bf..e8aea29d64 100644
--- a/build-aux/syntax-check.mk
+++ b/build-aux/syntax-check.mk
@@ -1513,6 +1513,14 @@ sc_pot_comments:
 	  exit 1; \
 	fi
 
+linguas_file = $(top_srcdir)/po/LINGUAS
+
+sc_linguas_sorting:
+	@sort -u $(linguas_file) > $@-1; \
+	diff -u -L $(linguas_file) -L $(linguas_file) $(linguas_file) $@-1 \
+	  || { echo "$(linguas_file) is not sorted correctly" 1>&2; exit 1; }; \
+	rm -f $@-1
+
 # #if WITH_... will evaluate to false for any non numeric string.
 # That would be flagged by using -Wundef, however gnulib currently
 # tests many undefined macros, and so we can't enable that option.
-- 
2.35.3



More information about the libvir-list mailing list