Commit | Line | Data |
---|---|---|
b0d72a4a KW |
1 | ?RCS: $Id: contains.U 1 2006-08-24 12:32:52Z rmanfredi $ |
2 | ?RCS: | |
3 | ?RCS: Copyright (c) 2020, Raphael Manfredi and Karl Williamson | |
4 | ?RCS: | |
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. | |
10 | ?RCS: | |
11 | ?MAKE:compiler_warning: contains grep osname | |
12 | ?MAKE: -pick add $@ %< | |
13 | ?S:compiler_warning: | |
14 | ?S: This variable holds the command to check if the file specified as a | |
15 | ?S: parameter contains a compiler warning | |
16 | ?S:. | |
17 | : See if a file contains compiler warnings | |
b0d72a4a KW |
18 | case "$osname" in |
19 | 'aix') | |
20 | cat >compiler_warning <<EOSS | |
21 | # Sample for aix ('.5' indicates the column number in the line): | |
22 | # "op.h", line 203.5: 1506-159 (E) Bit field type specified for op_type | |
23 | # Since the word 'warning' isn't present, use a fairly rigorous match of what | |
24 | # warning messages look like | |
25 | # " o p . h ", line 203 . 5 : 1506 - 159 ( E ) | |
26 | $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" | |
27 | EOSS | |
28 | compiler_warning=./compiler_warning | |
29 | chmod +x $compiler_warning | |
30 | ;; | |
31 | # Maybe a colon after the 'warning' would be appropriate | |
32 | *) compiler_warning="$contains -i warning" | |
33 | ;; | |
34 | esac | |
35 |