File: Makefile.in

package info (click to toggle)
emil 2.1.0-beta9-14
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 1,164 kB
  • ctags: 592
  • sloc: ansic: 10,377; yacc: 411; makefile: 331; sh: 172
file content (339 lines) | stat: -rwxr-xr-x 10,322 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
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
#
#
# Copyright (C) 1994 Swedish University Network (SUNET)
#
#
# This program is developed by UDAC, Uppsala University by commission
# of the Swedish University Network (SUNET). 
# 
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITTNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
#
#                                          Martin.Wendel@its.uu.se
#					   Torbjorn.Wictorin@its.uu.se
#
#                                          ITS
#                                          P.O. Box 887
#                                          S-751 08 Uppsala
#                                          Sweden
#
# Start of user defines
#######################

# Binaries will be installed in bindir and configuration files in
# libdir. Modify as needed.
#
prefix = @prefix@
exec_prefix = @exec_prefix@
#binprefix =
#manprefix =

bindir = @bindir@
libdir = @libdir@/emil
mandir = @mandir@
manext = 1
cfmanext = 5

MAINCF = $(libdir)/emil.cf
CHARFILE = $(libdir)/charsets.cpl
LOG_FACILITY = LOG_MAIL

#
# Add extra facilities to the CLIENTS field.
#
# -DSMTP 	 	Enables the use of SMTP delivery. If omitted will 
#			disable the function of the '-n' flag.
#
# -DNAMED_BIND		Use nameserver to look up hostname when using SMTP.
#
# -DUSE_MX		Use MX-records instead of A-records.
#
# -DDEBUG		Enable use of the debug flag.
#
# -DOLD_UNIX_FROM 	Omission of -u flag removes existing unix from 
#			style header with OLD_UNIX_FROM defined. If you
#			rely on this (probably not) specify -DOLD_UNIX_FROM
#			in CLIENTS below.
#
# NAMED_BIND and USE_MX require the res_search() routine. If not
# found by configure (for example on standard SunOS) these will
# be ignored.
#
CLIENTS = -DSMTP -DNAMED_BIND -DUSE_MX -DDEBUG

#
# Modify SMTPHOSTNAME (if using SMTP) to the FQDN of this host.
#
SMTPHOSTNAME = host.domain

# End of user defines
#####################

srcdir = @srcdir@
VPATH = @srcdir@
CC = @CC@
#CPPFLAGS = -I.
#CFLAGS = -g -DDEBUG
#LDFLAGS = -g
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@
EMILPATH = $(bindir)/emil
VERSION = 2.1.0-beta9
cffile = \"$(MAINCF)\"
charsetsfile = \"$(CHARFILE)\"
sendmailpath = \"$(SENDMAILPATH)\"
sendmailprog = \"$(SENDMAILPROG)\"
senderflag = \"$(SENDERFLAG)\"
MFLAGS = "CHARFILE=$(CHARFILE)" "CFLAGS=$(CFLAGS)" "LDFLAGS=$(LDFLAGS)"

DEFS = @DEFS@ $(CLIENTS) -DMAINCF=$(cffile) -DCHARFILE=$(charsetsfile) -DSENDMAILPATH=$(sendmailpath) -DSENDMAILPROG=$(sendmailprog) -DSENDERFLAG=$(senderflag) -DLOG_FACILITY=$(LOG_FACILITY) -DSMTPHOSTNAME=\"$(SMTPHOSTNAME)\" -DEMIL_VERSION=\"$(VERSION)\" -DEMILPATH=\"$(EMILPATH)\"
LIBS = @LIBS@ @LEXLIB@
RANLIB = @RANLIB@
YACC = @YACC@
LEX = @LEX@
LEXLIB = @LEXLIB@
AR=		ar
SHELL=		/bin/sh

CHARDIR = $(srcdir)/charset


SRCS=	7bit.c appledouble.c applefile.c applesingle.c base64.c binary.c binhex.c \
	buffer.c convert.c filenames.c forks.c format.c hbase64.c header.c \
	hqp.c hqxbin.c load.c logger.c mailtool.c main.c message.c mime.c \
	mimeparse.c ns.c out.c qp.c rfc1522.c rfc822.c rfc822parse.c \
	smtp.c structure.c sunparse.c uuencode.c \
	s_attr.c d_attr.c a_attr.c
