new template
authorKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 19 Jun 1987 09:06:36 +0000 (01:06 -0800)
committerKeith Bostic <bostic@ucbvax.Berkeley.EDU>
Fri, 19 Jun 1987 09:06:36 +0000 (01:06 -0800)
SCCS-vsn: usr.bin/find/Makefile 4.4
SCCS-vsn: usr.bin/graph/Makefile 4.3
SCCS-vsn: usr.bin/learn/Makefile 4.6
SCCS-vsn: old/lex/Makefile 4.3

usr/src/old/lex/Makefile
usr/src/usr.bin/find/Makefile
usr/src/usr.bin/graph/Makefile
usr/src/usr.bin/learn/Makefile

index 669e1b7..d998ff7 100644 (file)
@@ -1,32 +1,49 @@
-#      Makefile        4.2     87/05/31
 #
 #
-CFLAGS = -O
+# Copyright (c) 1987 Regents of the University of California.
+# All rights reserved.  The Berkeley software License Agreement
+# specifies the terms and conditions for redistribution.
+#
+#      @(#)Makefile    4.3     (Berkeley)      %G%
+#
+CFLAGS=        -O
+LIBC=  /lib/libc.a
+SRCS=  lmain.c parser.c sub1.c sub2.c header.c
+OBJS=  lmain.o parser.o sub1.o sub2.o header.o
 
 all: lex
 
 
 all: lex
 
-lex: lmain.o y.tab.o sub1.o sub2.o header.o
-       cc lmain.o y.tab.o sub1.o sub2.o header.o -o lex
+lex: ${OBJS} ${LIBC}
+       ${CC} ${CFLAGS} ${OBJS} -o $@
+
+smallex: ${SRCS} ${LIBC} FRC
+       ${CC} -DSMALL ${CFLAGS} ${SRCS} -o $@
+
+clean: FRC
+       rm -f ${OBJS} core lex smallex parser.c
+
+depend: ${SRCS} FRC
+       mkdep ${CFLAGS} ${SRCS}
+
+install: FRC
+       install -s -o bin -g bin -m 755 lex ${DESTDIR}/usr/bin/lex
+       install -c -o bin -g bin -m 755 ncform ${DESTDIR}/usr/lib/lex/ncform
+       install -c -o bin -g bin -m 755 nrform ${DESTDIR}/usr/lib/lex/nrform
+
+lint: ${SRCS} FRC
+       lint ${CFLAGS} ${SRCS}
 
 
-smallex:
-       cc -DSMALL -O lmain.c y.tab.c sub1.c sub2.c header.c -o smallex
+tags: ${SRCS} FRC
+       ctags ${SRCS}
 
 
-y.tab.c: parser.y
-       yacc parser.y
-lmain.o:lmain.c ldefs.c once.c
-       cc -c -O lmain.c
-sub1.o: sub1.c ldefs.c
-       cc -c -O sub1.c
-sub2.o: sub2.c ldefs.c
-       cc -c -O sub2.c
-header.o: header.c ldefs.c
-       cc -c -O header.c
+FRC:
 
 
-install: all
-       install -s lex $(DESTDIR)/usr/bin
-       install -c ncform $(DESTDIR)/usr/lib/lex
-       install -c nrform $(DESTDIR)/usr/lib/lex
+# DO NOT DELETE THIS LINE -- mkdep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
 
 
-clean:
-       rm -f *.o lex y.tab.c
+lmain.o: lmain.c ldefs.c /usr/include/stdio.h once.c
+parser.o: parser.c ldefs.c /usr/include/stdio.h
+sub1.o: sub1.c ldefs.c /usr/include/stdio.h
+sub2.o: sub2.c ldefs.c /usr/include/stdio.h
+header.o: header.c ldefs.c /usr/include/stdio.h
 
 
-depend:
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
index e30fbff..1fdf77c 100644 (file)
@@ -1,4 +1,4 @@
-#      @(#)Makefile    4.3     (Berkeley)      85/06/01
+#      @(#)Makefile    4.4     (Berkeley)      87/06/18
 #
 DESTDIR=
 CFLAGS=        -O
 #
 DESTDIR=
 CFLAGS=        -O
