xref: /netbsd-src/external/ibm-public/postfix/dist/src/postcat/Makefile.in (revision 867d70fc718005c0918b8b8b2f9d7f2d52d0a0db)
1SHELL	= /bin/sh
2SRCS	= postcat.c
3OBJS	= postcat.o
4HDRS	=
5TESTSRC	=
6DEFS	= -I. -I$(INC_DIR) -D$(SYSTYPE)
7CFLAGS	= $(DEBUG) $(OPT) $(DEFS)
8TESTPROG=
9PROG	= postcat
10INC_DIR	= ../../include
11LIBS	= ../../lib/lib$(LIB_PREFIX)global$(LIB_SUFFIX) \
12	../../lib/lib$(LIB_PREFIX)util$(LIB_SUFFIX)
13
14.c.o:;	$(CC) $(CFLAGS) -c $*.c
15
16$(PROG): $(OBJS) $(LIBS)
17	$(CC) $(CFLAGS) $(SHLIB_RPATH) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
18
19$(OBJS): ../../conf/makedefs.out
20
21Makefile: Makefile.in
22	cat ../../conf/makedefs.out $? >$@
23
24test:	$(TESTPROG)
25
26tests: default_test ebh_test e_test b_test h_test eb_test eh_test bh_test
27
28root_tests:
29
30update: ../../bin/$(PROG)
31
32../../bin/$(PROG): $(PROG)
33	cp $(PROG) ../../bin
34
35printfck: $(OBJS) $(PROG)
36	rm -rf printfck
37	mkdir printfck
38	sed '1,/^# do not edit/!d' Makefile >printfck/Makefile
39	set -e; for i in *.c; do printfck -f .printfck $$i >printfck/$$i; done
40	cd printfck; make "INC_DIR=../../../include" `cd ..; ls *.o`
41
42lint:
43	lint $(DEFS) $(SRCS) $(LINTFIX)
44
45clean:
46	rm -f *.o *core $(PROG) $(TESTPROG) junk
47	rm -rf printfck
48
49tidy:	clean
50
51default_test: test-queue-file default_test.ref
52	./postcat test-queue-file >postcat.tmp 2>&1
53	diff default_test.ref postcat.tmp
54	rm -f postcat.tmp
55
56ebh_test: test-queue-file default_test.ref
57	./postcat -ebh test-queue-file >postcat.tmp 2>&1
58	diff default_test.ref postcat.tmp
59	rm -f postcat.tmp
60
61e_test: test-queue-file e_test.ref
62	./postcat -e test-queue-file >postcat.tmp 2>&1
63	diff e_test.ref postcat.tmp
64	rm -f postcat.tmp
65
66b_test: test-queue-file b_test.ref
67	./postcat -b test-queue-file >postcat.tmp 2>&1
68	diff b_test.ref postcat.tmp
69	rm -f postcat.tmp
70
71h_test: test-queue-file h_test.ref
72	./postcat -h test-queue-file >postcat.tmp 2>&1
73	diff h_test.ref postcat.tmp
74	rm -f postcat.tmp
75
76eb_test: test-queue-file eb_test.ref
77	./postcat -eb test-queue-file >postcat.tmp 2>&1
78	diff eb_test.ref postcat.tmp
79	rm -f postcat.tmp
80
81eh_test: test-queue-file eh_test.ref
82	./postcat -eh test-queue-file >postcat.tmp 2>&1
83	diff eh_test.ref postcat.tmp
84	rm -f postcat.tmp
85
86bh_test: test-queue-file bh_test.ref
87	./postcat -bh test-queue-file >postcat.tmp 2>&1
88	diff bh_test.ref postcat.tmp
89	rm -f postcat.tmp
90
91depend: $(MAKES)
92	(sed '1,/^# do not edit/!d' Makefile.in; \
93	set -e; for i in [a-z][a-z0-9]*.c; do \
94	    $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
95	    -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
96	    -e 's/o: \.\//o: /' -e p -e '}' ; \
97	done | LANG=C sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
98	@$(EXPORT) make -f Makefile.in Makefile 1>&2
99
100# do not edit below this line - it is generated by 'make depend'
101postcat.o: ../../include/argv.h
102postcat.o: ../../include/attr.h
103postcat.o: ../../include/check_arg.h
104postcat.o: ../../include/clean_env.h
105postcat.o: ../../include/htable.h
106postcat.o: ../../include/iostuff.h
107postcat.o: ../../include/is_header.h
108postcat.o: ../../include/lex_822.h
109postcat.o: ../../include/mail_conf.h
110postcat.o: ../../include/mail_params.h
111postcat.o: ../../include/mail_parm_split.h
112postcat.o: ../../include/mail_proto.h
113postcat.o: ../../include/mail_queue.h
114postcat.o: ../../include/mail_version.h
115postcat.o: ../../include/msg.h
116postcat.o: ../../include/msg_vstream.h
117postcat.o: ../../include/mymalloc.h
118postcat.o: ../../include/nvtable.h
119postcat.o: ../../include/rec_type.h
120postcat.o: ../../include/record.h
121postcat.o: ../../include/stringops.h
122postcat.o: ../../include/sys_defs.h
123postcat.o: ../../include/vbuf.h
124postcat.o: ../../include/vstream.h
125postcat.o: ../../include/vstring.h
126postcat.o: ../../include/vstring_vstream.h
127postcat.o: ../../include/warn_stat.h
128postcat.o: postcat.c
129