+if test "x$SRCDIR" = "x" ; then
+ files=$*
+else
+ files=
+ for i in $* ; do
+ if test -f $i ; then
+ files="$files $i"
+ elif test -f $SRCDIR/$i ; then
+ files="$files $SRCDIR/$i"
+ else
+ files="$files $i"
+ fi
+ done
+
+ MKDEP_CFLAGS="$MKDEP_CFLAGS -I$SRCDIR"
+fi
+
+cat << _EOF_ >> $TMP
+
+#
+# files: $*
+# command: $MKDEP_CC $MKDEP_CFLAGS $files
+#
+
+_EOF_
+
+$MKDEP_CC $MKDEP_CFLAGS $files | \
+ sed -e 's; \./; ;g' -e 's/ :/:/' | \
+ $SED > $TMP.sed
+# do not pipe to awk. SGI awk wants a filename as argument.
+# (or '-', but I do not know if all other awks support that.)