xref: /original-bsd/usr.bin/at/at/Makefile (revision ebfe8106)
1#
2# Copyright (c) 1988 The Regents of the University of California.
3# All rights reserved.
4#
5# Redistribution and use in source and binary forms are permitted
6# provided that the above copyright notice and this paragraph are
7# duplicated in all such forms and that any documentation,
8# advertising materials, and other materials related to such
9# distribution and use acknowledge that the software was developed
10# by the University of California, Berkeley.  The name of the
11# University may not be used to endorse or promote products derived
12# from this software without specific prior written permission.
13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
15# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
16#
17#	@(#)Makefile	5.8 (Berkeley) 05/11/89
18#
19CFLAGS=	-O
20LIBC=	/lib/libc.a
21SRCS=	atq.c atrm.c at.c atrun.c
22OBJS=	atq.o atrm.o at.o atrun.o
23ATRUNDIR=	/usr/libexec
24SPOOLDIRS=	/usr/spool/at /usr/spool/at/past
25SPOOLFILES=	/usr/spool/at/lasttimedone
26MAN=	at.0 atq.0 atrm.0
27
28all: atq atrm at atrun
29
30at atq atrm atrun: ${LIBC}
31	${CC} ${CFLAGS} -o $@ $@.c
32
33clean:
34	rm -f ${OBJS} core atq atrm at atrun
35
36cleandir: clean
37	rm -f ${MAN} tags .depend
38
39depend: ${SRCS}
40	mkdep -p ${CFLAGS} ${SRCS}
41
42install: ${MAN}
43	-for i in ${SPOOLDIRS}; do \
44		mkdir ${DESTDIR}/$$i > /dev/null 2>&1; \
45		chown root ${DESTDIR}/$$i; \
46		chgrp daemon ${DESTDIR}/$$i; \
47		chmod 755 ${DESTDIR}/$$i; \
48	done
49	-for i in ${SPOOLFILES}; do \
50		if [ ! -f ${DESTDIR}/$$i ]; then \
51			echo 0 > ${DESTDIR}/$$i; \
52		fi; \
53		chown root ${DESTDIR}/$$i; \
54		chgrp daemon ${DESTDIR}/$$i; \
55	done
56	install -s -o bin -g bin -m 755 atrun ${DESTDIR}/${ATRUNDIR}
57	install -s -o root -g bin -m 4755 atq ${DESTDIR}/usr/bin
58	install -s -o root -g bin -m 4755 at ${DESTDIR}/usr/bin
59	install -s -o root -g bin -m 4755 atrm ${DESTDIR}/usr/bin
60	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
61
62lint: ${SRCS}
63	lint ${CFLAGS} atq.c
64	lint ${CFLAGS} atrm.c
65	lint ${CFLAGS} at.c
66	lint ${CFLAGS} atrun.c
67
68tags: ${SRCS}
69	ctags atq.c
70	ctags -a atrm.c
71	ctags -a at.c
72	ctags -a atrun.c
73	sort -o tags tags
74