[banshee] [build] Added package-po target to Makefile.am



commit 8d94ef2d565e828ce9eeef42503352bca75b90f9
Author: Aaron Bockover <abockover novell com>
Date:   Wed May 12 17:00:29 2010 -0400

    [build] Added package-po target to Makefile.am
    
    Like package-patch, this produces a tarball of full po files that have
    changed since the SINCE variable. We prefer to overlay po files instead
    of including them in a patch with code changes.

 Makefile.am |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index ae91fdb..ccb2f8a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -126,8 +126,10 @@ merge-docs:
 	make -C docs/Hyena merge; \
 	make -C docs/Banshee merge;
 
-package-patch:
+check-since:
 	@if [ -z '$(SINCE)' ]; then echo 'Specify a SINCE (e.g. make package-patch SINCE=1.6.0)'; exit 1; fi;
+
+package-patch: check-since
 	@if [ -f 'since-$(SINCE).patch' ]; then echo 'since-$(SINCE).patch already exists'; exit 1; fi;
 	@git diff-tree -p "$(SINCE).." | filterdiff \
 		-x 'a/Makefile.am' \
@@ -139,6 +141,16 @@ package-patch:
 		-x \*extras/\* &> 'since-$(SINCE).patch'
 	@echo 'since-$(SINCE).patch is ready'
 
+package-po: check-since
+	@if [ -f 'po-since-$(SINCE).tar.bz2' ]; then echo 'po-since-$(SINCE).tar.bz2 already exists'; exit 1; fi;
+	@git diff-tree -p '$(SINCE)..' po \
+		| awk -F / '{if ($$0 ~ /^+++ b\/po\/.+\.po$$/) print $$2 "/" $$3}' \
+		| xargs tar cfj po-since-$(SINCE).tar.bz2 2>/dev/null; \
+	if [ $$? -eq 123 ]; then \
+		echo 'No po changes since $(SINCE)'; \
+		exit 0; \
+	fi
+
 EXTRA_DIST = \
 	intltool-extract.in \
 	intltool-merge.in \



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]