Makefile.in revision 1.1.1.3
1SHELL	= /bin/sh
2SRCS	= postmap.c 
3OBJS	= postmap.o
4HDRS	= 
5TESTSRC	= 
6DEFS	= -I. -I$(INC_DIR) -D$(SYSTYPE)
7CFLAGS	= $(DEBUG) $(OPT) $(DEFS)
8TESTPROG= 
9PROG	= postmap
10INC_DIR	= ../../include
11LIBS	= ../../lib/libglobal.a ../../lib/libutil.a
12
13.c.o:;	$(CC) $(CFLAGS) -c $*.c
14
15$(PROG):	$(OBJS) $(LIBS)
16	$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(SYSLIBS)
17
18$(OBJS): ../../conf/makedefs.out
19
20Makefile: Makefile.in
21	cat ../../conf/makedefs.out $? >$@
22
23update: ../../bin/$(PROG)
24
25../../bin/$(PROG): $(PROG)
26	cp $(PROG) ../../bin
27
28tests:	test1 test2 fail_test
29
30root_tests:
31
32test1:	$(PROG) map.in map-abc1.ref map-ghi1.ref map-uABC1.ref
33	./$(PROG) map.in
34	for key in abc ghi; \
35	do \
36	    ./$(PROG) -q $${key} map.in | diff map-$${key}1.ref -; \
37	done
38	./$(PROG) -f map.in
39	for key in ABC; \
40	do \
41	    ./$(PROG) -fq $${key} map.in | diff map-u$${key}1.ref -; \
42	done
43	rm -f map.in.db
44
45test2:	$(PROG) map.in map-abc2.ref map-ghi2.ref map-uABC2.ref
46	./$(PROG) map.in
47	for key in abc ghi; \
48	do \
49	    echo $${key} | ./$(PROG) -q - map.in | diff map-$${key}2.ref -; \
50	done
51	./$(PROG) -f map.in
52	for key in ABC; \
53	do \
54	    echo $${key} | ./$(PROG) -fq - map.in | diff map-u$${key}2.ref -; \
55	done
56	rm -f map.in.db
57
58fail_test: $(PROG) aliases fail_test.in fail_test.ref
59	-sh fail_test.in > fail_test.tmp 2>&1 || exit 0
60	diff fail_test.ref fail_test.tmp
61	rm -f fail_test.tmp
62
63printfck: $(OBJS) $(PROG)
64	rm -rf printfck
65	mkdir printfck
66	sed '1,/^# do not edit/!d' Makefile >printfck/Makefile
67	set -e; for i in *.c; do printfck -f .printfck $$i >printfck/$$i; done
68	cd printfck; make "INC_DIR=../../../include" `cd ..; ls *.o`
69
70lint:
71	lint $(DEFS) $(SRCS) $(LINTFIX)
72
73clean:
74	rm -f *.o *core $(PROG) $(TESTPROG) junk map.in.db
75	rm -rf printfck
76
77tidy:	clean
78
79depend: $(MAKES)
80	(sed '1,/^# do not edit/!d' Makefile.in; \
81	set -e; for i in [a-z][a-z0-9]*.c; do \
82	    $(CC) -E $(DEFS) $(INCL) $$i | grep -v '[<>]' | sed -n -e '/^# *1 *"\([^"]*\)".*/{' \
83	    -e 's//'`echo $$i|sed 's/c$$/o/'`': \1/' \
84	    -e 's/o: \.\//o: /' -e p -e '}' ; \
85	done | sort -u) | grep -v '[.][o][:][ ][/]' >$$$$ && mv $$$$ Makefile.in
86	@$(EXPORT) make -f Makefile.in Makefile 1>&2
87
88# do not edit below this line - it is generated by 'make depend'
89postmap.o: ../../include/argv.h
90postmap.o: ../../include/dict.h
91postmap.o: ../../include/dict_proxy.h
92postmap.o: ../../include/header_opts.h
93postmap.o: ../../include/mail_conf.h
94postmap.o: ../../include/mail_dict.h
95postmap.o: ../../include/mail_params.h
96postmap.o: ../../include/mail_task.h
97postmap.o: ../../include/mail_version.h
98postmap.o: ../../include/mime_state.h
99postmap.o: ../../include/mkmap.h
100postmap.o: ../../include/msg.h
101postmap.o: ../../include/msg_syslog.h
102postmap.o: ../../include/msg_vstream.h
103postmap.o: ../../include/myflock.h
104postmap.o: ../../include/mymalloc.h
105postmap.o: ../../include/readlline.h
106postmap.o: ../../include/rec_type.h
107postmap.o: ../../include/set_eugid.h
108postmap.o: ../../include/split_at.h
109postmap.o: ../../include/stringops.h
110postmap.o: ../../include/sys_defs.h
111postmap.o: ../../include/vbuf.h
112postmap.o: ../../include/vstream.h
113postmap.o: ../../include/vstring.h
114postmap.o: ../../include/vstring_vstream.h
115postmap.o: ../../include/warn_stat.h
116postmap.o: postmap.c
117