File: Makefile.in

package info (click to toggle)
milter-greylist 3.0-3.1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 920 kB
  • ctags: 787
  • sloc: ansic: 6,864; sh: 3,205; yacc: 736; lex: 321; makefile: 166
file content (147 lines) | stat: -rw-r--r-- 5,299 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# $Id: Makefile.in,v 1.52.2.1 2006/10/06 09:14:39 manu Exp $

#
# Copyright (c) 2004 Emmanuel Dreyfus
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#        This product includes software developed by Emmanuel Dreyfus
#
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
# OF THE POSSIBILITY OF SUCH DAMAGE.
#

CFLAGS= 	@CFLAGS@ -D_BSD_SOURCE
LDFLAGS=	@LDFLAGS@
LIBS= 		@LIBS@
prefix=		@prefix@
exec_prefix=	@exec_prefix@
SYSCONFDIR=	@sysconfdir@
LOCALSTATEDIR=	@localstatedir@
BINDIR=		@bindir@
SBINDIR=        @sbindir@
MANDIR=		@mandir@
USER=		@USER@

CC=		@CC@
MKDEP=		@MKDEP@
RM=		@RM@
MV=		@MV@
TEST=		@TEST@
SED=		@SED@
INSTALL=	@INSTALL@
LEX=		@LEX@
YACC=		@YACC@
TRUE=		@TRUE@

OBJ= 		milter-greylist.o pending.o sync.o dnsrbl.o list.o macro.o \
		conf_yacc.o dump_yacc.o conf.o autowhite.o dump.o spf.o acl.o
SRC= 		milter-greylist.c pending.c sync.c conf.c macro.c \
		autowhite.c dump.c spf.c acl.c dnsrbl.c list.c
GENSRC=		conf_yacc.c conf_lex.c dump_yacc.c dump_lex.c 

all:		milter-greylist rc-bsd.sh rc-redhat.sh \
		rc-solaris.sh rc-debian.sh rc-gentoo.sh rc-suse.sh

milter-greylist:	${OBJ}
	${CC} -o milter-greylist ${OBJ} ${LDFLAGS} ${LIBS}

sync_yacc.o:	sync_yacc.c sync_lex.c
conf_yacc.o:	conf_yacc.c conf_lex.c
dump_yacc.o:	dump_yacc.c dump_lex.c

sed_subst = "s|@BINDIR[@]|${BINDIR}|g; s|@SBINDIR[@]|${SBINDIR}|g; s|@USER[@]|${USER}|g"

rc-bsd.sh:      rc-bsd.sh.in
	${SED} ${sed_subst} rc-bsd.sh.in > rc-bsd.sh
rc-redhat.sh:    rc-redhat.sh.in
	${SED} ${sed_subst} rc-redhat.sh.in > rc-redhat.sh
rc-solaris.sh:    rc-solaris.sh.in
	${SED} ${sed_subst} rc-solaris.sh.in > rc-solaris.sh
rc-debian.sh:    rc-debian.sh.in
	${SED} ${sed_subst} rc-debian.sh.in > rc-debian.sh
rc-gentoo.sh:    rc-gentoo.sh.in
	${SED} ${sed_subst} rc-gentoo.sh.in > rc-gentoo.sh
rc-suse.sh:	 rc-suse.sh.in
	${SED} ${sed_subst} rc-suse.sh.in > rc-suse.sh

install-daemon-to-bin: milter-greylist
	${INSTALL} -d -m 755 ${DESTDIR}${BINDIR}
	${INSTALL} -m 755 milter-greylist ${DESTDIR}${BINDIR}

install-sbin: milter-greylist
	${INSTALL} -d -m 755 ${DESTDIR}${SBINDIR}
	${INSTALL} -m 755 milter-greylist ${DESTDIR}${SBINDIR}

install-man:
	${INSTALL} -d -m 755 ${DESTDIR}${MANDIR}/man8
	${INSTALL} -d -m 755 ${DESTDIR}${MANDIR}/man5
	${INSTALL} -m 644 milter-greylist.8 ${DESTDIR}${MANDIR}/man8
	${INSTALL} -m 644 greylist.conf.5 ${DESTDIR}${MANDIR}/man5

install-conf:
	${INSTALL} -d -m 755 ${DESTDIR}${SYSCONFDIR}/mail
	${TEST} -f ${DESTDIR}${SYSCONFDIR}/mail/greylist.conf -o 	\
		-f ${DESTDIR}${SYSCONFDIR}/mail/greylist.except || 	\
	     ${INSTALL} -m 644 greylist.conf ${DESTDIR}${SYSCONFDIR}/mail
	@${TEST} -f ${DESTDIR}/etc/mail/greylist.except && (	 	   \
		echo "	================================================"; \
		echo "	 WARNING: the config file name has changed,     "; \
		echo "	 Please rename /etc/mail/greylist.except, the   "; \
		echo "	 default name is now in /etc/mail/greylist.conf "; \
		echo "	================================================"; \
	) || ${TRUE}

install-db:
	${INSTALL} -d -m 755 -o ${USER} \
		${DESTDIR}${LOCALSTATEDIR}/milter-greylist
	@${TEST} -f ${DESTDIR}/var/db/greylist.db && (		 	   \
		echo "	================================================"; \
		echo "	  WARNING: the dump file location has changed,  "; \
		echo "	  Please move /var/db/greylist.db, the default  "; \
		echo "	  location is now in /var/milter-greylist/      "; \
		echo "	================================================"; \
	) || ${TRUE}

install: install-daemon-to-bin install-man install-conf install-db

depend:
	${MKDEP} ${CFLAGS} ${SRC}

clean:
	${RM} -f milter-greylist ${OBJ} ${GENSRC} \
	rc-redhat.sh rc-bsd.sh rc-solaris.sh rc-debian.sh rc-gentoo.sh \
	rc-suse.sh

realclean:	clean
	${RM} -Rf Makefile config.h config.log config.status \
		 autom4te.cache configure.lineno *.orig *.bak autoscan.log

.SUFFIXES:	.o .c .h .y .l
.l.c:
	${LEX} -o$@ $<
.y.c:
	${YACC} -p`echo $@|${SED} 's/^\([^_]\{1,\}_\).*$$/\1/'` $<
	${MV} y.tab.c $@

# This is a target for debugging
start:	milter-greylist
	./milter-greylist -D -v -p milter-greylist.sock