diff options
author | Jim Meyering <jim@meyering.net> | 2004-04-08 15:38:43 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2004-04-08 15:38:43 +0000 |
commit | 3469ae808543e31ab3bd77358fb87820d6d26e07 (patch) | |
tree | a57613e80f819c11d9f57eb29b5f04dc2654abbf | |
parent | d56fd78b428ff7affde8e9eac08c4956f8495f9b (diff) | |
download | coreutils-3469ae808543e31ab3bd77358fb87820d6d26e07.tar.xz |
(sc_dd_max_sym_length): New target.
(syntax-check-rules): Add it.
-rw-r--r-- | Makefile.maint | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile.maint b/Makefile.maint index efa14d1f2..44a93f9a7 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -70,6 +70,7 @@ syntax-check-rules = \ sc_cast_of_x_alloc_return_value \ sc_cast_of_alloca_return_value \ sc_changelog \ + sc_dd_max_sym_length \ sc_error_exit_success \ sc_prohibit_atoi_atof \ sc_space_tab \ @@ -149,6 +150,21 @@ sc_changelog: { echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \ exit 1; } || : +# Ensure that dd's definition of LONGEST_SYMBOL stays in sync +# with the strings from the two affected variables. +dd_c = $(srcdir)/src/dd.c +sc_dd_max_sym_length: + len=$$( (sed -n '/conversions\[\] =$$/,/^};/p' $(dd_c); \ + sed -n '/flags\[\] =$$/,/^};/p' $(dd_c) ) \ + |sed -n '/"/s/^[^"]*"\([^"]*\)".*/\1/p' \ + | wc --max-line-length); \ + max=$$(sed -n '/^#define LONGEST_SYMBOL /s///p' $(dd_c) \ + |tr -d '"' | wc --max-line-length); \ + if test "$$len" = "$$max"; then :; else \ + echo 'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \ + exit 1; \ + fi + header_regexp = \ alloca\ |closeout\ |