#!/bin/sh - # # $Id: chk.comma 7 2007-02-03 13:34:17Z gburd $ # # Look for trailing commas in declarations. Some compilers can't handle: # enum { # foo, # bar, # }; # Top-level directory. d=../.. # Path names are from a top-level directory. [ -f $d/README ] || { echo 'FAIL: cannot find source distribution directory.' exit 1 } if cc -g -Wall -I.. t.c -o t; then : else echo "FAIL: unable to compile test program t.c" exit 1 fi if ./t `find $d -name '*.[ch]' -o -name '*.in'` ; then : else echo "FAIL: test program failed, it found trailing commas" exit 1 fi exit 0