Solution solicited
Posted in 1996
Topics: General Discussion
I have a problem in writing a shell program . Any suggestion/solution is most welcome. I have a make file like ------------------------- #LOADLIBS This contains the list of libraries LOADLIB := /a/b/lib1 a/b/lib2 \\ /a/c/lib3 \\ /a/d/lib4 #INCDIR This had a list of all INCDIR files in it. INCDIR := x/y/incdir1 /x/a/incdir2 \\ /y/d/incdir3 \\ /z/g/incdir4 #USES is the dependent etc ..... --------------------------------- The following is the portion of the shell script which gives the listing of all INCDIRs. But the prob is it does not list the listing in the next line. For example in the above example for INCDIR it prints only "x/y/incdir1" and "/x/a/incdir2" but ignores to print other INCDIRs in the next line. echo $line echo 'LIBRARY USED LIBRARY LOADED INCDIRS' echo $line #for INCDIRS for list in `grep INCDIRS Makefile | grep -v '#' | cut -d= -f2 |grep " \\"` do echo " $list" done echo echo 'C++ FILES ' echo $smallline ls -CF *.C echo echo 'C FILES ' echo $smallline ls -CF *.c echo echo 'LOCAL HEADER FILES ' echo $smallline ls -CF *.h cd $currentdir echo echo #echo $double_line fi I know what is the problem. But what I need is solution. There are hundreds of Makefiles and we desperately need a script to list all these. Thanx in advance. Jaminikant