home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
files
/
telecomm
/
nhclb120
/
mkdep
(
.txt
)
< prev
next >
Wrap
Microsoft Windows Help File Content
|
1993-09-26
|
741b
|
30 lines
# @(#) depend v1.0 Create a makefile of dependencies
# Author: Jeffrey Kegler
cpparg=
linelen=60 # desired length of dependency line
for arg in "$@"
case $arg in
-[CT] | -[UID]*) cpparg="$cpparg $arg"
esac
for source in "$@"
target=`expr "$source" : '\\(.*\\)\\.c$'`
if [ -n "$target" ]; then
target=`basename "$target"`
/lib/cpp $cpparg "$source" |
sed -n -e 's/ 1$//' -e 's/^# 1 "\(.*\)"/\1/p' |
awk '
BEGIN { deplist = "'$target.o:'" }
NR > 1 {
used++;
if (length(deplist "\t" $0) >= '$linelen') {
print deplist "\\"
deplist = "\t" $0
} else deplist = deplist "\t" $0
END {
if (used)
{
if (deplist != "") print deplist
print
}
exit 0