index 6c52ead..963c561 100644 (file)
@@ -1,15 +1,40 @@
-#      Makefile        4.2     87/05/31
 #
 #
-CFLAGS=-O
-DESTDIR=
+# Copyright (c) 1987 Regents of the University of California.
+# All rights reserved.  The Berkeley software License Agreement
+# specifies the terms and conditions for redistribution.
+#
+#      @(#)Makefile    4.3     (Berkeley)      %G%
+#
+CFLAGS=        -O
+LIBC=  /lib/libc.a
+SRCS=  graph.c
+OBJS=  graph.o
+
+all: graph
+
+graph: ${SRCS} ${LIBC}
+       ${CC} -o $@ ${CFLAGS} ${SRCS} -lplot -lm
+
+clean: FRC
+       rm -f ${OBJS} core graph
+
+depend: FRC
+       mkdep ${CFLAGS} ${SRCS}
+
+install: FRC
+       install -s -o bin -g bin -m 755 graph ${DESTDIR}/usr/bin/graph
+
+lint: FRC
+       lint ${CFLAGS} ${SRCS}
+
+tags: FRC
+       ctags ${SRCS}
 
 
-graph: graph.c
-       ${CC} $(CFLAGS) -o graph graph.c -lplot -lm
+FRC:
 
 
-install: graph
-       install -s graph ${DESTDIR}/usr/bin/graph
+# DO NOT DELETE THIS LINE -- mkdep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
 
 
-clean:
-       rm -f *.o graph
+graph.o: graph.c /usr/include/stdio.h /usr/include/ctype.h /usr/include/math.h
 
 
-depend:
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
index 364ed5b..1670d0b 100644 (file)
@@ -1,58 +1,75 @@
-#      @(#)Makefile    4.5     (Berkeley)      87/05/31
 #
 #
