- /bin/grep '^#[ ]*include' *.h \
- | sed '/<.*>/d' \
- | sed 's/\(.*\):[^"]*"\([^"]*\)".*/\1: \2/' >makedep
- /bin/grep '^#[ ]*include' *.c \
- | sed '/<.*>/d' \
- | sed 's/:[^"]*"\([^"]*\)".*/: \1/' \
- | sed 's/\.c/.o/' >>makedep
+ ls *.c | sed 's;^\([a-zA-Z0-9.]*\)\.c;\1.o: &;' >makedep
+ cd ${SRCDIR}; ls ${SRCSRC} | sed \
+ -e 's;^\([a-zA-Z0-9.]*\)\.c;\1.o: ${SRCDIR}/&;' \
+ >>${BINDIR}/makedep
+ /bin/grep '^#[ ]*include' *.h ${SRCDIR}/*.h | sed \
+ -e '/<.*>/d' \
+ -e 's;\(.*\):[^"]*"\([^"]*\)".*;\1: \2;' >>makedep
+ cd ${SRCDIR}; /bin/grep '^#[ ]*include' ${SRCSRC} | sed \
+ -e '/<.*>/d' \
+ -e 's;:[^"]*"\([^"]*\)".*;: ${SRCDIR}/\1;' \
+ -e 's;^\([a-zA-Z0-9.]*\)\.c;\1.o;' \
+ -e 's;: ${SRCDIR}/0.h;: 0.h;' \
+ -e 's;: ${SRCDIR}/whoami.h;: whoami.h;' \
+ -e 's;: ${SRCDIR}/opcode.h;: opcode.h;' >>${BINDIR}/makedep
+ /bin/grep '^#[ ]*include' *.c | sed \
+ -e '/<.*>/d' \
+ -e 's;:[^"]*"\([^"]*\)".*;: ${SRCDIR}/\1;' \
+ -e 's;^\([a-zA-Z0-9.]*\)\.c;\1.o;' \
+ -e 's;: ${SRCDIR}/0.h;: 0.h;' \
+ -e 's;: ${SRCDIR}/whoami.h;: whoami.h;' \
+ -e 's;: ${SRCDIR}/opcode.h;: opcode.h;' >>makedep