tests: correct print_ver_ arguments and add a rule to enforce this
[coreutils.git] / cfg.mk
blob9db8022165e2c992c32d1bfd368bff9427ae23a4
1 # Customize maint.mk -*- makefile -*-
2 # Copyright (C) 2003-2012 Free Software Foundation, Inc.
4 # This program is free software: you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation, either version 3 of the License, or
7 # (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details.
14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
17 # Used in maint.mk's web-manual rule
18 manual_title = Core GNU utilities
20 # Use the direct link. This is guaranteed to work immediately, while
21 # it can take a while for the faster mirror links to become usable.
22 url_dir_list = http://ftp.gnu.org/gnu/$(PACKAGE)
24 # Tests not to run as part of "make distcheck".
25 local-checks-to-skip = \
26 sc_texinfo_acronym
28 # Tools used to bootstrap this package, used for "announcement".
29 bootstrap-tools = autoconf,automake,gnulib,bison
31 # Now that we have better tests, make this the default.
32 export VERBOSE = yes
34 # Comparing tarball sizes compressed using different xz presets, we see that
35 # an -8e-compressed tarball is only 9KiB larger than the -9e-compressed one.
36 # Using -8e is preferred, since that lets the decompression process use half
37 # the memory (32MiB rather than 64MiB).
38 # $ for i in {7,8,9}{e,}; do \
39 # (n=$(xz -$i < coreutils-8.15*.tar|wc -c);echo $n $i) & done |sort -nr
40 # 5129388 7
41 # 5036524 7e
42 # 5017476 8
43 # 5010604 9
44 # 4923016 8e
45 # 4914152 9e
46 export XZ_OPT = -8e
48 old_NEWS_hash = a99128b9985b2e76bdcabf3e5d95ca1a
50 # Add an exemption for sc_makefile_at_at_check.
51 _makefile_at_at_check_exceptions = ' && !/^cu_install_program =/'
53 # Our help-version script is in a slightly different location.
54 _hv_file ?= $(srcdir)/tests/misc/help-version
56 # Ensure that the list of O_ symbols used to compute O_FULLBLOCK is complete.
57 dd = $(srcdir)/src/dd.c
58 sc_dd_O_FLAGS:
59 @rm -f $@.1 $@.2
60 @{ echo O_FULLBLOCK; echo O_NOCACHE; \
61 perl -nle '/^ +\| (O_\w*)$$/ and print $$1' $(dd); } | sort > $@.1
62 @{ echo O_NOFOLLOW; perl -nle '/{"[a-z]+",\s*(O_\w+)},/ and print $$1' \
63 $(dd); } | sort > $@.2
64 @diff -u $@.1 $@.2 || diff=1 || diff=; \
65 rm -f $@.1 $@.2; \
66 test "$$diff" \
67 && { echo '$(ME): $(dd) has inconsistent O_ flag lists'>&2; \
68 exit 1; } || :
70 # Ensure that dd's definition of LONGEST_SYMBOL stays in sync
71 # with the strings from the two affected variables.
72 dd_c = $(srcdir)/src/dd.c
73 sc_dd_max_sym_length:
74 ifneq ($(wildcard $(dd_c)),)
75 @len=$$( (sed -n '/conversions\[\] =$$/,/^};/p' $(dd_c);\
76 sed -n '/flags\[\] =$$/,/^};/p' $(dd_c) ) \
77 |sed -n '/"/s/^[^"]*"\([^"]*\)".*/\1/p' \
78 | wc --max-line-length); \
79 max=$$(sed -n '/^#define LONGEST_SYMBOL /s///p' $(dd_c) \
80 |tr -d '"' | wc --max-line-length); \
81 if test "$$len" = "$$max"; then :; else \
82 echo 'dd.c: LONGEST_SYMBOL is not longest' 1>&2; \
83 exit 1; \
85 endif
87 # Many m4 macros names once began with 'jm_'.
88 # On 2004-04-13, they were all changed to start with gl_ instead.
89 # Make sure that none are inadvertently reintroduced.
90 sc_prohibit_jm_in_m4:
91 @grep -nE 'jm_[A-Z]' \
92 $$($(VC_LIST) m4 |grep '\.m4$$'; echo /dev/null) && \
93 { echo '$(ME): do not use jm_ in m4 macro names' \
94 1>&2; exit 1; } || :
96 # Ensure that each root-requiring test is run via the "check-root" rule.
97 sc_root_tests:
98 @if test -d tests \
99 && grep check-root tests/Makefile.am>/dev/null 2>&1; then \
100 t1=sc-root.expected; t2=sc-root.actual; \
101 grep -nl '^ *require_root_$$' \
102 $$($(VC_LIST) tests) |sed s,tests/,, |sort > $$t1; \
103 sed -n '/^root_tests =[ ]*\\$$/,/[^\]$$/p' \
104 $(srcdir)/tests/Makefile.am \
105 | sed 's/^ *//;/^root_tests =/d' \
106 | tr -s '\012\\' ' ' | fmt -1 | sort > $$t2; \
107 diff -u $$t1 $$t2 || diff=1 || diff=; \
108 rm -f $$t1 $$t2; \
109 test "$$diff" \
110 && { echo 'tests/Makefile.am: missing check-root action'>&2; \
111 exit 1; } || :; \
114 # Create a list of regular expressions matching the names
115 # of files included from system.h. Exclude a couple.
116 .re-list:
117 @sed -n '/^# *include /s///p' $(srcdir)/src/system.h \
118 | grep -Ev 'sys/(param|file)\.h' \
119 | sed 's/ .*//;;s/^["<]/^# *include [<"]/;s/\.h[">]$$/\\.h[">]/' \
120 > $@-t
121 @mv $@-t $@
123 define gl_trap_
124 Exit () { set +e; (exit $$1); exit $$1; }; \
125 for sig in 1 2 3 13 15; do \
126 eval "trap 'Exit $$(expr $$sig + 128)' $$sig"; \
127 done
128 endef
130 # Files in src/ should not include directly any of
131 # the headers already included via system.h.
132 sc_system_h_headers: .re-list
133 @if test -f $(srcdir)/src/system.h; then \
134 trap 'rc=$$?; rm -f .re-list; exit $$rc' 0; \
135 $(gl_trap_); \
136 grep -nE -f .re-list \
137 $$($(VC_LIST_EXCEPT) | grep '^\($(srcdir)/\)\?src/') \
138 && { echo '$(ME): the above are already included via system.h'\
139 1>&2; exit 1; } || :; \
142 sc_sun_os_names:
143 @grep -nEi \
144 'solaris[^[:alnum:]]*2\.(7|8|9|[1-9][0-9])|sunos[^[:alnum:]][6-9]' \
145 $$($(VC_LIST_EXCEPT)) && \
146 { echo '$(ME): found misuse of Sun OS version numbers' 1>&2; \
147 exit 1; } || :
149 ALL_RECURSIVE_TARGETS += sc_check-AUTHORS
150 sc_check-AUTHORS:
151 @$(MAKE) -s -C src _sc_check-AUTHORS
153 # Look for lines longer than 80 characters, except omit:
154 # - program-generated long lines in diff headers,
155 # - tests involving long checksum lines, and
156 # - the 'pr' test cases.
157 LINE_LEN_MAX = 80
158 FILTER_LONG_LINES = \
159 /^[^:]*\.diff:[^:]*:@@ / d; \
160 \|^[^:]*tests/misc/sha[0-9]*sum[-:]| d; \
161 \|^[^:]*tests/pr/|{ \|^[^:]*tests/pr/pr-tests:| !d; };
162 sc_long_lines:
163 @files=$$($(VC_LIST_EXCEPT)) \
164 halt='line(s) with more than $(LINE_LEN_MAX) characters; reindent'; \
165 for file in $$files; do \
166 expand $$file | grep -nE '^.{$(LINE_LEN_MAX)}.' | \
167 sed -e "s|^|$$file:|" -e '$(FILTER_LONG_LINES)'; \
168 done | grep . && { msg="$$halt" $(_sc_say_and_exit) } || :
170 # Option descriptions should not start with a capital letter
171 # One could grep source directly as follows:
172 # grep -E " {2,6}-.*[^.] [A-Z][a-z]" $$($(VC_LIST_EXCEPT) | grep '\.c$$')
173 # but that would miss descriptions not on the same line as the -option.
174 ALL_RECURSIVE_TARGETS += sc_option_desc_uppercase
175 sc_option_desc_uppercase:
176 @$(MAKE) -s -C src all_programs
177 @$(MAKE) -s -C man $@
179 # Ensure all man/*.[1x] files are present
180 ALL_RECURSIVE_TARGETS += sc_man_file_correlation
181 sc_man_file_correlation:
182 @$(MAKE) -s -C src all_programs
183 @$(MAKE) -s -C man $@
185 # Ensure that the end of each release's section is marked by two empty lines.
186 sc_NEWS_two_empty_lines:
187 @sed -n 4,/Noteworthy/p $(srcdir)/NEWS \
188 | perl -n0e '/(^|\n)\n\n\* Noteworthy/ or exit 1' \
189 || { echo '$(ME): use two empty lines to separate NEWS sections' \
190 1>&2; exit 1; } || :
192 # Perl-based tests used to exec perl from a #!/bin/sh script.
193 # Now they all start with #!/usr/bin/perl and the portability
194 # infrastructure is in tests/Makefile.am. Make sure no old-style
195 # script sneaks back in.
196 sc_no_exec_perl_coreutils:
197 @if test -f $(srcdir)/tests/Coreutils.pm; then \
198 grep '^exec *\$$PERL.*MCoreutils' $$($(VC_LIST) tests) && \
199 { echo 1>&2 '$(ME): found anachronistic Perl-based tests'; \
200 exit 1; } || :; \
203 # With split lines, don't leave an operator at end of line.
204 # Instead, put it on the following line, where it is more apparent.
205 # Don't bother checking for "*" at end of line, since it provokes
206 # far too many false positives, matching constructs like "TYPE *".
207 # Similarly, omit "=" (initializers).
208 binop_re_ ?= [-/+^!<>]|[-/+*^!<>=]=|&&?|\|\|?|<<=?|>>=?
209 sc_prohibit_operator_at_end_of_line:
210 @prohibit='. ($(binop_re_))$$' \
211 in_vc_files='\.[chly]$$' \
212 halt='found operator at end of line' \
213 $(_sc_search_regexp)
215 # Don't use "readlink" or "readlinkat" directly
216 sc_prohibit_readlink:
217 @prohibit='\<readlink(at)? \(' \
218 halt='do not use readlink(at); use via xreadlink or areadlink*' \
219 $(_sc_search_regexp)
221 # Don't use address of "stat" or "lstat" functions
222 sc_prohibit_stat_macro_address:
223 @prohibit='\<l?stat '':|&l?stat\>' \
224 halt='stat() and lstat() may be function-like macros' \
225 $(_sc_search_regexp)
227 # Ensure that date's --help output stays in sync with the info
228 # documentation for GNU strftime. The only exception is %N,
229 # which date accepts but GNU strftime does not.
230 extract_char = sed 's/^[^%][^%]*%\(.\).*/\1/'
231 sc_strftime_check:
232 @if test -f $(srcdir)/src/date.c; then \
233 grep '^ %. ' $(srcdir)/src/date.c | sort \
234 | $(extract_char) > $@-src; \
235 { echo N; \
236 info libc date calendar format 2>/dev/null|grep '^ `%.'\'\
237 | $(extract_char); } | sort > $@-info; \
238 if test $$(stat --format %s $@-info) != 2; then \
239 diff -u $@-src $@-info || exit 1; \
240 else \
241 echo '$(ME): skipping $@: libc info not installed' 1>&2; \
242 fi; \
243 rm -f $@-src $@-info; \
246 # Indent only with spaces.
247 sc_prohibit_tab_based_indentation:
248 @prohibit='^ * ' \
249 halt='TAB in indentation; use only spaces' \
250 $(_sc_search_regexp)
252 # The SEE ALSO section of a man page should not be terminated with
253 # a period. Check the first line after each "SEE ALSO" line in man/*.x:
254 sc_prohibit_man_see_also_period:
255 @grep -nB1 '\.$$' $$($(VC_LIST_EXCEPT) | grep 'man/.*\.x$$') \
256 | grep -A1 -e '-\[SEE ALSO\]' | grep '\.$$' && \
257 { echo '$(ME): do not end "SEE ALSO" section with a period' \
258 1>&2; exit 1; } || :
260 # Don't use "indent-tabs-mode: nil" anymore. No longer needed.
261 sc_prohibit_emacs__indent_tabs_mode__setting:
262 @prohibit='^( *[*#] *)?indent-tabs-mode:' \
263 halt='use of emacs indent-tabs-mode: setting' \
264 $(_sc_search_regexp)
266 # Ensure that tests don't include a redundant fail=0.
267 sc_prohibit_fail_0:
268 @prohibit='\<fail=0\>' \
269 halt='fail=0 initialization' \
270 $(_sc_search_regexp)
272 # The mode part of a setfacl -m option argument must be three bytes long.
273 # I.e., an argument of user:bin:rw or user:bin:r will make Solaris 10's
274 # setfacl reject it with: "Unrecognized character found in mode field".
275 # Use hyphens to give it a length of 3: "...:rw-" or "...:r--".
276 sc_prohibit_short_facl_mode_spec:
277 @prohibit='\<setfacl .*-m.*:.*:[rwx-]{1,2} ' \
278 halt='setfacl mode string length < 3; extend with hyphen(s)' \
279 $(_sc_search_regexp)
281 # Ensure that "stdio--.h" is used where appropriate.
282 sc_require_stdio_safer:
283 @if $(VC_LIST_EXCEPT) | grep -l '\.[ch]$$' > /dev/null; then \
284 files=$$(grep -l '\bfreopen \?(' $$($(VC_LIST_EXCEPT) \
285 | grep '\.[ch]$$')); \
286 test -n "$$files" && grep -LE 'include "stdio--.h"' $$files \
287 | grep . && \
288 { echo '$(ME): the above files should use "stdio--.h"' \
289 1>&2; exit 1; } || :; \
290 else :; \
293 sc_prohibit_perl_hash_quotes:
294 @prohibit="\{'[A-Z_]+' *[=}]" \
295 halt="in Perl code, write \$$hash{KEY}, not \$$hash{'K''EY'}" \
296 $(_sc_search_regexp)
298 # Prefer xnanosleep over other less-precise sleep methods
299 sc_prohibit_sleep:
300 @prohibit='\<(nano|u)?sleep \(' \
301 halt='prefer xnanosleep over other sleep interfaces' \
302 $(_sc_search_regexp)
304 # Use print_ver_ (from init.cfg), not open-coded $VERBOSE check.
305 sc_prohibit_verbose_version:
306 @prohibit='test "\$$VERBOSE" = yes && .* --version' \
307 halt='use the print_ver_ function instead...' \
308 $(_sc_search_regexp)
310 # Use framework_failure_, not the old name without the trailing underscore.
311 sc_prohibit_framework_failure:
312 @prohibit='\<framework_''failure\>' \
313 halt='use framework_failure_ instead' \
314 $(_sc_search_regexp)
316 # Prohibit the use of `...` in tests/. Use $(...) instead.
317 sc_prohibit_test_backticks:
318 @prohibit='`' in_vc_files='^tests/' \
319 halt='use $$(...), not `...` in tests/' \
320 $(_sc_search_regexp)
322 # Programs like sort, ls, expr use PROG_FAILURE in place of EXIT_FAILURE.
323 # Others, use the EXIT_CANCELED, EXIT_ENOENT, etc. macros defined in system.h.
324 # In those programs, ensure that EXIT_FAILURE is not used by mistake.
325 sc_some_programs_must_avoid_exit_failure:
326 @grep -nw EXIT_FAILURE \
327 $$(git grep -El '[^T]_FAILURE|EXIT_CANCELED' src) \
328 | grep -vE '= EXIT_FAILURE|exit \(.* \?' | grep . \
329 && { echo '$(ME): do not use EXIT_FAILURE in the above' \
330 1>&2; exit 1; } || :
332 # Ensure that tests call the print_ver_ function for programs which are
333 # actually used in that test.
334 sc_prohibit_test_calls_print_ver_with_irrelevant_argument:
335 @git grep -w print_ver_ tests \
336 | sed 's#:print_ver_##' \
337 | { fail=0; \
338 while read file name; do \
339 for i in $$name; do \
340 case "$$i" in install) i=ginstall;; esac; \
341 grep -w "$$i" $$file|grep -vw print_ver_|grep -q . \
342 || { fail=1; \
343 echo "*** Test: $$file, offending: $$i." 1>&2; };\
344 done; \
345 done; \
346 test $$fail = 0 || exit 1; \
347 } || { echo "$(ME): the above test(s) call print_ver_ for" \
348 "program(s) they don't use" 1>&2; exit 1; }
350 # Exempt the contents of any usage function from the following.
351 _continued_string_col_1 = \
352 s/^usage .*?\n}//ms;/\\\n\w/ and print ("$$ARGV\n"),$$e=1;END{$$e||=0;exit $$e}
353 # Ding any source file that has a continued string with an alphabetic in the
354 # first column of the following line. We prohibit them because they usually
355 # trigger false positives in tools that try to map an arbitrary line number
356 # to the enclosing function name. Of course, very many strings do precisely
357 # this, *when they are part of the usage function*. That is why we exempt
358 # the contents of any function named "usage".
359 sc_prohibit_continued_string_alpha_in_column_1:
360 @perl -0777 -ne '$(_continued_string_col_1)' \
361 $$($(VC_LIST_EXCEPT) | grep '\.[ch]$$') \
362 || { echo '$(ME): continued string with word in first column' \
363 1>&2; exit 1; } || :
364 # Use this to list offending lines:
365 # git ls-files |grep '\.[ch]$' | xargs \
366 # perl -n -0777 -e 's/^usage.*?\n}//ms;/\\\n\w/ and print "$ARGV\n"' \
367 # | xargs grep -A1 '\\$'|grep '\.[ch][:-][_a-zA-Z]'
370 ###########################################################
371 _p0 = \([^"'/]\|"\([^\"]\|[\].\)*"\|'\([^\']\|[\].\)*'
372 _pre = $(_p0)\|[/][^"'/*]\|[/]"\([^\"]\|[\].\)*"\|[/]'\([^\']\|[\].\)*'\)*
373 _pre_anchored = ^\($(_pre)\)
374 _comment_and_close = [^*]\|[*][^/*]\)*[*][*]*/
375 # help font-lock mode: '
377 # A sed expression that removes ANSI C and ISO C99 comments.
378 # Derived from the one in GNU gettext's 'moopp' preprocessor.
379 _sed_remove_comments = \
380 /[/][/*]/{ \
381 ta; \
382 :a; \
383 s,$(_pre_anchored)//.*,\1,; \
384 te; \
385 s,$(_pre_anchored)/[*]\($(_comment_and_close),\1 ,; \
386 ta; \
387 /^$(_pre)[/][*]/{ \
388 s,$(_pre_anchored)/[*].*,\1 ,; \
389 tu; \
390 :u; \
391 n; \
392 s,^\($(_comment_and_close),,; \
393 tv; \
394 s,^.*$$,,; \
395 bu; \
396 :v; \
397 }; \
398 :e; \
400 # Quote all single quotes.
401 _sed_rm_comments_q = $(subst ','\'',$(_sed_remove_comments))
402 # help font-lock mode: '
404 _space_before_paren_exempt =? \\n\\$$
405 _space_before_paren_exempt = \
406 (^ *\#|\\n\\$$|%s\(to %s|(date|group|character)\(s\))
407 # Ensure that there is a space before each open parenthesis in C code.
408 sc_space_before_open_paren:
409 @if $(VC_LIST_EXCEPT) | grep -l '\.[ch]$$' > /dev/null; then \
410 fail=0; \
411 for c in $$($(VC_LIST_EXCEPT) | grep '\.[ch]$$'); do \
412 sed '$(_sed_rm_comments_q)' $$c 2>/dev/null \
413 | grep -i '[[:alnum:]](' \
414 | grep -vE '$(_space_before_paren_exempt)' \
415 | grep . && { fail=1; echo "*** $$c"; }; \
416 done; \
417 test $$fail = 1 && \
418 { echo '$(ME): the above files lack a space-before-open-paren' \
419 1>&2; exit 1; } || :; \
420 else :; \
423 # Similar to the gnulib maint.mk rule for sc_prohibit_strcmp
424 # Use STREQ_LEN or STRPREFIX rather than comparing strncmp == 0, or != 0.
425 sc_prohibit_strncmp:
426 @grep -nE '! *str''ncmp *\(|\<str''ncmp *\(.+\) *[!=]=' \
427 $$($(VC_LIST_EXCEPT)) \
428 | grep -vE ':# *define STR(N?EQ_LEN|PREFIX)\(' && \
429 { echo '$(ME): use STREQ_LEN or STRPREFIX instead of str''ncmp' \
430 1>&2; exit 1; } || :
432 # Enforce recommended preprocessor indentation style.
433 sc_preprocessor_indentation:
434 @if cppi --version >/dev/null 2>&1; then \
435 $(VC_LIST_EXCEPT) | grep '\.[ch]$$' | xargs cppi -a -c \
436 || { echo '$(ME): incorrect preprocessor indentation' 1>&2; \
437 exit 1; }; \
438 else \
439 echo '$(ME): skipping test $@: cppi not installed' 1>&2; \
442 # THANKS.in is a list of name/email pairs for people who are mentioned in
443 # commit logs (and generated ChangeLog), but who are not also listed as an
444 # author of a commit. Name/email pairs of commit authors are automatically
445 # extracted from the repository. As a very minor factorization, when
446 # someone who was initially listed only in THANKS.in later authors a commit,
447 # this rule detects that their pair may now be removed from THANKS.in.
448 sc_THANKS_in_duplicates:
449 @{ git log --pretty=format:%aN | sort -u; \
450 cut -b-36 THANKS.in | sed '/^$$/d;s/ *$$//'; } \
451 | sort | uniq -d | grep . \
452 && { echo '$(ME): remove the above names from THANKS.in' \
453 1>&2; exit 1; } || :
455 # Override the default Cc: used in generating an announcement.
456 announcement_Cc_ = $(translation_project_), \
457 coreutils@gnu.org, coreutils-announce@gnu.org
459 -include $(srcdir)/dist-check.mk
461 update-copyright-env = \
462 UPDATE_COPYRIGHT_FORCE=1 \
463 UPDATE_COPYRIGHT_USE_INTERVALS=2 \
464 UPDATE_COPYRIGHT_MAX_LINE_LENGTH=79
466 # List syntax-check exemptions.
467 exclude_file_name_regexp--sc_space_tab = \
468 ^(tests/pr/|tests/misc/nl$$|gl/.*\.diff$$)
469 exclude_file_name_regexp--sc_bindtextdomain = ^(gl/.*|lib/euidaccess-stat)\.c$$
470 exclude_file_name_regexp--sc_unmarked_diagnostics = ^build-aux/cvsu$$
471 exclude_file_name_regexp--sc_error_message_uppercase = ^build-aux/cvsu$$
472 exclude_file_name_regexp--sc_trailing_blank = ^tests/pr/
473 exclude_file_name_regexp--sc_system_h_headers = \
474 ^src/((system|copy)\.h|libstdbuf\.c)$$
476 _src = (false|lbracket|ls-(dir|ls|vdir)|tac-pipe|uname-(arch|uname))
477 exclude_file_name_regexp--sc_require_config_h_first = \
478 (^lib/buffer-lcm\.c|src/$(_src)\.c)$$
479 exclude_file_name_regexp--sc_require_config_h = \
480 $(exclude_file_name_regexp--sc_require_config_h_first)
482 exclude_file_name_regexp--sc_po_check = ^gl/
483 exclude_file_name_regexp--sc_prohibit_always-defined_macros = \
484 ^src/(seq|remove)\.c$$
485 exclude_file_name_regexp--sc_prohibit_empty_lines_at_EOF = ^tests/pr/
486 exclude_file_name_regexp--sc_program_name = ^(gl/.*|lib/euidaccess-stat)\.c$$
487 exclude_file_name_regexp--sc_file_system = \
488 NEWS|^(tests/init\.cfg|src/df\.c|tests/df/df-P)$$
489 exclude_file_name_regexp--sc_prohibit_always_true_header_tests = \
490 ^m4/stat-prog\.m4$$
491 exclude_file_name_regexp--sc_prohibit_fail_0 = \
492 (^.*/git-hooks/commit-msg|^tests/init\.sh|Makefile\.am|\.mk|.*\.texi)$$
493 exclude_file_name_regexp--sc_prohibit_atoi_atof = ^lib/euidaccess-stat\.c$$
495 tbi_1 = ^tests/pr/|(^gl/lib/reg.*\.c\.diff|Makefile(\.am)?|\.mk|^man/help2man)$$
496 tbi_2 = ^scripts/git-hooks/(pre-commit|pre-applypatch|applypatch-msg)$$
497 exclude_file_name_regexp--sc_prohibit_tab_based_indentation = \
498 $(tbi_1)|$(tbi_2)
500 exclude_file_name_regexp--sc_preprocessor_indentation = \
501 ^(gl/lib/rand-isaac\.[ch]|gl/tests/test-rand-isaac\.c)$$
502 exclude_file_name_regexp--sc_prohibit_stat_st_blocks = \
503 ^(src/system\.h|tests/du/2g)$$
505 exclude_file_name_regexp--sc_prohibit_continued_string_alpha_in_column_1 = \
506 ^src/(system\.h|od\.c|printf\.c)$$
508 exclude_file_name_regexp--sc_prohibit_test_backticks = \
509 ^tests/(init\.sh|check\.mk|misc/stdbuf)$$
511 # Exempt test.c, since it's nominally shared, and relatively static.
512 exclude_file_name_regexp--sc_prohibit_operator_at_end_of_line = \
513 ^src/(ptx|test|head)\.c$$