-DESTDIR=
-
-# The vi lessons come with the user-contributed software.
-LESSONS = files editor morefiles macros eqn C
+# Copyright (c) 1987 Regents of the University of California.
+# All rights reserved.  The Berkeley software License Agreement
+# specifies the terms and conditions for redistribution.
+#
+#      @(#)Makefile    4.6     (Berkeley)      %G%
+#
+# Flag BSD4_2 means 4.2 or later.
+CFLAGS=        -O -DBSD4_2
+LIBC=  /lib/libc.a
+LLIB=  ${DESTDIR}/usr/lib/learn/bin
+SRCS=  copy.c dounit.c getlesson.c learn.c list.c mem.c makpipe.c maktee.c \
+       mysys.c selsub.c selunit.c start.c whatnow.c wrapup.c
+OBJS=  copy.o dounit.o getlesson.o learn.o list.o mem.o makpipe.o maktee.o \
+       mysys.o selsub.o selunit.o start.o whatnow.o wrapup.o
 
 
-FILES = lrnref.h \
-       copy.c dounit.c getlesson.c learn.c list.c \
-       makpipe.c maktee.c mem.c mysys.c selsub.c selunit.c \
-       start.c whatnow.c wrapup.c \
-       lcount.c lrntee.c \
-       makefile
+all: learn lrntee lcount
 
 
-OBJECTS = copy.o dounit.o getlesson.o learn.o list.o mem.o \
-       makpipe.o maktee.o mysys.o selsub.o selunit.o \
-       start.o whatnow.o wrapup.o
+learn: ${OBJS} ${LIBC}
+       ${CC} -o $@ ${CFLAGS} ${OBJS}
 
 
-# Flag BSD4_2 means 4.2 or later.
-CFLAGS = -O -DBSD4_2
-LIBRARY =
-LLIB   = $(DESTDIR)/usr/lib/learn/bin
+lcount: lcount.c ${LIBC}
+       ${CC} ${CFLAGS} -o $@ lcount.c
 
 
-all:   learn lrntee lcount
+lrntee: lrntee.c ${LIBC}
+       ${CC} ${CFLAGS} -o $@ lrntee.c
 
 
-install:       all
-       install -c -s learn $(DESTDIR)/usr/bin
-       install -s learn $(LLIB)
-       install -s lrntee $(LLIB)
-       install -s lcount $(LLIB)
+clean: FRC
+       rm -f ${OBJS} core learn lrntee lcount
 
 
-clean:
-       rm -f *.o learn lrntee lcount errs
+depend: FRC
+       mkdep ${CFLAGS} ${SRCS} lcount.c lrntee.c
 
 
-cmp:   all
-       cmp learn $(DESTDIR)/usr/bin/learn
-       cmp learn $(LLIB)/learn
-       cmp lrntee $(LLIB)/lrntee
-       cmp lcount $(LLIB)/lcount
-       rm learn lrntee lcount *.o
+install: FRC
+       install -c -s -o bin -g bin -m 755 learn ${DESTDIR}/usr/bin/learn
+       install -s -o bin -g bin -m 755 learn ${LLIB}/learn
+       install -s -o bin -g bin -m 755 lrntee ${LLIB}/lrntee
+       install -s -o bin -g bin -m 755 lcount ${LLIB}/lcount
 
 
-learn: $(OBJECTS)
-       cc -o learn $(CFLAGS) $(OBJECTS) $(LIBRARY)
+lint: FRC
+       lint ${CFLAGS} ${SRCS}
+       lint ${CFLAGS} lcount.c
+       lint ${CFLAGS} lrntee.c
 
 
-$(OBJECTS): lrnref.h
+tags: FRC
+       ctags ${SRCS}
+       ctags -a lcount.c
+       ctags -a lrntee.c
+       sort -o tags tags
 
 
-lcount lrntee:
-       cc $(CFLAGS) $@.c -o $@ $(LIBRARY)
+FRC:
 
 
-log:
-       -rm -r $(LLIB)/../log; mkdir $(LLIB)/../log; chmod +w $(LLIB)/../log
+# DO NOT DELETE THIS LINE -- mkdep uses it.
+# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
 
 
-check:
-       -@test -r $(LLIB)/lrntee || echo 'lrntee not present; make lrntee'
-       -@test -r $(LLIB)/lcount || echo 'lcount not present; make lcount'
-       -@test -r $(LLIB)/../log || echo 'log directory not present; make log if you want logging'
+copy.o: copy.c /usr/include/stdio.h /usr/include/signal.h lrnref.h
+dounit.o: dounit.c /usr/include/stdio.h lrnref.h
+getlesson.o: getlesson.c /usr/include/stdio.h lrnref.h
+learn.o: learn.c /usr/include/stdio.h lrnref.h /usr/include/signal.h
+list.o: list.c /usr/include/stdio.h lrnref.h /usr/include/signal.h
+mem.o: mem.c /usr/include/stdio.h lrnref.h
+makpipe.o: makpipe.c /usr/include/stdio.h
+maktee.o: maktee.c /usr/include/stdio.h /usr/include/signal.h lrnref.h
+mysys.o: mysys.c /usr/include/stdio.h /usr/include/signal.h
+selsub.o: selsub.c /usr/include/stdio.h /usr/include/sys/types.h
+selsub.o: /usr/include/sys/stat.h lrnref.h /usr/include/sys/dir.h
+selunit.o: selunit.c /usr/include/stdio.h lrnref.h
+start.o: start.c /usr/include/stdio.h lrnref.h /usr/include/sys/types.h
+start.o: /usr/include/sys/dir.h
+whatnow.o: whatnow.c /usr/include/stdio.h lrnref.h
+wrapup.o: wrapup.c /usr/include/signal.h /usr/include/stdio.h lrnref.h
+lcount.o: lcount.c /usr/include/stdio.h
+lrntee.o: lrntee.c
 
 
-depend:
+# IF YOU PUT ANYTHING HERE IT WILL GO AWAY