source: tools/build/clean_hdr.awk @ 996c8ed

ADTast-experimental
Last change on this file since 996c8ed was c65a80b, checked in by Thierry Delisle <tdelisle@…>, 7 years ago

Added tools used for cleaning headers and timing builds

  • Property mode set to 100644
File size: 367 bytes
RevLine 
[c65a80b]1#!/usr/bin/awk -f
2
3BEGIN {
4        pattern = "^" path "[0-9A-z]*\\.(cc|h)"
5        complete_pattern = "^\\(" path "[0-9A-z]*\\.(cc|h)"
6        show = 0
7}
8
9$1 !~ /^(Makefile.*|Making.*|CXX)/ {
10        if( $1 ~ pattern ) {
11                show = 1
12        }
13
14        if( $1 ~ complete_pattern ) {
15                print
16        }
17
18        if( show > 0 )
19        {
20                print
21        }
22}
23
24$1 ~ /^---/ {
25        show = 0
26}
27
28$1 ~ /^CXX/ {
29        $1 = "  IWYU   "
30        print > "/dev/stderr"
31}
Note: See TracBrowser for help on using the repository browser.