(no message)
[unix-history] / usr / src / usr.bin / learn / Makefile
index d6f521d..f4cccb7 100644 (file)
@@ -1,62 +1,59 @@
-#      @(#)Makefile    4.2     (Berkeley)      83/04/25
+#      @(#)Makefile    4.2     (Berkeley)      83/04/26
 #
 DESTDIR=
 
 LESSONS = files editor morefiles macros eqn C
 
 FILES = lrnref.h \
 #
 DESTDIR=
 
 LESSONS = files editor morefiles macros eqn C
 
 FILES = lrnref.h \
-       copy.c dounit.c learn.c list.c \
+       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 \
        makpipe.c maktee.c mem.c mysys.c selsub.c selunit.c \
        start.c whatnow.c wrapup.c \
-       lcount.c tee.c \
+       lcount.c lrntee.c \
        makefile
 
        makefile
 
-OBJECTS = copy.o dounit.o learn.o list.o mem.o \
+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
 
 CFLAGS = -O
 LIBRARY =
        makpipe.o maktee.o mysys.o selsub.o selunit.o \
        start.o whatnow.o wrapup.o
 
 CFLAGS = -O
 LIBRARY =
-LLIB   = $(DESTDIR)/usr/lib/learn
+LLIB   = $(DESTDIR)/usr/lib/learn/bin
+
+all:   learn lrntee lcount
 
 
-all:   learn tee lcount
-       
 install:       all
        install -s learn $(DESTDIR)/usr/bin
 install:       all
        install -s learn $(DESTDIR)/usr/bin
-       install -s tee $(LLIB)
+       install -s learn $(LLIB)
+       install -s lrntee $(LLIB)
        install -s lcount $(LLIB)
        install -s lcount $(LLIB)
-       @echo "Then do 'make play; make log' to make playpen and log directories"
+
+ccinstall:     all
+       cp learn lrntee lcount $(LLIB)
+       chmod 755 $(LLIB)/*
+       strip $(LLIB)/*
 
 clean:
 
 clean:
-       rm -f *.o learn tee lcount errs
+       rm -f *.o learn lrntee lcount errs
 
 cmp:   all
 
 cmp:   all
-       cmp learn $(DESTDIR)/bin/learn
-       cmp tee $(LLIB)/tee
+       cmp learn $(DESTDIR)/usr/bin/learn
+       cmp learn $(LLIB)/learn
+       cmp lrntee $(LLIB)/lrntee
        cmp lcount $(LLIB)/lcount
        cmp lcount $(LLIB)/lcount
-       rm learn tee lcount *.o
+       rm learn lrntee lcount *.o
 
 learn: $(OBJECTS)
        cc -o learn $(CFLAGS) $(OBJECTS) $(LIBRARY)
 
 $(OBJECTS): lrnref.h
 
 
 learn: $(OBJECTS)
        cc -o learn $(CFLAGS) $(OBJECTS) $(LIBRARY)
 
 $(OBJECTS): lrnref.h
 
-lcount tee:
+lcount lrntee:
        cc $(CFLAGS) $@.c -o $@ $(LIBRARY)
 
        cc $(CFLAGS) $@.c -o $@ $(LIBRARY)
 
-lessons:       $(LESSONS)
-
-$(LESSONS):
-       -rm -r $(LLIB)/$@
-       mkdir $(LLIB)/$@
-       (cd $(LLIB)/$@; ar x ../$@.a)
-
-play log:
-       -rm -r $(LLIB)/$@; mkdir $(LLIB)/$@; chmod +w $(LLIB)/$@
+log:
+       -rm -r $(LLIB)/../log; mkdir $(LLIB)/../log; chmod +w $(LLIB)/../log
 
 check:
 
 check:
-       -@test -r $(LLIB)/tee || echo 'tee not present; make tee'
+       -@test -r $(LLIB)/lrntee || echo 'lrntee not present; make lrntee'
        -@test -r $(LLIB)/lcount || echo 'lcount not present; make lcount'
        -@test -r $(LLIB)/lcount || echo 'lcount not present; make lcount'
-       -@test -r $(LLIB)/play || echo 'play directory not present; make play'
-       -@test -r $(LLIB)/log || echo 'log directory not present; make log'
-       -@for i in $(LESSONS); do test -r $(LLIB)/$$i/L0 || echo $$i not unarchived, make $$i; done
+       -@test -r $(LLIB)/../log || echo 'log directory not present; make log if you want logging'