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