~ubuntu-branches/ubuntu/edgy/ess/edgy

« back to all changes in this revision

Viewing changes to doc/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Camm Maguire
  • Date: 2005-03-22 13:48:07 UTC
  • mfrom: (1.2.1 upstream) (2.1.2 hoary)
  • Revision ID: james.westby@ubuntu.com-20050322134807-9mpmbb799jugf248
Tags: 5.2.6-1
* New upstream release
* chmod -R u+w on orig source

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
### Makefile - for DOCUMENTATION (./doc) of ESS distribution.
2
2
###
3
 
### Maintainer: A.J. Rossini <rossini@stat.sc.edu>
4
 
### For ESS Version: 5.x.y
5
 
###
6
 
### File: $Revision: 1.19 $.
7
 
###
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
10
 
### Kyle and Per!
11
3
 
 
4
## Before making changes here, please take a look at Makeconf
12
5
include ../Makeconf
13
6
 
14
 
# where the Info file should go -- THIS MIGHT BE WRONG!
15
 
INFODIR = $(PREFIX)/info
16
 
## XEmacs
17
 
#INFODIR = $(PREFIX)/lib/$(EMACS)/info
18
 
 
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
 
13
##
 
14
 
 
15
TEXI2DVI = LANG=C texi2dvi
 
16
TEXI2PDF = LANG=C texi2pdf
 
17
 
 
18
# To obtain sorted indices run: "texindex ess.??".
22
19
 
23
20
#### no user servicable parts beyond this point ####
24
21
 
25
 
MYWWWDIR = /none/at/this/time
26
 
MYFTPDIR = /none/at/this/time
27
 
 
28
 
# Those README.* that are made from *.texi  [well, all should....]
29
 
READMEtargets = README.SPLUS4WIN README.Microsoft
30
 
 
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
37
 
 
38
 
DOCDIST = ess.ps ess.pdf \
39
 
        ajr-talk.ps ajr-talk.pdf \
40
 
        rmh-talk.ps rmh-talk.pdf
41
 
 
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 \
 
26
        ../VERSION
43
27
 
44
28
### Targets --
45
 
 
46
 
all  : info txts html dvi
47
 
 
48
 
# Documentation mentions info, not ess.info -- NOT readme.info <<< FIXME >>
49
 
info : ess.info
50
 
dvi  :  ess.dvi readme.dvi
51
 
txts : $(READMEtargets)
52
 
 
53
 
#
54
 
# If indexes don't index, run:  "texindex ess.??" to obtain the sorted indices.
55
 
#
56
 
html :  html/ess_toc.html html/readme_toc.html
57
 
 
58
 
ess.dvi : ess.texi; texi2dvi ess.texi
59
 
 
60
 
ess.ps  : ess.dvi; dvips $^ -o $@
61
 
 
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
65
 
 
66
 
readme.dvi : readme.texi; texi2dvi readme.texi
67
 
 
 
29
PDFs = ess.pdf readme.pdf
 
30
DVIs = ess.dvi readme.dvi
 
31
TXTs = ../README ../ANNOUNCE
 
32
 
 
33
all  : info text html dvi pdf
 
34
docs : info text html
 
35
info : info/ess.info
 
36
text : $(TXTs)
 
37
html : html/ess.html html/readme.html
 
38
dvi  : $(DVIs)
 
39
pdf  : $(PDFs)
 
40
ps   : ess.ps  readme.ps
 
41
 
 
42
ess.dvi : $(TEXISRC); $(TEXI2DVI) ess.texi
 
43
ess.pdf : $(TEXISRC); $(TEXI2PDF) ess.texi
 
44
ess.ps  : ess.dvi; LANG=C dvips $^ -o $@
 
45
 
 
46
readme.dvi : $(TEXISRC); $(TEXI2DVI) readme.texi
 
47
readme.pdf : $(TEXISRC); $(TEXI2PDF) readme.texi
68
48
readme.ps  : readme.dvi; dvips $^ -o $@
69
49
 
70
 
readme.pdf : readme.texi; pdftex $^
71
 
 
72
 
install : all
73
 
        mkdir -p $(INFODIR)
74
 
        $(INSTALL) ess.info* $(INFODIR)
75
 
 
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
81
 
 
 
50
cleanaux:
 
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:
 
54
clean: cleanaux
 
55
        -@rm -f $(PDFs) $(DVIs) info/*.info*
 
56
 
 
57
## this removes also things in VC (when they are remade by "make"):
82
58
distclean : clean
83
 
        rm -f ess.dvi ess.ps ess.pdf readme.dvi readme.ps readme.pdf
84
 
        rm -fr html
85
 
 
86
 
##-- Be careful: to recreate the info files you NEED a newer makeinfo !
87
 
realclean : distclean
88
 
        rm -f ess.info*
89
 
 
90
 
### Targets below here are only for developers. --------------------
91
 
 
92
 
 
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' $@
97
 
 
98
 
readme.texi : ../VERSION
99
 
        perl -pi -e 's/($(ESS_REGEXP) \s*[Vv]ersion)\s+$(VER_NR_REGEXP)/$${1} $(shell cat $^)/go' $@
100
 
 
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' $@
104
 
 
105
 
 
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/*
 
60
 
 
61
../README: $(TEXISRC)
 
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/' \
 
64
        > ../README
 
65
 
 
66
../ANNOUNCE: $(TEXISRC)
 
67
        $(MAKETXT) announc.texi \
 
68
        | perl -pe 'last if /^Concept Index/;' > ../ANNOUNCE
 
69
 
 
70
README.Microsoft : README.Microsoft.texi
 
71
        $(MAKETXT) README.Microsoft.texi \
 
72
        | perl -pe 'last if /^Concept Index/;' > README.Microsoft
114
73
 
115
74
### File Dependencies
116
75
 
117
 
ess.info: *.texi
 
76
info/ess.info: $(TEXISRC)
118
77
        @echo "making Info documentation..."
119
78
        $(MAKEINFO) ess.texi
120
 
 
121
 
##-- HTML:
 
79
        mv -f ess.info* info
 
80
 
 
81
install : info/ess.info
 
82
        -$(INSTALLDIR) $(INFODIR)
 
83
        $(INSTALL) info/ess.info* $(INFODIR)
 
84
        test -f $(INFODIR)/dir || $(INSTALL) info/dir $(INFODIR)
 
85
 
122
86
##  TO DO:  ess_toc.html & readme_toc.html should be merged into index.html
123
 
##  =====
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'"
129
 
 
130
 
html/readme_toc.html: *.texi
131
 
        -(mkdir -p html; cd html; $(MAKEHTML) ../readme.texi)
132
 
 
133
 
 
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
 
93
 
 
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