- cc ${CFLAGS} -o code code.c
-
-install: ${PROG} ${LIBS}
- install -s ${PROG} ${DESTDIR}/usr/bin/${PROG}
- -mkdir ${DESTDIR}/usr/lib/find
- install -s bigram ${DESTDIR}/usr/lib/find/bigram
- install -s code ${DESTDIR}/usr/lib/find/code
- install -c -m 755 updatedb.csh ${DESTDIR}/usr/lib/find/updatedb
-
-clean:
- rm -f a.out core ${LIBS} ${PROG}
-
-depend:
- cat </dev/null >x.c
- for i in ${SRCS}; do \
- (echo `basename $$i .c`.o: $$i >>makedep; \
- /bin/grep '^#[ ]*include' x.c $$i | sed \
- -e 's,<\(.*\)>,"/usr/include/\1",' \
- -e 's/:[^"]*"\([^"]*\)".*/: \1/' \
- -e 's/\.c/.o/' >>makedep); done
- echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
- echo '$$r makedep' >>eddep
- echo 'w' >>eddep
- cp Makefile Makefile.bak
- ed - Makefile < eddep
- rm eddep makedep x.c
- echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
- echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
- echo '# see make depend above' >> Makefile
-
-# DO NOT DELETE THIS LINE -- make depend uses it
-
-find.o: find.c
-find.o: /usr/include/stdio.h
-find.o: /usr/include/sys/param.h
-find.o: /usr/include/sys/dir.h
-find.o: /usr/include/sys/stat.h
-find.o: /usr/include/signal.h
-bigram.o: bigram.c
-bigram.o: /usr/include/stdio.h
-code.o: code.c
-code.o: /usr/include/stdio.h
-# DEPENDENCIES MUST END AT END OF FILE
-# IF YOU PUT STUFF HERE IT WILL GO AWAY
-# see make depend above
+ ${CC} ${CFLAGS} -o $@ code.c
+
+clean: FRC
+ rm -f ${OBJS} core find bigram code
+
+depend: FRC
+ mkdep -p ${CFLAGS} ${SRCS}
+
+install: FRC
+ install -s -o bin -g bin -m 755 find ${DESTDIR}/usr/bin/find
+ -[ -d ${DESTDIR}/usr/lib/find ] || mkdir ${DESTDIR}/usr/lib/find
+ install -s -o bin -g bin -m 755 bigram ${DESTDIR}/usr/lib/find/bigram
+ install -s -o bin -g bin -m 755 code ${DESTDIR}/usr/lib/find/code
+ install -c -o bin -g bin -m 755 updatedb.csh ${DESTDIR}/usr/lib/find/updatedb
+
+lint: FRC
+ lint ${CFLAGS} find.c
+ lint ${CFLAGS} bigram.c
+ lint ${CFLAGS} code.c
+
+tags: FRC
+ ctags find.c
+ ctags -a bigram.c
+ ctags -a code.c
+ sort -o tags tags
+
+FRC:
+
+# DO NOT DELETE THIS LINE -- mkdep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
+
+find: find.c /usr/include/stdio.h /usr/include/sys/param.h
+find: /usr/include/sys/types.h /usr/include/signal.h
+find: /usr/include/machine/trap.h /usr/include/machine/machparam.h
+find: /usr/include/machine/endian.h /usr/include/sys/dir.h
+find: /usr/include/sys/stat.h /usr/include/pwd.h /usr/include/grp.h
+find: /usr/include/utmp.h
+bigram: bigram.c /usr/include/stdio.h
+code: code.c /usr/include/stdio.h
+
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY