1# 2# Copyright (c) 1983 Regents of the University of California. 3# All rights reserved. The Berkeley software License Agreement 4# specifies the terms and conditions for redistribution. 5# 6# @(#)Makefile 5.2 (Berkeley) 06/21/85 7# 8# Makefile for at, atq, atrm, and atrun 9# 10ALL= atq atrm at atrun 11SRCS= atq.c atrm.c at.c atrun.c 12CFLAGS= -O 13INCPATH= 14DESTDIR= 15ATRUNDIR= /usr/lib 16SPOOLDIRS= /usr/spool/at /usr/spool/at/past 17SPOOLFILES= /usr/spool/at/lasttimedone 18 19all: ${ALL} 20 21at: at.c 22 $(CC) $(CFLAGS) -o at at.c 23 24atq: atq.c 25 $(CC) $(CFLAGS) -o atq atq.c 26 27atrm: atrm.c 28 $(CC) $(CFLAGS) -o atrm atrm.c 29 30atrun: atrun.c 31 $(CC) $(CFLAGS) -o atrun atrun.c 32 33install: all 34 -mkdir $(SPOOLDIRS) 35 chown daemon $(SPOOLDIRS) 36 chgrp daemon $(SPOOLDIRS) 37 chmod 755 $(SPOOLDIRS) 38 for i in $(SPOOLFILES); do if [ ! -f $$i ]; then echo 0 > $$i; fi; done 39 chown daemon $(SPOOLFILES) 40 chgrp daemon $(SPOOLFILES) 41 install -s atrun $(ATRUNDIR) 42 install -s atq $(DESTDIR)/usr/bin 43 install -s -o daemon -m 4755 at $(DESTDIR)/usr/bin 44 install -s -o daemon -m 4755 atrm $(DESTDIR)/usr/bin 45 46clean: 47 rm -f $(ALL) errs *.o 48 49print: 50 lpr ${SRCS} 51 52depend: 53 cc -M ${INCPATH} ${SRCS} | \ 54 awk ' { if ($$1 != prev) { print rec; rec = $$0; prev = $$1; } \ 55 else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \ 56 else rec = rec " " $$2 } } \ 57 END { print rec } ' > makedep 58 echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep 59 echo '$$r makedep' >>eddep 60 echo 'w' >>eddep 61 cp Makefile Makefile.bak 62 ed - Makefile < eddep 63 rm eddep makedep 64 echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile 65 echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile 66 echo '# see make depend above' >> Makefile 67 68# DO NOT DELETE THIS LINE -- make depend uses it 69 70 71atq.o: atq.c /usr/include/stdio.h /usr/include/sys/types.h 72atq.o: /usr/include/sys/file.h /usr/include/sys/dir.h /usr/include/sys/stat.h 73atq.o: /usr/include/sys/time.h /usr/include/pwd.h /usr/include/ctype.h 74atrm.o: atrm.c /usr/include/stdio.h /usr/include/pwd.h /usr/include/ctype.h 75atrm.o: /usr/include/sys/types.h /usr/include/sys/dir.h /usr/include/sys/file.h 76atrm.o: /usr/include/sys/stat.h 77at.o: at.c /usr/include/stdio.h /usr/include/ctype.h /usr/include/signal.h 78at.o: /usr/include/sys/time.h /usr/include/sys/file.h 79atrun.o: atrun.c /usr/include/stdio.h /usr/include/sys/types.h 80atrun.o: /usr/include/sys/dir.h /usr/include/sys/file.h /usr/include/sys/time.h 81atrun.o: /usr/include/sys/stat.h /usr/include/pwd.h 82# DEPENDENCIES MUST END AT END OF FILE 83# IF YOU PUT STUFF HERE IT WILL GO AWAY 84# see make depend above 85