Fix update-translations make target for out-of-tree build
authorDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 11 Jun 2012 09:34:19 +0000 (10:34 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 11 Jun 2012 09:34:19 +0000 (10:34 +0100)
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Makefile.am

index 2ec872c..a07efd0 100644 (file)
@@ -91,10 +91,11 @@ tag: uncommitted-check
        @./autogen.sh
 
 update-translations:
-       @if ! git diff-index --name-only --exit-code HEAD -- po/; then \
-               echo "*** ERROR: Uncommitted changes in above files"; exit 1; fi
-       @tx pull -af
-       @git commit -s -m "Update translations from Transifex" -- po/
+       @cd $(top_srcdir); if ! git diff-index --name-only --exit-code HEAD -- po/; then \
+               echo "*** ERROR: Uncommitted changes in above files"; exit 1; \
+       else \
+               tx pull -af ; git commit -s -m "Update translations from Transifex" -- po/ ; \
+       fi
 
 upload-pot:
        @make -C po openconnect.pot && tx push -s