bug-gnulib
[Top][All Lists]
Advanced

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

[PATCH] maint.mk: avoid unexpanded \n in two diagnostics


From: Jim Meyering
Subject: [PATCH] maint.mk: avoid unexpanded \n in two diagnostics
Date: Sat, 18 Sep 2010 21:27:11 +0200

These \n's were appearing in diagnostics.
Here's the fix:

>From 882da58ae6f34b4637240739ae37a1b5efd39cf6 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Sat, 18 Sep 2010 21:26:27 +0200
Subject: [PATCH] maint.mk: avoid unexpanded \n in two diagnostics

* top/maint.mk (sc_prohibit_always_true_header_tests):
Don't use a literal \n in a halt=... assignment.  It would not be
expanded, and the two \n bytes would appear in the diagnostic output
rather than the desired newline.  Use halt=$$(printf ... instead.
(sc_vulnerable_makefile_CVE-2009-4029): Likewise.
---
 ChangeLog    |    9 +++++++++
 top/maint.mk |   12 +++++++-----
 2 files changed, 16 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index fb8d9f9..03f000f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2010-09-18  Jim Meyering  <address@hidden>
+
+       maint.mk: avoid unexpanded \n in two diagnostics
+       * top/maint.mk (sc_prohibit_always_true_header_tests):
+       Don't use a literal \n in a halt=... assignment.  It would not be
+       expanded, and the two \n bytes would appear in the diagnostic output
+       rather than the desired newline.  Use halt=$$(printf ... instead.
+       (sc_vulnerable_makefile_CVE-2009-4029): Likewise.
+
 2010-09-18  Bruno Haible  <address@hidden>

        netinet_in: Doc tweak.
diff --git a/top/maint.mk b/top/maint.mk
index 32320f8..55aeb7b 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -668,8 +668,9 @@ sc_prohibit_always_true_header_tests:
        @or=$(gl_header_upper_case_or_);                                \
        re="HAVE_($$or)_H";                                             \
        prohibit='\<'"$$re"'\>'                                         \
-       halt='do not test the above HAVE_<header>_H symbol(s);\n'\
-'  with the corresponding gnulib module, they are always true'         \
+       halt=$$(printf '%s\n'                                           \
+       'do not test the above HAVE_<header>_H symbol(s);'              \
+       '  with the corresponding gnulib module, they are always true') \
          $(_sc_search_regexp)

 # ==================================================================
@@ -1012,9 +1013,10 @@ sc_Wundef_boolean:
 sc_vulnerable_makefile_CVE-2009-4029:
        @prohibit='perm -777 -exec chmod a\+rwx|chmod 777 \$$\(distdir\)' \
        in_files=$$(find $(srcdir) -name Makefile.in)                   \
-       halt='the above files are vulnerable; beware of running\n'\
-'"make dist*" rules, and upgrade to fixed automake\n'\
-'see http://bugzilla.redhat.com/542609 for details'                    \
+       halt=$$(printf '%s\n'                                           \
+         'the above files are vulnerable; beware of running'           \
+         '  "make dist*" rules, and upgrade to fixed automake'         \
+         '  see http://bugzilla.redhat.com/542609 for details')        \
          $(_sc_search_regexp)

 vc-diff-check:
--
1.7.3.rc2.225.g4a2a



reply via email to

[Prev in Thread] Current Thread [Next in Thread]