[PATCH v2] Add a Makefile target to create a set of empty .po files.

Brian C. Lane bcl at redhat.com
Wed Mar 26 20:47:34 UTC 2014


On Wed, Mar 26, 2014 at 04:15:35PM -0400, David Shea wrote:
> This could be handy for certain test situations where the presence of
> translation files is necessary for a build but the content of them
> doesn't matter.
> 
> (after discussion on IRC, this one replaces the po-pull targets for scratch and
> scratch-bumpver, and does not overwrite files that already exist)
> ---
>  Makefile.am | 11 +++++++++--
>  1 file changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/Makefile.am b/Makefile.am
> index 724124f..37a05b5 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -55,11 +55,18 @@ po-pull:
>  	rpm -q transifex-client &>/dev/null || ( echo "need to run: yum install transifex-client"; exit 1 )
>  	tx pull $(TX_PULL_ARGS)
>  
> -scratch: po-pull
> +po-empty:
> +	for lingua in $$(grep -v '^#' $(srcdir)/po/LINGUAS) ; do \
> +		[ -f $(srcdir)/po/$$lingua.po ] || \
> +		msginit -i $(srcdir)/po/$(PACKAGE_NAME).pot -o $(srcdir)/po/$$lingua.po --no-translator || \
> +		exit 1 ; \
> +	done
> +
> +scratch: po-empty
>  	$(MAKE) ARCHIVE_TAG=HEAD dist
>  	git checkout -- $(srcdir)/po/$(PACKAGE_NAME).pot
>  
> -scratch-bumpver: po-pull
> +scratch-bumpver: po-empty
>  	@opts="-n $(PACKAGE_NAME) -v $(PACKAGE_VERSION) -r $(PACKAGE_RELEASE) -b $(PACKAGE_BUGREPORT)" ; \
>  	if [ ! -z "$(IGNORE)" ]; then \
>  		opts="$${opts} -i $(IGNORE)" ; \
> -- 
> 1.9.0

Ack

-- 
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)


More information about the anaconda-patches mailing list