Makefile.am
4.48 KB
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
# This file is part of GNU Mailutils
# Copyright (C) 2000,2001,2002 Free Software Foundation
# See file COPYING in the distribution root directory for copying conditions.
info_TEXINFOS = mailutils.texi
INCFILES=addr.inc http.inc numaddr.inc sfrom.inc url-parse.inc
mailutils_TEXINFOS = \
address.texi \
attribute.texi \
auth.texi \
body.texi \
c-api.texi \
encoding.texi \
envelope.texi \
framework.texi \
folder.texi \
headers.texi \
imap4.texi \
iterator.texi \
libmuauth.texi \
libmu_scm.texi \
libsieve.texi \
locker.texi \
mailbox.texi \
mailer.texi \
maildir.texi \
mbox.texi \
message.texi \
mh.texi \
nntp.texi \
parse822.texi \
pop3.texi \
programs.texi \
sendmail.texi \
smtp.texi \
stream.texi \
url.texi \
$(INCFILES)
## Fake configure into including srcdir to VPATH:
s=${srcdir}:${top_srcdir}/examples/
VPATH = $(s)
SUFFIXES=.c .inc
.c.inc:
sed '1{s/\/\*/@comment /;b};2,/.*\*\//{s/\*\///;s/^/@comment/;b};s/\([{}]\)/@\1/g' $< > $@
DISTCLEANFILES=*.pgs
MAINTAINERCLEANFILES=$(INCFILES)
## Web documentation
BASE_URL="http://www.gnu.org/software/mailutils/manual"
TEXI2HTML=${SHELL} `cd $(top_srcdir); pwd`/missing --run texi2html
DVIPS=${SHELL} `cd $(top_srcdir); pwd`/missing --run dvips
INFO=${SHELL} `cd $(top_srcdir); pwd`/missing --run info
EXTRA_DIST = index.html.in
html: html_mono html_node html_chapter
html_node:
texi2html="$(TEXI2HTML)";\
if ! test -d html_node; then mkdir html_node; fi; \
cd html_node; \
$$texi2html -menu -split_node ../mailutils.texi
html_chapter:
texi2html="$(TEXI2HTML)";\
if ! test -d html_chapter; then mkdir html_chapter; fi; \
cd html_chapter; \
$$texi2html -menu -split_chapter ../mailutils.texi
html_mono:
texi2html="$(TEXI2HTML)";\
if ! test -d html_mono; then mkdir html_mono; fi; \
cd html_mono; \
$$texi2html -menu -monolithic ../mailutils.texi
ps: mailutils.ps
mailutils.ps: mailutils.dvi
$(DVIPS) -omailutils.ps mailutils.dvi
text: mailutils.text
mailutils.text: mailutils.info
$(INFO) --node=Top --subnodes --out mailutils.text -f mailutils.info
mailutils.info.tar.gz:
tar cfz mailutils.info.tar.gz mailutils.info*
mailutils.dvi.gz: mailutils.dvi
gzip -c mailutils.dvi > mailutils.dvi.gz
mailutils.ps.gz: mailutils.ps
gzip -c mailutils.ps > mailutils.ps.gz
mailutils.texi.tar.gz:
tar cfz mailutils.texi.tar.gz *.texi
WEB_HTML=\
html_mono\
html_node\
html_chapter
WEB_BIN=\
mailutils.info.tar.gz\
mailutils.dvi.gz\
mailutils.ps.gz\
mailutils.texi.tar.gz\
mailutils.text
CLEANFILES = $(WEB_BIN)
clean-local:
rm -rf $(WEB_HTML)
WEBDOC=$(WEB_HTML) $(WEB_BIN)
webdocdir: $(WEBDOC) index.html
if ! test -d $(WEBDOCDIR); then mkdir $(WEBDOCDIR); fi; \
here=`cd $(srcdir) && pwd`; \
webdocdir=`cd $(WEBDOCDIR) && pwd`; \
for file in $(WEB_HTML) index.html; do \
if test -d $$here/$$file; then \
cp -pr $$here/$$file $$webdocdir/$$file; \
else \
test -f $$webdocdir/$$file \
|| ln $$here/$$file $$webdocdir/$$file 2> /dev/null \
|| cp -p $$here/$$file $$webdocdir/$$file || :; \
fi; \
done; \
if ! test -d $(WEBDOCDIR)/other; then mkdir $(WEBDOCDIR)/other; fi;\
for file in $(WEB_BIN); do \
if test -d $$here/$$file; then \
cp -pr $$here/$$file $$webdocdir/other/$$file; \
else \
test -f $$webdocdir/other/$$file \
|| ln $$here/$$file $$webdocdir/other/$$file 2> /dev/null \
|| cp -p $$here/$$file $$webdocdir/other/$$file || :; \
fi; \
done
index.html: index.html.in $(WEBDOC)
@echo "s^%BASE_URL%^$(BASE_URL)^;" > .webdoc
@echo "s/%DATE%/`date`/;" >> .webdoc
@echo "s/%UPDATED%/`date +'%B, %d'`/;" >> .webdoc
@echo "s/%PACKAGE_NAME%/$(PACKAGE_NAME)/" >> .webdoc
@echo "s/%PACKAGE%/$(PACKAGE)/" >> .webdoc
@echo "s/%VERSION%/$(VERSION)/" >> .webdoc
@for file in `sed -n 's,.*"other/%PACKAGE%\(.*\)".*,$(PACKAGE)\1,pg;s,.*"\(.*\)%PACKAGE%\(.*\)".*,\1$(PACKAGE)\2,pg' index.html.in`; \
do\
ls -sk $$file; \
done |\
$(AWK) -vPACKAGE=$(PACKAGE) \
'BEGIN { len = length(PACKAGE) } \
{ gsub("\\.", "_", $$2); \
if (match($$2,"/")) \
$$2=substr($$2,RSTART+1); \
print "s/%" toupper(substr($$2,len+2)) "_SIZE%/" $$1 "/;" }' >> .webdoc
sed -f .webdoc index.html.in > index.html
rm -f .webdoc
webdocname=$(PACKAGE)-$(VERSION)-doc
WEBDOCDIR=$(webdocname)
webdoc: $(WEBDOC) index.html
$(MAKE) WEBDOCDIR=$(top_builddir)/doc/texinfo/$(webdocname) webdocdir
cd $(top_builddir)/doc/texinfo &&\
tar cfz $(webdocname).tar.gz $(webdocname) &&\
rm -r $(webdocname)
## End of webdoc