]> git.ipfire.org Git - thirdparty/make.git/commitdiff
* po/Makevars, makeint.h, debug.h: Add xgettext C format flags.
authorPaul Smith <psmith@gnu.org>
Sat, 17 Dec 2016 18:16:22 +0000 (13:16 -0500)
committerPaul Smith <psmith@gnu.org>
Sun, 25 Dec 2016 23:18:45 +0000 (18:18 -0500)
debug.h
makeint.h
po/Makevars

diff --git a/debug.h b/debug.h
index 17c394bad3d891e0086ff84d5943da104a3e2211..291597505d915c6f27469c3b51fddf78b46902c4 100644 (file)
--- a/debug.h
+++ b/debug.h
@@ -27,6 +27,8 @@ extern int db_level;
 
 #define ISDB(_l)    ((_l)&db_level)
 
+/* When adding macros to this list be sure to update the value of
+   XGETTEXT_OPTIONS in the po/Makevars file.  */
 #define DBS(_l,_x)  do{ if(ISDB(_l)) {print_spaces (depth); \
                                       printf _x; fflush (stdout);} }while(0)
 
index 6d7df4bda312c734fc69b2f3a7448abb4e573aeb..5eb5cb8c758af36730c88aa1045a35e7122c5b90 100644 (file)
--- a/makeint.h
+++ b/makeint.h
@@ -485,6 +485,8 @@ void error (const floc *flocp, size_t length, const char *fmt, ...)
 void fatal (const floc *flocp, size_t length, const char *fmt, ...)
             __attribute__ ((noreturn, __format__ (__printf__, 3, 4)));
 
+/* When adding macros to this list be sure to update the value of
+   XGETTEXT_OPTIONS in the po/Makevars file.  */
 #define O(_t,_a,_f)           _t((_a), 0, (_f))
 #define OS(_t,_a,_f,_s)       _t((_a), strlen (_s), (_f), (_s))
 #define OSS(_t,_a,_f,_s1,_s2) _t((_a), strlen (_s1) + strlen (_s2), \
index ee018843a6947a8424dfdd1a13204b76908f4fe1..e32ea34b847ae62f90ade15218e62fb85493cad0 100644 (file)
@@ -26,7 +26,13 @@ subdir = po
 top_builddir = ..
 
 # These options get passed to xgettext.
-XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+# Ensure that all our magical output macros are correctly marked as
+# C (printf) format strings.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ \
+       --flag=DB:2:c-format --flag=DBF:2:c-format --flag=DBS:2:c-format \
+       --flag=O:3:c-format  --flag=OSN:3:c-format --flag=ONS:3:c-format \
+       --flag=OS:3:c-format --flag=OSS:3:c-format --flag=OSSS:3:c-format \
+       --flag=ON:3:c-format --flag=ONN:3:c-format
 
 # This is the copyright holder that gets inserted into the header of the
 # $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding