I often find myself running lint in the following fashion:
lint -Idir-1 ... -Idir-n some-src.c
where a number of -Idirs should be coming from the make file.
Here is example:
$ cd dir1
$ grep ^CF makefile
CFLAGS = -g -I ../ver1/include
$ lint -I ../ver1/include sr1.c
then I go to another project
$ cd dir2
$ grep ^CF makefile
CFLAGS = -g -I /u/prod/ver1/include -I /u/prod/base1/include
$ lint -I /u/prod/ver1/include -I /u/prod/base1/include sr1.c
I am manualy cut/paste the -I parameters each time and I wander, is ther a way to automate it?
My working environment is ksh under Sys V type of Unix