From 397ae74674698122b4696ac897e70de439a2d0c9 Mon Sep 17 00:00:00 2001 From: Hans Ulrich Niedermann Date: Thu, 9 Dec 2021 11:53:04 +0100 Subject: Add pull-translations target Add pull-translations target to make it easier to pull translations from the Translation Project: make pull-translations --- Makefile.am | 11 +++++++++++ RELEASE-HOWTO.md | 3 ++- configure.ac | 6 ++++++ 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/Makefile.am b/Makefile.am index 322491115..5071f33e6 100644 --- a/Makefile.am +++ b/Makefile.am @@ -98,6 +98,17 @@ git-checkout-po: done; \ fi +.PHONY: pull-translations +if HAVE_RSYNC +pull-translations: + $(RSYNC) -Lrtvz translationproject.org::tp/latest/libgphoto2/ $(top_srcdir)/po + $(RSYNC) -Lrtvz translationproject.org::tp/latest/libgphoto2_port/ $(top_srcdir)/libgphoto2_port/po +else +pull-translations: + echo "Error: Cannot pull translations: Could not find rsync at configure time." + exit 1 +endif + # Run "make update-po" in all po/ subdirs .PHONY: update-po update-po: diff --git a/RELEASE-HOWTO.md b/RELEASE-HOWTO.md index 5fe5bcde9..5045a16ce 100644 --- a/RELEASE-HOWTO.md +++ b/RELEASE-HOWTO.md @@ -8,7 +8,8 @@ ## sync translations from translationproject - In the toplevel directory (of which `po/` is a subdirectory) + Run `make pull-translations` or manually run in the toplevel + directory (of which `po/` is a subdirectory) rsync -Lrtvz translationproject.org::tp/latest/libgphoto2/ po rsync -Lrtvz translationproject.org::tp/latest/libgphoto2_port/ libgphoto2_port/po diff --git a/configure.ac b/configure.ac index 3a613c892..974a2938a 100644 --- a/configure.ac +++ b/configure.ac @@ -122,6 +122,12 @@ dnl compile when included into C++ source files. AM_CONDITIONAL([HAVE_CXX], [test "x$CXX" != "x" && test "x$CXX" != "xno"]) +dnl Not strictly necessary, but helps pulling translations. +AC_ARG_VAR([RSYNC], [rsync file copying command]) +AC_PATH_PROG([RSYNC], [rsync], [no]) +AM_CONDITIONAL([HAVE_RSYNC], [test "x$RSYNC" != xno]) + + dnl -------------------------------------------------------------------- dnl Determine the most pedantic compiler flags we can find for both dnl C and C++, so that we can test that the libgphoto2 headers compile -- cgit v1.2.1