1SHELL	= /bin/sh
2SRCS	= bounce.c bounce_append_service.c bounce_notify_service.c \
3	bounce_cleanup.c bounce_notify_util.c bounce_notify_verp.c \
4	bounce_one_service.c bounce_warn_service.c bounce_trace_service.c \
5	bounce_template.c bounce_templates.c
6OBJS	= bounce.o bounce_append_service.o bounce_notify_service.o \
7	bounce_cleanup.o bounce_notify_util.o bounce_notify_verp.o \
8	bounce_one_service.o bounce_warn_service.o bounce_trace_service.o \
9	bounce_template.o bounce_templates.o
10HDRS	= 
11TESTSRC	= 
12DEFS	= -I. -I$(INC_DIR) -D$(SYSTYPE)
13CFLAGS	= $(DEBUG) $(OPT) $(DEFS)
14TESTPROG=
15PROG	= bounce
16SAMPLES	= ../../conf/bounce.cf.default
17INC_DIR	= ../../include
18LIBS	= ../../lib/libmaster.a ../../lib/libglobal.a ../../lib/libutil.a
19
20.c.o:;  $(CC) $(CFLAGS) -c $*.c
21
22all:	$(PROG) ../../conf/bounce.cf.default
23
24$(PROG):	$(OBJS) $(LIBS)
25	$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
26
27# Eliminate dependency on installed Postfix.
28../../conf/bounce.cf.default: template_test.ref annotate.sh
29	rm -f $@
30	./annotate.sh <template_test.ref >$@
31
32main.cf:
33	echo queue_directory=. >main.cf
34	echo myhostname=example.com >>main.cf
35
36$(OBJS): ../../conf/makedefs.out
37
38Makefile: Makefile.in
39	cat ../../conf/makedefs.out $? >$@
40
41test:	$(TESTPROG)
42
43tests:	update template_test 2template_test
44
45root_tests:
46
47update: ../../libexec/$(PROG) $(SAMPLES)
48
49../../libexec/$(PROG): $(PROG)
50	cp $(PROG) ../../libexec
51
52printfck: $(OBJS) $(PROG)
53	rm -rf printfck
54	mkdir printfck
55	cp *.h printfck
56	sed '1,/^# do not edit/!d' Makefile > printfck/Makefile
57	set -e; for i in *.c; do printfck -f .printfck $$i >printfck/$$i; done
58	cd printfck; make "INC_DIR=../../../include" `cd ..; ls *.o`
59
60lint:
61	lint $(DEFS) $(SRCS) $(LINTFIX)
62
63clean:
64	rm -f *.o *core $(PROG) $(TESTPROG) junk main.cf
65	rm -rf printfck
66
67tidy:	clean
68
69# Avoid dependency on installed Postfix.
70# XXX This still requires that default_privs, mail_owner etc. accounts exist.
71template_test: $(PROG) main.cf template_test.ref
72	MAIL_CONFIG=. ./$(PROG) -SVzndump_templates >template_test.tmp
73	diff template_test.ref template_test.tmp
74	MAIL_CONFIG=. ./$(PROG) -SVzndump_templates \
75	    -o bounce_template_file=template_test.ref > template_test.tmp
76	diff template_test.ref template_test.tmp
77	rm -f template_test.tmp
78
792template_test: $(PROG) main.cf template_test.ref 2template_test.in
80	MAIL_CONFIG=. ./$(PROG) -SVzndump_templates \
81	    -o bounce_template_file=2template_test.in > template_test.tmp
82	diff template_test.ref template_test.tmp
83	rm -f template_test.tmp
84
85depend: $(MAKES)
86	(sed '1,/^# do not edit/!d' Makefile.in; \
87	set -e; for i in [a-z][a-z0-9]*.c; do \
88	    $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
89	    -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
90	    -e 's/o: \.\//o: /' -e p -e '}' ; \
91	done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
92	@$(EXPORT) make -f Makefile.in Makefile 1>&2
93
94# do not edit below this line - it is generated by 'make depend'
95bounce.o: ../../include/attr.h
96bounce.o: ../../include/bounce.h
97bounce.o: ../../include/bounce_log.h
98bounce.o: ../../include/deliver_request.h
99bounce.o: ../../include/dsb_scan.h
100bounce.o: ../../include/dsn.h
101bounce.o: ../../include/dsn_buf.h
102bounce.o: ../../include/iostuff.h
103bounce.o: ../../include/load_file.h
104bounce.o: ../../include/mail_addr.h
105bounce.o: ../../include/mail_conf.h
106bounce.o: ../../include/mail_params.h
107bounce.o: ../../include/mail_proto.h
108bounce.o: ../../include/mail_queue.h
109bounce.o: ../../include/mail_server.h
110bounce.o: ../../include/mail_version.h
111bounce.o: ../../include/msg.h
112bounce.o: ../../include/msg_stats.h
113bounce.o: ../../include/rcpt_buf.h
114bounce.o: ../../include/recipient_list.h
115bounce.o: ../../include/stringops.h
116bounce.o: ../../include/sys_defs.h
117bounce.o: ../../include/vbuf.h
118bounce.o: ../../include/vstream.h
119bounce.o: ../../include/vstring.h
120bounce.o: bounce.c
121bounce.o: bounce_service.h
122bounce.o: bounce_template.h
123bounce_append_service.o: ../../include/attr.h
124bounce_append_service.o: ../../include/bounce_log.h
125bounce_append_service.o: ../../include/deliver_flock.h
126bounce_append_service.o: ../../include/dsn.h
127bounce_append_service.o: ../../include/dsn_buf.h
128bounce_append_service.o: ../../include/iostuff.h
129bounce_append_service.o: ../../include/mail_params.h
130bounce_append_service.o: ../../include/mail_proto.h
131bounce_append_service.o: ../../include/mail_queue.h
132bounce_append_service.o: ../../include/msg.h
133bounce_append_service.o: ../../include/myflock.h
134bounce_append_service.o: ../../include/quote_822_local.h
135bounce_append_service.o: ../../include/quote_flags.h
136bounce_append_service.o: ../../include/rcpt_buf.h
137bounce_append_service.o: ../../include/recipient_list.h
138bounce_append_service.o: ../../include/stringops.h
139bounce_append_service.o: ../../include/sys_defs.h
140bounce_append_service.o: ../../include/vbuf.h
141bounce_append_service.o: ../../include/vstream.h
142bounce_append_service.o: ../../include/vstring.h
143bounce_append_service.o: bounce_append_service.c
144bounce_append_service.o: bounce_service.h
145bounce_append_service.o: bounce_template.h
146bounce_cleanup.o: ../../include/attr.h
147bounce_cleanup.o: ../../include/bounce_log.h
148bounce_cleanup.o: ../../include/dsn.h
149bounce_cleanup.o: ../../include/dsn_buf.h
150bounce_cleanup.o: ../../include/mail_queue.h
151bounce_cleanup.o: ../../include/msg.h
152bounce_cleanup.o: ../../include/mymalloc.h
153bounce_cleanup.o: ../../include/rcpt_buf.h
154bounce_cleanup.o: ../../include/recipient_list.h
155bounce_cleanup.o: ../../include/sys_defs.h
156bounce_cleanup.o: ../../include/vbuf.h
157bounce_cleanup.o: ../../include/vstream.h
158bounce_cleanup.o: ../../include/vstring.h
159bounce_cleanup.o: bounce_cleanup.c
160bounce_cleanup.o: bounce_service.h
161bounce_cleanup.o: bounce_template.h
162bounce_notify_service.o: ../../include/attr.h
163bounce_notify_service.o: ../../include/bounce.h
164bounce_notify_service.o: ../../include/bounce_log.h
165bounce_notify_service.o: ../../include/cleanup_user.h
166bounce_notify_service.o: ../../include/deliver_request.h
167bounce_notify_service.o: ../../include/dsn.h
168bounce_notify_service.o: ../../include/dsn_buf.h
169bounce_notify_service.o: ../../include/dsn_mask.h
170bounce_notify_service.o: ../../include/int_filt.h
171bounce_notify_service.o: ../../include/mail_addr.h
172bounce_notify_service.o: ../../include/mail_error.h
173bounce_notify_service.o: ../../include/mail_params.h
174bounce_notify_service.o: ../../include/mail_queue.h
175bounce_notify_service.o: ../../include/msg.h
176bounce_notify_service.o: ../../include/msg_stats.h
177bounce_notify_service.o: ../../include/name_mask.h
178bounce_notify_service.o: ../../include/post_mail.h
179bounce_notify_service.o: ../../include/rcpt_buf.h
180bounce_notify_service.o: ../../include/recipient_list.h
181bounce_notify_service.o: ../../include/sys_defs.h
182bounce_notify_service.o: ../../include/vbuf.h
183bounce_notify_service.o: ../../include/vstream.h
184bounce_notify_service.o: ../../include/vstring.h
185bounce_notify_service.o: bounce_notify_service.c
186bounce_notify_service.o: bounce_service.h
187bounce_notify_service.o: bounce_template.h
188bounce_notify_util.o: ../../include/attr.h
189bounce_notify_util.o: ../../include/bounce_log.h
190bounce_notify_util.o: ../../include/cleanup_user.h
191bounce_notify_util.o: ../../include/deliver_completed.h
192bounce_notify_util.o: ../../include/dsn.h
193bounce_notify_util.o: ../../include/dsn_buf.h
194bounce_notify_util.o: ../../include/dsn_mask.h
195bounce_notify_util.o: ../../include/events.h
196bounce_notify_util.o: ../../include/int_filt.h
197bounce_notify_util.o: ../../include/iostuff.h
198bounce_notify_util.o: ../../include/is_header.h
199bounce_notify_util.o: ../../include/lex_822.h
200bounce_notify_util.o: ../../include/line_wrap.h
201bounce_notify_util.o: ../../include/mail_addr.h
202bounce_notify_util.o: ../../include/mail_date.h
203bounce_notify_util.o: ../../include/mail_error.h
204bounce_notify_util.o: ../../include/mail_params.h
205bounce_notify_util.o: ../../include/mail_proto.h
206bounce_notify_util.o: ../../include/mail_queue.h
207bounce_notify_util.o: ../../include/msg.h
208bounce_notify_util.o: ../../include/myflock.h
209bounce_notify_util.o: ../../include/mymalloc.h
210bounce_notify_util.o: ../../include/name_mask.h
211bounce_notify_util.o: ../../include/post_mail.h
212bounce_notify_util.o: ../../include/quote_822_local.h
213bounce_notify_util.o: ../../include/quote_flags.h
214bounce_notify_util.o: ../../include/rcpt_buf.h
215bounce_notify_util.o: ../../include/rec_type.h
216bounce_notify_util.o: ../../include/recipient_list.h
217bounce_notify_util.o: ../../include/record.h
218bounce_notify_util.o: ../../include/stringops.h
219bounce_notify_util.o: ../../include/sys_defs.h
220bounce_notify_util.o: ../../include/vbuf.h
221bounce_notify_util.o: ../../include/vstream.h
222bounce_notify_util.o: ../../include/vstring.h
223bounce_notify_util.o: bounce_notify_util.c
224bounce_notify_util.o: bounce_service.h
225bounce_notify_util.o: bounce_template.h
226bounce_notify_verp.o: ../../include/attr.h
227bounce_notify_verp.o: ../../include/bounce.h
228bounce_notify_verp.o: ../../include/bounce_log.h
229bounce_notify_verp.o: ../../include/cleanup_user.h
230bounce_notify_verp.o: ../../include/deliver_request.h
231bounce_notify_verp.o: ../../include/dsn.h
232bounce_notify_verp.o: ../../include/dsn_buf.h
233bounce_notify_verp.o: ../../include/dsn_mask.h
234bounce_notify_verp.o: ../../include/int_filt.h
235bounce_notify_verp.o: ../../include/mail_addr.h
236bounce_notify_verp.o: ../../include/mail_error.h
237bounce_notify_verp.o: ../../include/mail_params.h
238bounce_notify_verp.o: ../../include/mail_queue.h
239bounce_notify_verp.o: ../../include/msg.h
240bounce_notify_verp.o: ../../include/msg_stats.h
241bounce_notify_verp.o: ../../include/name_mask.h
242bounce_notify_verp.o: ../../include/post_mail.h
243bounce_notify_verp.o: ../../include/rcpt_buf.h
244bounce_notify_verp.o: ../../include/recipient_list.h
245bounce_notify_verp.o: ../../include/sys_defs.h
246bounce_notify_verp.o: ../../include/vbuf.h
247bounce_notify_verp.o: ../../include/verp_sender.h
248bounce_notify_verp.o: ../../include/vstream.h
249bounce_notify_verp.o: ../../include/vstring.h
250bounce_notify_verp.o: bounce_notify_verp.c
251bounce_notify_verp.o: bounce_service.h
252bounce_notify_verp.o: bounce_template.h
253bounce_one_service.o: ../../include/attr.h
254bounce_one_service.o: ../../include/bounce.h
255bounce_one_service.o: ../../include/bounce_log.h
256bounce_one_service.o: ../../include/cleanup_user.h
257bounce_one_service.o: ../../include/deliver_request.h
258bounce_one_service.o: ../../include/dsn.h
259bounce_one_service.o: ../../include/dsn_buf.h
260bounce_one_service.o: ../../include/dsn_mask.h
261bounce_one_service.o: ../../include/int_filt.h
262bounce_one_service.o: ../../include/mail_addr.h
263bounce_one_service.o: ../../include/mail_error.h
264bounce_one_service.o: ../../include/mail_params.h
265bounce_one_service.o: ../../include/msg.h
266bounce_one_service.o: ../../include/msg_stats.h
267bounce_one_service.o: ../../include/name_mask.h
268bounce_one_service.o: ../../include/post_mail.h
269bounce_one_service.o: ../../include/rcpt_buf.h
270bounce_one_service.o: ../../include/recipient_list.h
271bounce_one_service.o: ../../include/sys_defs.h
272bounce_one_service.o: ../../include/vbuf.h
273bounce_one_service.o: ../../include/vstream.h
274bounce_one_service.o: ../../include/vstring.h
275bounce_one_service.o: bounce_one_service.c
276bounce_one_service.o: bounce_service.h
277bounce_one_service.o: bounce_template.h
278bounce_template.o: ../../include/attr.h
279bounce_template.o: ../../include/iostuff.h
280bounce_template.o: ../../include/is_header.h
281bounce_template.o: ../../include/mac_expand.h
282bounce_template.o: ../../include/mac_parse.h
283bounce_template.o: ../../include/mail_conf.h
284bounce_template.o: ../../include/mail_params.h
285bounce_template.o: ../../include/mail_proto.h
286bounce_template.o: ../../include/msg.h
287bounce_template.o: ../../include/mymalloc.h
288bounce_template.o: ../../include/split_at.h
289bounce_template.o: ../../include/stringops.h
290bounce_template.o: ../../include/sys_defs.h
291bounce_template.o: ../../include/vbuf.h
292bounce_template.o: ../../include/vstream.h
293bounce_template.o: ../../include/vstring.h
294bounce_template.o: bounce_template.c
295bounce_template.o: bounce_template.h
296bounce_templates.o: ../../include/attr.h
297bounce_templates.o: ../../include/iostuff.h
298bounce_templates.o: ../../include/mail_addr.h
299bounce_templates.o: ../../include/mail_proto.h
300bounce_templates.o: ../../include/msg.h
301bounce_templates.o: ../../include/mymalloc.h
302bounce_templates.o: ../../include/stringops.h
303bounce_templates.o: ../../include/sys_defs.h
304bounce_templates.o: ../../include/vbuf.h
305bounce_templates.o: ../../include/vstream.h
306bounce_templates.o: ../../include/vstring.h
307bounce_templates.o: ../../include/vstring_vstream.h
308bounce_templates.o: bounce_template.h
309bounce_templates.o: bounce_templates.c
310bounce_trace_service.o: ../../include/attr.h
311bounce_trace_service.o: ../../include/bounce_log.h
312bounce_trace_service.o: ../../include/cleanup_user.h
313bounce_trace_service.o: ../../include/deliver_request.h
314bounce_trace_service.o: ../../include/dsn.h
315bounce_trace_service.o: ../../include/dsn_buf.h
316bounce_trace_service.o: ../../include/dsn_mask.h
317bounce_trace_service.o: ../../include/int_filt.h
318bounce_trace_service.o: ../../include/mail_addr.h
319bounce_trace_service.o: ../../include/mail_error.h
320bounce_trace_service.o: ../../include/mail_params.h
321bounce_trace_service.o: ../../include/mail_queue.h
322bounce_trace_service.o: ../../include/msg.h
323bounce_trace_service.o: ../../include/msg_stats.h
324bounce_trace_service.o: ../../include/name_mask.h
325bounce_trace_service.o: ../../include/post_mail.h
326bounce_trace_service.o: ../../include/rcpt_buf.h
327bounce_trace_service.o: ../../include/recipient_list.h
328bounce_trace_service.o: ../../include/sys_defs.h
329bounce_trace_service.o: ../../include/vbuf.h
330bounce_trace_service.o: ../../include/vstream.h
331bounce_trace_service.o: ../../include/vstring.h
332bounce_trace_service.o: bounce_service.h
333bounce_trace_service.o: bounce_template.h
334bounce_trace_service.o: bounce_trace_service.c
335bounce_warn_service.o: ../../include/attr.h
336bounce_warn_service.o: ../../include/bounce_log.h
337bounce_warn_service.o: ../../include/cleanup_user.h
338bounce_warn_service.o: ../../include/dsn.h
339bounce_warn_service.o: ../../include/dsn_buf.h
340bounce_warn_service.o: ../../include/dsn_mask.h
341bounce_warn_service.o: ../../include/int_filt.h
342bounce_warn_service.o: ../../include/mail_addr.h
343bounce_warn_service.o: ../../include/mail_error.h
344bounce_warn_service.o: ../../include/mail_params.h
345bounce_warn_service.o: ../../include/mail_queue.h
346bounce_warn_service.o: ../../include/msg.h
347bounce_warn_service.o: ../../include/name_mask.h
348bounce_warn_service.o: ../../include/post_mail.h
349bounce_warn_service.o: ../../include/rcpt_buf.h
350bounce_warn_service.o: ../../include/recipient_list.h
351bounce_warn_service.o: ../../include/sys_defs.h
352bounce_warn_service.o: ../../include/vbuf.h
353bounce_warn_service.o: ../../include/vstream.h
354bounce_warn_service.o: ../../include/vstring.h
355bounce_warn_service.o: bounce_service.h
356bounce_warn_service.o: bounce_template.h
357bounce_warn_service.o: bounce_warn_service.c
358