OBJS=	7bit.o appledouble.o applefile.o applesingle.o base64.o binary.o binhex.o \
	buffer.o convert.o filenames.o forks.o format.o hbase64.o header.o \
	hqp.o hqxbin.o load.o logger.o mailtool.o main.o message.o mime.o \
	mimeparse.o ns.o out.o qp.o rfc1522.o rfc822.o rfc822parse.o \
	smtp.o structure.o sunparse.o uuencode.o \
	s_attr.o d_attr.o a_attr.o
HDRS=	emil.h attr.h acconfig.h func.h

RESTFILES = COPYING ChangeLog Makefile.in emil.cf README.2.0.4\
README.FIRST README COPYRIGHT INSTALL configure.in mkinstalldirs emil.man \
emil.cf.man helper.c getoption.l getoption.y configure \
config.h.in README.2.1.0 install-sh \
BUGS charset.c charset/*.[ch] charset/*.req charset/*.def charset/*.doc \
charset/*.in charset/*.cm 
DOCS = doc/arrow_left3.gif doc/index.shtml doc/why.html doc/way.html \
doc/control.html doc/arguments.html doc/details.html doc/using.html \
doc/configuration.html doc/intro.html doc/main.html doc/arrow_right3.gif \
doc/arrow_up2.gif doc/binpobox.gif doc/comparison.html doc/design-top.html \
doc/figure1.gif doc/figure2.gif doc/figure3.gif doc/analysis.html \
doc/figure4.gif doc/design-spec.html doc/problem-statement.html \
doc/figure5.gif doc/rfc1521.html doc/rfc1522.html doc/rfc822.html \
doc/figure6.gif doc/figure7.gif doc/setting.html doc/input.html \
doc/output.html doc/emil.cf.html doc/end.html
DISTFILES = $(SRCS) $(HDRS) $(RESTFILES) $(DOCS)
TESTFILES = testdir-2.1.0/*test testdir-2.1.0/emil.cf \
testdir-2.1.0/message[1-9]* testdir-2.1.0/README

all: emil man helper finish

finish:
	@echo " "
	@echo " "
	@echo "Now type 'make install' to install the necessery files"
	@echo " "
	@echo "Try the program \"helper\" to get support on how to setup"
	@echo "conversion on the local mailer of sendmail"

.c.o:   emil.h
	$(CC) -c $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) $(UNIQUE) $<

helper: helper.c emil.h
	$(CC) -o helper $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) $(UNIQUE) helper.c

CHARSET: emil.h
	cd $(CHARDIR); $(MAKE) $(MFLAGS) all

charset.o: charset.c emil.h $(CHARDIR)/strncnv.c
	$(CC) -c -I$(CHARDIR) $(DEFS) -DEMIL -I$(srcdir) $(CFLAGS) $(UNIQUE) charset.c


emil: CHARSET emilx


emilx: $(OBJS) charset.o getoption.o $(CHARDIR)/dfopen.o emil.h
	$(CC) -o emil $(LDFLAGS) $(OBJS) charset.o getoption.o $(CHARDIR)/dfopen.o $(LIBS)

getoption.o:		y.tab.c lex.yy.c emil.h
			$(CC) -c $(DEFS) $(CFLAGS) -o getoption.o y.tab.c

y.tab.c:		getoption.y
			$(YACC) -l -v getoption.y

lex.yy.c:		getoption.l
			$(LEX)  -i getoption.l


man: 
	cp emil.man emil.$(manext)
	cp emil.cf.man emil.cf.$(cfmanext)
	@rm -f config.ed
	@echo "1,\$$s'^MAINCF'$(MAINCF)'g" > config.ed
	@echo "w"		>> config.ed
	@echo "q"		>> config.ed
	ed emil.cf.$(cfmanext) <config.ed
	@rm -f config.ed
	@echo "1,\$$s'^MAINCF'$(MAINCF)'g" > config.ed
	@echo "1,\$$s'^CHARFILE'$(CHARFILE)'g"	>> config.ed
	@echo "w"		>> config.ed
	@echo "q"		>> config.ed
	ed emil.$(manext) <config.ed

manprint: man
	psroff -man emil.$(manext)
	psroff -man emil.cf.$(cfmanext)

test:
	@cd testdir-2.1.0; \
	./emiltest Group ;\
	./emiltest Compound ;\
	./emiltest Buffer ;\
	./emiltest Misc;

install: installdirs
	@if test -f emil ; then \
		if test -f $(bindir)/emil ; then \
			echo " " ;\
			echo "Saving $(bindir)/emil in $(bindir)/emil.bak" ; \
			mv $(bindir)/emil $(bindir)/emil.bak ; \
		fi ; \
		echo " " ;\
		echo "Installing emil as $(bindir)/emil" ; \
		$(INSTALL_PROGRAM) emil $(bindir)/emil ; \
	fi ;
	@if test -f emil.cf ; then \
		if test -f $(MAINCF) ; then \
			echo " " ;\
			echo "Keeping $(MAINCF) as is" ; \
			echo " " ;\
			echo "*********************************************" ;\
			echo "The syntax of emil.cf has changed somewhat." ;\
			echo "A new mailer field has been added." ;\
			echo "You should also check the Match lines in ./emil.cf" ;\
			echo "and include the ones not in your original" ; \
			echo "$(MAINCF)." ; \
			echo "*********************************************" ;\
		else \
			echo " " ;\
			echo "Installing emil.cf as $(MAINCF)" ; \
			$(INSTALL_DATA) emil.cf $(MAINCF) ; \
		fi ; \
	fi ;
	@if test -f charset/charsets.cpl ; then \
		if test -f $(CHARFILE) ; then \
			echo " " ;\
			echo "Keeping $(CHARFILE) as is" ; \
		else \
			echo " " ;\
			echo "Installing charset/charsets.cpl as $(CHARFILE)";\
			$(INSTALL_DATA) charset/charsets.cpl $(CHARFILE); \
			 chmod 644 $(CHARFILE) ; \
		fi ; \
	fi ;
	@if test -f emil.$(manext) ; then \
		echo " " ;\
		echo "Installing emil.$(manext) in $(mandir)/man$(manext)";\
		$(INSTALL_DATA) emil.$(manext) $(mandir)/man$(manext); \
	fi ;
	@if test -f emil.cf.$(cfmanext) ; then \
		echo " " ;\
		echo "Installing emil.cf.$(cfmanext) in $(mandir)/man$(cfmanext)";\
		$(INSTALL_DATA) emil.cf.$(cfmanext) $(mandir)/man$(cfmanext); \
	fi ;
	@echo " " ;
	@echo "Installation done." ;

installdirs:
	$(srcdir)/mkinstalldirs $(bindir) $(libdir) $(mandir)/man$(manext) \
		$(mandir)/man$(cfmanext)

uninstall: 
	if test -f $(bindir)/emil ; then \
		rm $(bindir)/emil ; \
	fi ;\
	if test -f $(MAINCF) ; then \
		 rm $(MAINCF); \
	fi ;\
	if test -f $(CHARFILE) ; then \
		 rm $(CHARFILE); \
	fi ;\
	if test -f $(mandir)/man$(manext)/emil.$(manext) ; then \
		 rm $(mandir)/man$(manext)/emil.$(manext); \
	fi ;\
	if test -f $(mandir)/man$(cfmanext)/emil.cf.$(cfmanext) ; then \
		 em $(mandir)/man$(cfmanext)/emil.cf.$(cfmanext) ; \
	fi

Makefile: Makefile.in config.status
	$(SHELL) config.status

config.status: configure
	$(SHELL) config.status --recheck

configure: configure.in
	cd $(srcdir); autoconf

config.h.in: configure.in
	cd $(srcdir); autoheader

TAGS: $(SRCS)
	etags $(SRCS)

clean:
	rm -f *.o emil helper y.tab.c lex.yy.c getoption.o getoption.c core \
		emil.$(manext) emil.cf.$(cfmanext) y.output config.ed
	cd charset; make clean

mostlyclean: clean

distclean: clean
	rm -f Makefile config.status config.h config.cache config.log;\
	cd charset; make distclean

realclean: distclean
	rm -f TAGS

devdist: $(DISTFILES)
	if test ! -d emil-$(VERSION)-dev; then \
		mkdir emil-$(VERSION)-dev; \
	fi ; \
	tar cvf - $(DISTFILES) | (cd emil-$(VERSION)-dev; tar xf -) ; \
	tar cf - emil-$(VERSION)-dev | gzip > emil-$(VERSION)-dev.tar.gz

dist: $(DISTFILES)
	if test ! -d emil-$(VERSION); then \
		mkdir emil-$(VERSION); \
	fi ; \
	for file in $(SRCS) $(HDRS) ; do \
		cp COPYRIGHT emil-$(VERSION)/$$file; \
		cat $$file >> emil-$(VERSION)/$$file; \
	done; \
	tar cvf - $(RESTFILES) $(DOCS) | (cd emil-$(VERSION); tar xf -) ; \
	tar cof - emil-$(VERSION) | gzip > emil-$(VERSION).tar.gz

testdist: $(TESTFILES)
	tar cof testdir-$(VERSION).tar testdir-2.1.0; \
	gzip testdir-$(VERSION).tar