gfx/harfbuzz/src/check-includes.sh

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rwxr-xr-x

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 #!/bin/sh
     3 LC_ALL=C
     4 export LC_ALL
     6 test -z "$srcdir" && srcdir=.
     7 stat=0
     9 test "x$HBHEADERS" = x && HBHEADERS=`cd "$srcdir"; find . -maxdepth 1 -name 'hb*.h'`
    10 test "x$HBSOURCES" = x && HBSOURCES=`cd "$srcdir"; find . -maxdepth 1 -name 'hb-*.cc' -or -name 'hb-*.hh'`
    13 echo 'Checking that public header files #include "hb-common.h" or "hb.h" first (or none)'
    15 for x in $HBHEADERS; do
    16 	test -f "$srcdir/$x" && x="$srcdir/$x"
    17 	grep '#.*\<include\>' "$x" /dev/null | head -n 1
    18 done |
    19 grep -v '"hb-common[.]h"' |
    20 grep -v '"hb[.]h"' |
    21 grep -v 'hb-common[.]h:' |
    22 grep -v 'hb[.]h:' |
    23 grep . >&2 && stat=1
    26 echo 'Checking that source files #include "hb-*private.hh" first (or none)'
    28 for x in $HBSOURCES; do
    29 	test -f "$srcdir/$x" && x="$srcdir/$x"
    30 	grep '#.*\<include\>' "$x" /dev/null | head -n 1
    31 done |
    32 grep -v '"hb-.*private[.]hh"' |
    33 grep -v 'hb-private[.]hh:' |
    34 grep . >&2 && stat=1
    37 echo 'Checking that there is no #include <hb.*.h>'
    38 for x in $HBHEADERS $HBSOURCES; do
    39 	test -f "$srcdir/$x" && x="$srcdir/$x"
    40 	grep '#.*\<include\>.*<.*hb' "$x" /dev/null >&2 && stat=1
    41 done
    44 exit $stat

mercurial