1 | # $Header: /afs/dev.mit.edu/source/repository/athena/etc/newsyslog/Makefile.in,v 1.4 1996-05-23 04:59:18 ghudson Exp $ |
---|
2 | |
---|
3 | ### programs used in building/installing for Athena |
---|
4 | |
---|
5 | SHELL=/bin/sh |
---|
6 | |
---|
7 | CC=@CC@ |
---|
8 | LN_S=@LN_S@ |
---|
9 | |
---|
10 | INSTALL=install |
---|
11 | STRIP=strip |
---|
12 | MKDIRHIER=mkdirhier |
---|
13 | |
---|
14 | ### various flags |
---|
15 | |
---|
16 | DEFS=@DEFS@ |
---|
17 | LIBS=@LIBS@ |
---|
18 | |
---|
19 | # DEBUG=-DDEBUG -Wall |
---|
20 | |
---|
21 | CFLAGS=@CFLAGS@ $(DEBUG) $(DEFS) |
---|
22 | LDFLAGS=@LDFLAGS@ $(DEBUG) $(LIBS) |
---|
23 | |
---|
24 | ### release rules |
---|
25 | |
---|
26 | all: newsyslog |
---|
27 | |
---|
28 | newsyslog: newsyslog.o signames.o |
---|
29 | $(CC) newsyslog.o signames.o $(LDFLAGS) -o $@ |
---|
30 | |
---|
31 | install: |
---|
32 | -$(MKDIRHIER) $(DESTDIR)/etc/athena |
---|
33 | $(INSTALL) -m 755 newsyslog $(DESTDIR)/etc/athena |
---|
34 | -$(STRIP) $(DESTDIR)/etc/athena/newsyslog |
---|
35 | -$(MKDIRHIER) $(DESTDIR)/usr/athena/man/man8 |
---|
36 | -$(MKDIRHIER) $(DESTDIR)/usr/athena/man/man5 |
---|
37 | $(INSTALL) -m 644 newsyslog.8 $(DESTDIR)/usr/athena/man/man8 |
---|
38 | $(INSTALL) -m 644 newsyslog.conf.5 $(DESTDIR)/usr/athena/man/man5 |
---|
39 | |
---|
40 | clean: |
---|
41 | rm -f *~ *.o newsyslog sigd *.pure *.pcv |
---|
42 | |
---|
43 | ###### everything below should be irrelevant to the Athena release |
---|
44 | |
---|
45 | ### programs used only during development |
---|
46 | |
---|
47 | SYNCTREE=/usr/athena/etc/synctree |
---|
48 | NROFF=groff -Tascii |
---|
49 | LESS=less |
---|
50 | PURIFY=purify |
---|
51 | PURECOV=purecov |
---|
52 | GTOUCH=gtouch |
---|
53 | |
---|
54 | ROOT=/afs/zone.mit.edu/test/newsyslog |
---|
55 | |
---|
56 | ### development-only rules |
---|
57 | |
---|
58 | dev: sync bld |
---|
59 | |
---|
60 | # DECstations suck... |
---|
61 | sync: |
---|
62 | # if [ ! -d ${ROOT}/@sys ]; then exit -1; fi |
---|
63 | ${SYNCTREE} -s ${ROOT}/src -d ${ROOT}/@sys |
---|
64 | |
---|
65 | newsyslog.pure: newsyslog.o signames.o |
---|
66 | $(PURIFY) $(PURECOV) $(CC) $^ $(LDFLAGS) -o $@ |
---|
67 | |
---|
68 | sigd: sigd.o signames.o |
---|
69 | $(CC) $^ $(LDFLAGS) -o $@ |
---|
70 | |
---|
71 | ## manpage preview |
---|
72 | prev8: newsyslog.8 |
---|
73 | $(NROFF) -man $^ | $(LESS) |
---|
74 | prev5: newsyslog.conf.5 |
---|
75 | $(NROFF) -man $^ | $(LESS) |
---|
76 | |
---|
77 | ## tests (works with gmake only, so it's commented out) |
---|
78 | |
---|
79 | #! tests/0k: |
---|
80 | #! ${GTOUCH} $@ |
---|
81 | #! tests/%k: tests/LARGE |
---|
82 | #! dd if=$< of=$@ ibs=1024 count=$* |
---|
83 | #! tests/LARGE: |
---|
84 | #! rm -f $@ |
---|
85 | #! for i in /dev/zero /vmunix; do \ |
---|
86 | #! if [ -r "$$i" ]; then \ |
---|
87 | #! $(LN_S) "$$i" $@; \ |
---|
88 | #! break 2; \ |
---|
89 | #! fi \ |
---|
90 | #! done |
---|
91 | #! |
---|
92 | #! FORCE: |
---|
93 | #! tests/empty: |
---|
94 | #! |
---|
95 | #! tests/%.now: tests/% FORCE |
---|
96 | #! # rm -f $@ |
---|
97 | #! if [ -r $< ]; then cat $< >> $@; fi |
---|
98 | #! ${GTOUCH} -d now $@ |
---|
99 | #! tests/%.yesterday: tests/% FORCE |
---|
100 | #! # rm -f $@ |
---|
101 | #! if [ -r $< ]; then cat $< >> $@; fi |
---|
102 | #! ${GTOUCH} -d yesterday $@ |
---|
103 | #! |
---|
104 | #! .PHONY: test-files test-clean |
---|
105 | #! |
---|
106 | #! FILES.empty= tests/empty.now tests/empty.yesterday |
---|
107 | #! FILES.0k= tests/0k.now # tests/1k.yesterday |
---|
108 | #! FILES.1k= tests/1k.now # tests/1k.yesterday |
---|
109 | #! FILES.2k= tests/2k.now # tests/2k.yesterday |
---|
110 | #! ALL_FILES=${FILES.0k} ${FILES.1k} |
---|
111 | #! |
---|
112 | #! test-files: ${ALL_FILES} |
---|
113 | #! |
---|
114 | #! test-clean: |
---|
115 | #! rm -f tests/* |
---|
116 | #! |
---|
117 | #! test: test-files |
---|
118 | #! ./run_sigd 1 USR1 HUP ${ALL_FILES} & |
---|
119 | #! ./run_sigd 2 USR2 HUP ${ALL_FILES} & |
---|
120 | #! ./newsyslog -vvrf test.conf -t 5 |
---|
121 | #! kill -HUP `cat tests/sigd1.pid tests/sigd2.pid` |
---|
122 | #! |
---|
123 | #! mock-test: |
---|
124 | #! ./newsyslog -nvvvrf test.conf |
---|
125 | #! |
---|
126 | #! pure-test: test-files |
---|
127 | #! ./run_sigd 1 USR1 HUP ${ALL_FILES} & |
---|
128 | #! ./run_sigd 2 USR2 HUP ${ALL_FILES} & |
---|
129 | #! ./newsyslog.pure -vvrf test.conf |
---|
130 | #! kill -HUP `cat tests/sigd1.pid tests/sigd2.pid` |
---|