[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] maint.mk: let po check work in VPATH build
From: |
Eric Blake |
Subject: |
[PATCH] maint.mk: let po check work in VPATH build |
Date: |
Fri, 18 Mar 2011 15:34:52 -0600 |
* top/maint.mk (po_file): Allow cfg.mk override.
(sc_po_check): Allow VPATH use.
Reported by Jiri Denemark.
Signed-off-by: Eric Blake <address@hidden>
---
> I'll be pushing a patch shortly...
ChangeLog | 7 +++++++
top/maint.mk | 6 +++---
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 917e834..01544bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-03-18 Eric Blake <address@hidden>
+
+ maint.mk: let po check work in VPATH build
+ * top/maint.mk (po_file): Allow cfg.mk override.
+ (sc_po_check): Allow VPATH use.
+ Reported by Jiri Denemark.
+
2011-03-16 Jim Meyering <address@hidden>
maint.mk: allow fine-grained syntax-check exclusion via Make variables
diff --git a/top/maint.mk b/top/maint.mk
index 1df8c7a..6dde022 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -955,13 +955,13 @@ fix_po_file_diag = \
apply the above patch\n'
# Verify that all source files using _() are listed in po/POTFILES.in.
-po_file = po/POTFILES.in
+po_file ?= $(srcdir)/po/POTFILES.in
sc_po_check:
@if test -f $(po_file); then \
grep -E -v '^(#|$$)' $(po_file) \
| grep -v '^src/false\.c$$' | sort > address@hidden;
\
files=; \
- for file in $$($(VC_LIST_EXCEPT)) lib/*.[ch]; do \
+ for file in $$($(VC_LIST_EXCEPT)) $(srcdir)lib/*.[ch]; do \
test -r $$file || continue; \
case $$file in \
*.m4|*.mk) continue ;; \
@@ -976,7 +976,7 @@ sc_po_check:
files="$$files $$file"; \
done; \
grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \
- | sort -u > address@hidden;
\
+ | sort -u | sed 's|^$(_dot_escaped_srcdir)/||' > address@hidden;
\
diff -u -L $(po_file) -L $(po_file) address@hidden address@hidden
\
|| { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \
rm -f address@hidden address@hidden;
\
--
1.7.4