1#!/bin/sh 2# $Id: run_lint.sh,v 1.5 2022/11/06 20:56:42 tom Exp $ 3# vi:ts=4 sw=4: 4 5# run lint on each of the ".c" files in the test directory 6 7if test $# = 1 8then 9 PROG_DIR=`pwd` 10 TEST_DIR=$1 11else 12 PROG_DIR=.. 13 TEST_DIR=. 14fi 15 16: "${FGREP:=grep -F}" 17ifBTYACC=`$FGREP -l 'define YYBTYACC' config.h > /dev/null; test $? != 0; echo $?` 18 19if test "$ifBTYACC" = 0; then 20 REF_DIR=${TEST_DIR}/yacc 21else 22 REF_DIR=${TEST_DIR}/btyacc 23fi 24 25echo "** `date`" 26for i in ${REF_DIR}/*.c 27do 28 make -f $PROG_DIR/makefile lint C_FILES="$i" srcdir="$PROG_DIR" 29done 30