update from texinfo
[gnulib.git] / cfg.mk
1 # This file is used via the maint.mk-using rule in Makefile.
2
3 # This is a gnulib-specific rule to keep non-ascii characters
4 # from creeping into our .texi files.  There is nothing inherently
5 # wrong with e.g., UTF-8 characters in texinfo sources, but here,
6 # we had accumulated some non-ascii apostrophes and hyphens, and
7 # they were recently replaced with their ascii analogs.  This rule
8 # should help keep things consistent.
9 sc_keep_gnulib_texi_files_mostly_ascii:
10         @prohibit='[^][  a-zA-Z0-9'\''`~!\@#$$%^&*(){}=+";:,./<>?|\_-]' \
11         in_vc_files='\.texi$$'                                          \
12         halt='invalid bytes in gnulib .texi file'                       \
13           $(_sc_search_regexp)
14
15 local-checks-to-skip =                  \
16   sc_GFDL_version                       \
17   sc_GPL_version                        \
18   sc_bindtextdomain                     \
19   sc_cast_of_alloca_return_value        \
20   sc_cast_of_argument_to_free           \
21   sc_cast_of_x_alloc_return_value       \
22   sc_error_message_period               \
23   sc_error_message_uppercase            \
24   sc_immutable_NEWS                     \
25   sc_m4_quote_check                     \
26   sc_makefile_TAB_only_indentation      \
27   sc_makefile_at_at_check               \
28   sc_makefile_path_separator_check      \
29   sc_obsolete_symbols                   \
30   sc_program_name                       \
31   sc_prohibit_HAVE_MBRTOWC              \
32   sc_prohibit_S_IS_definition           \
33   sc_prohibit_always_true_header_tests  \
34   sc_prohibit_always-defined_macros     \
35   sc_prohibit_atoi_atof                 \
36   sc_prohibit_c_ctype_without_use       \
37   sc_prohibit_dirent_without_use        \
38   sc_prohibit_error_without_use         \
39   sc_prohibit_getopt_without_use        \
40   sc_prohibit_have_config_h             \
41   sc_prohibit_inttostr_without_use      \
42   sc_prohibit_magic_number_exit         \
43   sc_prohibit_path_max_allocation       \
44   sc_prohibit_reversed_compare_failure  \
45   sc_prohibit_safe_read_without_use     \
46   sc_prohibit_signal_without_use        \
47   sc_prohibit_stat_st_blocks            \
48   sc_prohibit_stddef_without_use        \
49   sc_prohibit_stdio--_without_use       \
50   sc_prohibit_strcmp                    \
51   sc_prohibit_strings_without_use       \
52   sc_prohibit_undesirable_word_seq      \
53   sc_prohibit_xalloc_without_use        \
54   sc_require_config_h                   \
55   sc_require_config_h_first             \
56   sc_space_tab                          \
57   sc_texinfo_acronym                    \
58   sc_two_space_separator_in_usage       \
59   sc_unmarked_diagnostics               \
60   sc_useless_cpp_parens
61
62 empty-at-EOF = /fr/LC_MESSAGES/test-quotearg\.mo$$|^doc/INSTALL(\.(ISO|UTF-8))?
63 exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = \
64   ^modules/|^lib/javaversion\.class$$|$(empty-at-EOF)
65 exclude_file_name_regexp--sc_prohibit_doubled_word = \
66   ^(tests/test-init\.sh|lib/base(32|64)\.c)$$
67 exclude_file_name_regexp--sc_prohibit_openat_without_use = ^lib/selinux-at\.c$$
68 exclude_file_name_regexp--sc_trailing_blank = \
69   ^(.*\.class|build-aux/texinfo\.tex|doc/Copyright/assign\.future\.manual)$$
70
71 # Disable strncpy prohibition completely, for now.
72 exclude_file_name_regexp--sc_prohibit_strncpy = .*
73
74 if_before_free_offenders_ =     \
75   clean-temp.c                  \
76   csharpcomp.c                  \
77   free.c                        \
78   fstrcmp.c                     \
79   gl_carray_list.c              \
80   glob.c                        \
81   glthread/lock.c               \
82   propername.c                  \
83   relocatable.c                 \
84   vasnprintf.c
85
86 if_before_free_basename_re_ = \
87   $(shell printf '%s\n' '$(if_before_free_offenders_)' \
88     |sed 's|\.c\>||g'|tr -s '[\n[:space:]]' '|')
89
90 exclude_file_name_regexp--sc_avoid_if_before_free = \
91   ^lib/($(if_before_free_basename_re_))\.c$$
92
93 exclude_file_name_regexp--sc_prohibit_defined_have_decl_tests = \
94   ^lib/((error|getopt|strtoimax)\.c|(argp-namefrob)\.h)$$