]> CyberLeo.Net >> Repos - FreeBSD/releng/10.2.git/blob - contrib/byacc/test/run_lint.sh
- Copy stable/10@285827 to releng/10.2 in preparation for 10.2-RC1
[FreeBSD/releng/10.2.git] / contrib / byacc / test / run_lint.sh
1 #!/bin/sh
2 # $Id: run_lint.sh,v 1.3 2014/03/28 23:40:27 tom Exp $
3 # vi:ts=4 sw=4:
4
5 # run lint on each of the ".c" files in the test directory
6
7 if test $# = 1
8 then
9         PROG_DIR=`pwd`
10         TEST_DIR=$1
11 else
12         PROG_DIR=..
13         TEST_DIR=.
14 fi
15
16 ifBTYACC=`fgrep -l 'define YYBTYACC' config.h > /dev/null; test $? != 0; echo $?`
17
18 if test $ifBTYACC = 0; then
19         REF_DIR=${TEST_DIR}/yacc
20 else
21         REF_DIR=${TEST_DIR}/btyacc
22 fi
23
24 echo '** '`date`
25 for i in ${REF_DIR}/*.c
26 do
27         make -f $PROG_DIR/makefile lint C_FILES=$i srcdir=$PROG_DIR
28 done