-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile.pre
203 lines (167 loc) · 5.54 KB
/
Makefile.pre
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
# Makefile,v 1.29 1994/08/05 11:49:26 shigeya Exp
#
# Makefile for distribute
#
# See CREDITS for credit and COPYRIGHT for copyright notice.
#
RCONFIG=-DRELEASESTATE=\"Alpha1\"
#PURIFY=purify
#PURIFYOPTS=-mail-to-user=shigeya -cache-dir=/var/tmp/distribute
# Configuration options:
#
# Available options:
# -DSYSLOG include syslog based logging
# -DISSUE include X-Sequence sequence numbering
# -DSUBJALIAS put in subject alias like "(MailingListName 1)"
# -DADDVERSION Add X-Distribute: Version SOMETHING to header
# -DDEBUGLOG Debug level logging (in /tmp/distribute.log)
# -DSYSLOG_FACILITY=n -- value for syslogd's facility value
# defaulted to LOG_LOCAL4
# -DUSESUID include SUID support code
# -DSTRSTR_MISSING strstr() missing (Ex: NEWSOS 4.x)
# -DSTRSEP_MISSING strsep() is missing (Ex: SunOS)
# -DMSC MSC Style Subject
# -DSVR4
# -DREPORTADDR=\"distribute-report\" to add additinal report addr.
# -DUSEMIMEKIT to use mimekit to decode/re-encode subject
# -DLOGDEBUG LOGGING DEBUG
#
OPTIONS= -DSYSLOG -DISSUE -DSUBJALIAS -DADDVERSION \
-DSYSLOG_FACILITY=LOG_LOCAL4 -DCCMAIL -DUSEMIMEKIT
#
# DEFAULT parameters -- YOU SHOULD EDIT THESE
#
# DEF_DOMAINNAME -- default domain name attached to list-name
# [default: undef] like [email protected]
# Define to your domain name, or undefine it.
# If undefined, hostname by gethostname or
# hostname given by -h will be attached.
#
# DEF_SEQ_PATH -- default path to directory which holds
# [default: sequence number files.
# /usr/lib/mail-list]
#
# DEF_RECIPIENT_PATH -- default path to directory which holds
# [default: recipient list files.
# /usr/lib/mail-list]
#
# DEF_MAJORDOMO_RECIPIENT_PATH-- default path to majordomo "lists" directory
# [default: recipient file in majordomo style.
# /usr/lib/mail-list/majordomo/lists]
#
# DEF_SEQ_SUFFIX -- default suffix for sequence files.
# [default: .seq]
#
# DEF_RECIPIENT_SUFFIX -- default suffix for recipient list files.
# [default: .rec]
#
# DEF_ALIAS_CHAR_OPTION -- Define alias char by -B option value.
# [default: NONE] (ex: DEF_ALIAS_CHAR_OPTION=\"b\" for brace)
# "b" for brace, "c" for curly brace, "p" for paren
# or "<>" to specify both open/close char.
#
# CONFIG EXAMPLE:
##DEFAULTCONFIG=\
## -DDEF_DOMAINNAME=\"somewhere.co.jp\" \
## -DDEF_ALIAS_CHAR_OPTION=\"b\"
#
# External Library -- you should change this if mimekit is in different loc.
#
MIMELIB = -L/usr/local/lib -lmimekit
#
DESTDIR=
#
CFLAGS= -g ${OPTIONS} ${DEFAULTCONFIG} ${RCONFIG}
#-Wall
LIBS= ${MIMELIB}
MAKE= make
CC= ${PURIFY} ${PURIFYOPTS} gcc
#-D__USE_FIXED_PROTOTYPES__
PREFIX= /usr/local
WHERE= ${PREFIX}/libexec
MANDIR= ${PREFIX}/man
MANSEC= 1
# Install as
OWNER= daemon
GROUP= daemon
# install
INSTALL= install -c
# perl
PERL=perl
# C source files
OTHERSRC= header.c history.c logging.c \
longstr.c memory.c message.c recipfile.c pathutil.c \
strutil.c
DISTSRCS= distribute.c ${OTHERSRC}
ARCHIVESRCS= archive.c ${OTHERSRC}
SRCS= archive.c distribute.c header.c history.c logging.c \
longstr.c memory.c message.c pathutil.c recipfile.c \
strutil.c
TEST= testlongstr.c
HDRS= cdefs.h config.h debuglog.h header.h history.h longstr.h \
memory.h message.h mestab.h patchlevel.h pathutil.h \
recipfile.h strutil.h util.h
MISCSRC= ChangeLog README README.FIRST NEWS \
distribute.1 Makefile Makefile.pmake \
resultcheck.pl tmpl2c.pl message.tmpl
KITFILES= ${SRCS} ${HDRS} ${MISCSRC}
LIBOBJS= memory.o history.o pathutil.o strutil.o header.o logging.o \
longstr.o ${STRSEP}
DOBJS= distribute.o recipfile.o message.o ${LIBOBJS}
AOBJS= archive.o ${LIBOBJS}
all: xdistribute xarchive
xdistribute: ${DOBJS}
${CC} ${CFLAGS} -o xdistribute ${DOBJS} ${LIBS}
@size xdistribute
xarchive: ${AOBJS}
${CC} ${CFLAGS} -o xarchive ${AOBJS} ${LIBS}
@size xarchive
install: xdistribute distribute.1 xarchive
${INSTALL} -s -o ${OWNER} -g ${GROUP} -m 511 xdistribute \
${DESTDIR}${WHERE}/distribute
${INSTALL} -s -o ${OWNER} -g ${GROUP} -m 511 xarchive \
${DESTDIR}${WHERE}/archive
${INSTALL} -m 444 distribute.1 \
${DESTDIR}${MANDIR}/man${MANSEC}/distribute.${MANSEC}
testinst: xdistribute xarchive
${INSTALL} -s -o root -g wheel -m 511 distribute test
${INSTALL} -s -o root -g wheel -m 511 archive test
clean:
rm -f a.out *.core core ${DOBJS} ${AOBJS} xdistribute xarchive mestab.h
depend: mestab.h
mkmf -CSXW
kit:
shar ${KITFILES} >distribute.kit
# test suite
test.x: testlongstr.o longstr.o
cc -g -o test.x testlongstr.o longstr.o
test: test.x
./test.x | ${PERL} resultcheck.pl
lint: distribute.lint archive.lint
distribute.lint: ${DISTSRCS} Makefile
-lint ${OPTIONS} ${DISTSRCS} >$@
archive.lint: ${ARCHIVESRCS} Makefile
-lint ${OPTIONS} ${DISTSRCS} >$@
prtest: recipfile.c
cc -DTEST -g -o prtest recipfile.c longstr.o
htest: history.c memory.o logging.o history.h
cc -DTEST -g -o htest history.c memory.o logging.o
utest: uidlib.c
cc -DTEST -g -o utest uidlib.c
mestab.h: message.tmpl tmpl2c.pl
${PERL} tmpl2c.pl <message.tmpl >mestab.h
###
archive.o: archive.c patchlevel.h config.h memory.h cdefs.h history.h \
pathutil.h header.h
distribute.o: distribute.c patchlevel.h config.h longstr.h cdefs.h memory.h \
message.h recipfile.h mestab.h strutil.h pathutil.h \
history.h header.h
header.o: header.c util.h config.h memory.h cdefs.h
history.o: history.c memory.h cdefs.h history.h
logging.o: logging.c
longstr.o: longstr.c longstr.h cdefs.h
memory.o: memory.c
message.o: message.c message.h cdefs.h longstr.h
pathutil.o: pathutil.c config.h memory.h cdefs.h pathutil.h
recipfile.o: recipfile.c longstr.h cdefs.h
strutil.o: strutil.c strsep.c