X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=cfg.mk;h=5b9456bdef0c131c73c62391a8e0b577e03d8210;hb=refs%2Fheads%2Fupstream;hp=2b4bcc8de18bf350b47029f3395b4df549a0dd4a;hpb=cefe1f0bed9ec60cae847185869af8da8b35078a;p=gnulib.git diff --git a/cfg.mk b/cfg.mk index 2b4bcc8de..5b9456bde 100644 --- a/cfg.mk +++ b/cfg.mk @@ -1,9 +1,20 @@ # This file is used via the maint.mk-using rule in Makefile. +# This is a gnulib-specific rule to keep non-ascii characters +# from creeping into our .texi files. There is nothing inherently +# wrong with e.g., UTF-8 characters in texinfo sources, but here, +# we had accumulated some non-ascii apostrophes and hyphens, and +# they were recently replaced with their ascii analogs. This rule +# should help keep things consistent. +sc_keep_gnulib_texi_files_mostly_ascii: + @prohibit='[^][ a-zA-Z0-9'\''`~!\@#$$%^&*(){}=+";:,./<>?|\_-]' \ + in_vc_files='\.texi$$' \ + halt='invalid bytes in gnulib .texi file' \ + $(_sc_search_regexp) + local-checks-to-skip = \ sc_GFDL_version \ sc_GPL_version \ - sc_avoid_if_before_free \ sc_bindtextdomain \ sc_cast_of_alloca_return_value \ sc_cast_of_argument_to_free \ @@ -55,4 +66,29 @@ exclude_file_name_regexp--sc_prohibit_doubled_word = \ ^(tests/test-init\.sh|lib/base(32|64)\.c)$$ exclude_file_name_regexp--sc_prohibit_openat_without_use = ^lib/selinux-at\.c$$ exclude_file_name_regexp--sc_trailing_blank = \ - ^(build-aux/texinfo\.tex|doc/Copyright/assign\.future\.manual)$$ + ^(.*\.class|build-aux/texinfo\.tex|doc/Copyright/assign\.future\.manual)$$ + +# Disable strncpy prohibition completely, for now. +exclude_file_name_regexp--sc_prohibit_strncpy = .* + +if_before_free_offenders_ = \ + clean-temp.c \ + csharpcomp.c \ + free.c \ + fstrcmp.c \ + gl_carray_list.c \ + glob.c \ + glthread/lock.c \ + propername.c \ + relocatable.c \ + vasnprintf.c + +if_before_free_basename_re_ = \ + $(shell printf '%s\n' '$(if_before_free_offenders_)' \ + |sed 's|\.c\>||g'|tr -s '[\n[:space:]]' '|') + +exclude_file_name_regexp--sc_avoid_if_before_free = \ + ^lib/($(if_before_free_basename_re_))\.c$$ + +exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests = \ + ^lib/((error|getopt|strtoimax)\.c|(argp-namefrob)\.h)$$