changeset 16322:7256be967b3a

maint.mk: use more readable (yet functionally equivalent) quoting It is common to quote a single quote in a single quoted string like this: '...'\''...'. Unless you know the idiom, that looks like gibberish, so prefer to double-quote the string when possible. Then you can use a more readable, lone single quote: "...'..." * top/maint.mk (sc_cast_of_argument_to_free): Quoting like this "don't" is more readable than the equivalent 'don'\''t'. (sc_cast_of_x_alloc_return_value): Likewise. (sc_cast_of_alloca_return_value): Likewise. (sc_makefile_path_separator_check): Similar: use ":" in '...', rather than '\'':'\''.
author Jim Meyering <meyering@redhat.com>
date Sat, 28 Jan 2012 10:16:25 +0100
parents 1031e29cf9ff
children 73e22dd042f1
files ChangeLog top/maint.mk
diffstat 2 files changed, 18 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2012-01-28  Jim Meyering  <meyering@redhat.com>
+
+	maint.mk: use more readable (yet functionally equivalent) quoting
+	It is common to quote a single quote in a single quoted string like
+	this:  '...'\''...'.  Unless you know the idiom, that looks like
+	gibberish, so prefer to double-quote the string when possible.
+	Then you can use a more readable, lone single quote: "...'..."
+	* top/maint.mk (sc_cast_of_argument_to_free): Quoting like this
+	"don't" is more readable than the equivalent 'don'\''t'.
+	(sc_cast_of_x_alloc_return_value): Likewise.
+	(sc_cast_of_alloca_return_value): Likewise.
+	(sc_makefile_path_separator_check): Similar: use ":" in '...',
+	rather than '\'':'\''.
+
 2012-01-27  Paul Eggert  <eggert@cs.ucla.edu>
 
 	stdalign: relax _Alignof and tighten _Alignas test
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -276,17 +276,17 @@
 	    exit 1; } || :
 
 sc_cast_of_argument_to_free:
-	@prohibit='\<free *\( *\(' halt='don'\''t cast free argument'	\
+	@prohibit='\<free *\( *\(' halt="don't cast free argument"	\
 	  $(_sc_search_regexp)
 
 sc_cast_of_x_alloc_return_value:
 	@prohibit='\*\) *x(m|c|re)alloc\>'				\
-	halt='don'\''t cast x*alloc return value'			\
+	halt="don't cast x*alloc return value"				\
 	  $(_sc_search_regexp)
 
 sc_cast_of_alloca_return_value:
 	@prohibit='\*\) *alloca\>'					\
-	halt='don'\''t cast alloca return value'			\
+	halt="don't cast alloca return value"				\
 	  $(_sc_search_regexp)
 
 sc_space_tab:
@@ -1079,7 +1079,7 @@
 # Sometimes it is useful to change the PATH environment variable
 # in Makefiles.  When doing so, it's better not to use the Unix-centric
 # path separator of ':', but rather the automake-provided '$(PATH_SEPARATOR)'.
-msg = '$(ME): Do not use '\'':'\'' above; use $$(PATH_SEPARATOR) instead'
+msg = '$(ME): Do not use ":" above; use $$(PATH_SEPARATOR) instead'
 sc_makefile_path_separator_check:
 	@prohibit='PATH[=].*:'						\
 	in_vc_files='akefile|\.mk$$'					\