Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!ucbvax!hplabs!pyramid!prls!flanner From: flanner@prls.UUCP (Philip D. Flanner III) Newsgroups: comp.lang.fortran Subject: Make dependencies for fortran Message-ID: <19720@prls.UUCP> Date: 6 Mar 89 05:20:56 GMT Reply-To: flanner@prls.UUCP (Philip D. Flanner III) Distribution: na Organization: Philips Research Labs, Sunnyvale, California Lines: 54 Someone recently asked for a program to generate make dependencies for fortran. Here's what I use -- it handles c or fortran. There are two files, one is a csh script (`mkdep') and one an awk script (`mkdep.awk'). Invoke mkdep like so: % mkdep *.f and a dependency list appears on stdout. Notes: You need to change the awk script file name in mkdep. You can substitute `fgrep' for `match'. mkdep ------------------------------------------ #!/bin/csh # #--- Make include dependencies # if ($#argv == 0) exit(0) if ($1:e == f) then match ' include' $argv | sed -e "s/include[ ]*'//;s/'//;s/f:/o:/" |\ sort -u +0 -1 +1 -2 | awk -f /b/flanner/Bin/mkdep.awk else match '#include' $argv | sed -e 's/#include[ ]*"//;s/"//;s/c:/o:/' \ -e '/