1 ?RCS: $Id: contains.U 1 2006-08-24 12:32:52Z rmanfredi $
3 ?RCS: Copyright (c) 2020, Raphael Manfredi and Karl Williamson
5 ?RCS: You may redistribute only under the terms of the Artistic Licence,
6 ?RCS: as specified in the README file that comes with the distribution.
7 ?RCS: You may reuse parts of this distribution only within the terms of
8 ?RCS: that same Artistic Licence; a copy of which may be found at the root
9 ?RCS: of the source tree for dist 4.0.
11 ?MAKE:compiler_warning: contains grep osname
12 ?MAKE: -pick add $@ %<
14 ?S: This variable holds the command to check if the file specified as a
15 ?S: parameter contains a compiler warning
17 : See if a file contains compiler warnings
18 : See if a file contains compiler warnings
21 cat >compiler_warning <<EOSS
22 # Sample for aix ('.5' indicates the column number in the line):
23 # "op.h", line 203.5: 1506-159 (E) Bit field type specified for op_type
24 # Since the word 'warning' isn't present, use a fairly rigorous match of what
25 # warning messages look like
26 # " o p . h ", line 203 . 5 : 1506 - 159 ( E )
27 $grep -E "^\\"[A-Za-z][A-Za-z0-9_]*\.[ch]\\", line [1-9][0-9]*[.][1-9][0-9]*: [1-9][0-9]*-[1-9][0-9]* \([EW][)] " "\$1"
29 compiler_warning=./compiler_warning
30 chmod +x $compiler_warning
32 # Maybe a colon after the 'warning' would be appropriate
33 *) compiler_warning="$contains -i warning"