This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Merge pull request #79 from neilb/taintsupport
[metaconfig.git] / U / perl / compiler_warning.U
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
18 : See if a file contains compiler warnings
19 case "$osname" in
20   'aix')
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"
28 EOSS
29         compiler_warning=./compiler_warning
30         chmod +x $compiler_warning
31     ;;
32      # Maybe a colon after the 'warning' would be appropriate
33   *) compiler_warning="$contains -i warning"
34     ;;
35 esac
36