1
1
### Makefile - for DOCUMENTATION (./doc) of ESS distribution.
3
### Maintainer: A.J. Rossini <rossini@stat.sc.edu>
4
### For ESS Version: 5.x.y
6
### File: $Revision: 1.19 $.
8
### Edit the makefile, type `make', and follow the instructions. Based
9
### on (i.e. Borrowed from) VM 5.70, AUC-TeX 9.7p distributions. Thanks
4
## Before making changes here, please take a look at Makeconf
14
# where the Info file should go -- THIS MIGHT BE WRONG!
15
INFODIR = $(PREFIX)/info
17
#INFODIR = $(PREFIX)/lib/$(EMACS)/info
19
7
# program to convert .texi{nfo} to .html
20
MAKEHTML = texi2html -verbose -iso
21
MAKEHTMLs = $(MAKEHTML) -split_chapter -menu -glossary
8
#MM: use makeinfo (i.e. MAKEHTML from above) which is more
9
#-- standardized than texi2html which exists in
10
#MM at least two widely differing versions (TeX vs GNU):
11
TEXI2HTML = LANG=C texi2html -verbose -iso
12
SPLITCHAP = -split_chapter -menu -glossary
15
TEXI2DVI = LANG=C texi2dvi
16
TEXI2PDF = LANG=C texi2pdf
18
# To obtain sorted indices run: "texindex ess.??".
23
20
#### no user servicable parts beyond this point ####
25
MYWWWDIR = /none/at/this/time
26
MYFTPDIR = /none/at/this/time
28
# Those README.* that are made from *.texi [well, all should....]
29
READMEtargets = README.SPLUS4WIN README.Microsoft
31
DOCS = $(READMEtargets) \
32
README README.S README.XLispStat README.SAS README.SPLUS4WIN \
33
ess.texi dir ess.info ess.info-1 ess.info-2 ess.info-3 ess.dvi \
34
TODO Why_S-mode_Rocks.DMS \
35
README-19.28 README.additions NEWS \
36
ajr-talk.tex rmh-talk.tex slverb.sty
38
DOCDIST = ess.ps ess.pdf \
39
ajr-talk.ps ajr-talk.pdf \
40
rmh-talk.ps rmh-talk.pdf
42
# The following works only with GNU Make for most parts.
22
TEXISRC = announc.texi authors.texi bugrept.texi bugs.texi bugs-ms.texi \
23
credits.texi currfeat.texi ess.texi getting.texi help-s.texi \
24
help-sas.texi inst_svn.texi inst_tar.texi license.texi mailing.texi \
25
newfeat.texi readme.texi requires.texi stabilty.texi help-bugs.texi \
46
all : info txts html dvi
48
# Documentation mentions info, not ess.info -- NOT readme.info <<< FIXME >>
50
dvi : ess.dvi readme.dvi
51
txts : $(READMEtargets)
54
# If indexes don't index, run: "texindex ess.??" to obtain the sorted indices.
56
html : html/ess_toc.html html/readme_toc.html
58
ess.dvi : ess.texi; texi2dvi ess.texi
60
ess.ps : ess.dvi; dvips $^ -o $@
62
ess.pdf : ess.texi; pdftex $^
63
## If you don't have pdftex, you won't get the bookmarks, hyperlinks, etc..
64
# ess.pdf: ess.ps ; rm -f ess.pdf ; ps2pdf ess.ps > ess.pdf
66
readme.dvi : readme.texi; texi2dvi readme.texi
29
PDFs = ess.pdf readme.pdf
30
DVIs = ess.dvi readme.dvi
31
TXTs = ../README ../ANNOUNCE
33
all : info text html dvi pdf
37
html : html/ess.html html/readme.html
42
ess.dvi : $(TEXISRC); $(TEXI2DVI) ess.texi
43
ess.pdf : $(TEXISRC); $(TEXI2PDF) ess.texi
44
ess.ps : ess.dvi; LANG=C dvips $^ -o $@
46
readme.dvi : $(TEXISRC); $(TEXI2DVI) readme.texi
47
readme.pdf : $(TEXISRC); $(TEXI2PDF) readme.texi
68
48
readme.ps : readme.dvi; dvips $^ -o $@
70
readme.pdf : readme.texi; pdftex $^
74
$(INSTALL) ess.info* $(INFODIR)
76
clean : ; rm -f texput.log \
77
ess.aux ess.cp ess.ky ess.log ess.pg ess.toc \
78
ess.tp ess.vr ess.cps ess.fns ess.vrs ess.fn \
79
readme.aux readme.cp readme.ky readme.log readme.pg readme.toc \
80
readme.tp readme.vr readme.cps readme.fns readme.vrs readme.fn
51
-@rm -f *.aux *.cp *.cps *.fn *.fns *.ky *.kys *.log *.out \
52
*.pg *.pgs *.ps *.ps-2 *.tmp *.toc *.tp *.vr *.vrs
53
## this shall remove *exactly* those things that are *not* in version control:
55
-@rm -f $(PDFs) $(DVIs) info/*.info*
57
## this removes also things in VC (when they are remade by "make"):
83
rm -f ess.dvi ess.ps ess.pdf readme.dvi readme.ps readme.pdf
86
##-- Be careful: to recreate the info files you NEED a newer makeinfo !
90
### Targets below here are only for developers. --------------------
93
### Replace Version numbers (as in ../lisp/Makefile !):
94
## Use $(shell ..) only here, so only these are GNU make dependent :
95
README.SPLUS4WIN announc.texi inst_*.texi : ../VERSION
96
perl -pi -e 's/$(ESSVER_NR_REGEXP)/$${1}-$(shell cat $^)/go' $@
98
readme.texi : ../VERSION
99
perl -pi -e 's/($(ESS_REGEXP) \s*[Vv]ersion)\s+$(VER_NR_REGEXP)/$${1} $(shell cat $^)/go' $@
101
## ess.texi: use the perl for the above two combined:
102
ess.texi : ../VERSION
103
perl -pi -e 's/$(ESSVER_NR_REGEXP)/$${1}-$(shell cat $^)/go;s/($(ESS_REGEXP) \s*[Vv]ersion\s+)$(VER_NR_REGEXP)/$${1}$(shell cat $^)/go' $@
106
##dist-doc: $(DOCDISTFILES)
107
## @echo "**********************************************************"
108
## @echo "** Making distribution of ESS-DOC for release $(shell cat $^)"
109
## @echo "**********************************************************"
110
## tar hcovf $(VERSIONDIR)-doc.tar $(DOCDISTFILES)
111
## gzip $(VERSIONDIR)-doc.tar
112
## cp $(VERSIONDIR)-doc.tar.gz $(MYWWWDIR)
113
## cp $(VERSIONDIR)-doc.tar.gz $(MYFTPDIR)
59
-@rm -f $(TXTs) html/*
62
$(MAKETXT) readme.texi \
63
| perl -pe 'last if /^Concept Index/; print "For INSTALLATION, see way below.\n\n" if /^\s*ESS grew out of/' \
66
../ANNOUNCE: $(TEXISRC)
67
$(MAKETXT) announc.texi \
68
| perl -pe 'last if /^Concept Index/;' > ../ANNOUNCE
70
README.Microsoft : README.Microsoft.texi
71
$(MAKETXT) README.Microsoft.texi \
72
| perl -pe 'last if /^Concept Index/;' > README.Microsoft
115
74
### File Dependencies
76
info/ess.info: $(TEXISRC)
118
77
@echo "making Info documentation..."
119
78
$(MAKEINFO) ess.texi
81
install : info/ess.info
82
-$(INSTALLDIR) $(INFODIR)
83
$(INSTALL) info/ess.info* $(INFODIR)
84
test -f $(INFODIR)/dir || $(INSTALL) info/dir $(INFODIR)
122
86
## TO DO: ess_toc.html & readme_toc.html should be merged into index.html
124
html/ess_toc.html: *.texi
87
html/ess.html: $(TEXISRC)
125
88
@echo "making HTML documentation..."
126
-(mkdir -p html; cd html; $(MAKEHTMLs) ../ess.texi)
127
-@(cd html; rm -f index.html; ln -s ess_toc.html index.html)
128
@echo "Test by pointing your browser to 'file://localhost/$$PWD/html/index.html'"
130
html/readme_toc.html: *.texi
131
-(mkdir -p html; cd html; $(MAKEHTML) ../readme.texi)
134
README.Microsoft : README.Microsoft.texi
135
$(MAKEINFOascii) README.Microsoft.texi \
136
| perl -pe 'last if /^Concept Index/;' > README.Microsoft
89
$(MAKEHTML) ess.texi && mv -f ess.html html
90
#MM $(TEXI2HTML) $(SPLITCHAP) ess.texi
91
#MM test -d ess && cp -p ess/ess_toc.html html/index.html || cp -p ess_toc.html html/index.html
92
#MM test -d ess && mv -f ess/*.html html || mv -f *.html html
94
html/readme.html: $(TEXISRC)
95
$(MAKEHTML) --no-validate readme.texi
96
## ^^^^^^^^^^^^^ (design bug: "FIXME" in ess.texi)
97
#MM $(TEXI2HTML) readme.texi
98
mv -f readme.html html