not sure how long ago i made some of these changes... the sleep
[ess.git] / doc / Makefile
blob22bfcb88a40a8703192b2b3123ebcd779a84e19d
1 ### Makefile - for DOCUMENTATION (./doc) of ESS distribution.
2 ###
4 ## Before making changes here, please take a look at Makeconf
5 include ../Makeconf
7 # program to convert .texi{nfo} to .html
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 #MM TEXI2HTML = LANG=C texi2html -verbose -iso
12 #MM SPLITCHAP = -split_chapter -menu -glossary
15 TEXI2DVI = LANG=C texi2dvi
16 TEXI2PDF = LANG=C texi2dvi --pdf
18 # To obtain sorted indices run: "texindex ess.??".
20 #### no user servicable parts beyond this point ####
22 TEXISRC = announc.texi authors.texi bugrept.texi bugs.texi bugs-ms.texi \
23 credits.texi currfeat.texi ess.texi ess-defs.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
28 ESSINFONODE1='* ESS: (ess).'
29 ESSINFONODE2=' Emacs Speaks Statistics'
30 ESSINFONODE3=' (S/S+/R, SAS, BUGS, Stata, XLisp-Stat).'
32 ### Targets --
33 PDFs = ess.pdf readme.pdf refcard/refcard.pdf
34 DVIs = ess.dvi readme.dvi
35 TXTs = ../README ../ANNOUNCE
37 all : info text html dvi pdf
38 docs : info text html
39 info : info/ess.info
40 text : $(TXTs)
41 html : html/ess.html html/readme.html
42 dvi : $(DVIs)
43 pdf : $(PDFs)
44 ps : ess.ps readme.ps
46 ess.dvi : $(TEXISRC); $(TEXI2DVI) ess.texi
47 ess.pdf : $(TEXISRC); $(TEXI2PDF) ess.texi
48 ess.ps : ess.dvi; LANG=C dvips $^ -o $@
50 readme.dvi : $(TEXISRC); $(TEXI2DVI) readme.texi
51 readme.pdf : $(TEXISRC); $(TEXI2PDF) readme.texi
52 readme.ps : readme.dvi; dvips $^ -o $@
54 cleanaux:
55 -@rm -f *.aux *.cp *.cps *.fn *.fns *.ky *.kys *.log *.out \
56 *.pg *.pgs *.ps *.ps-2 *.tmp *.toc *.tp *.vr *.vrs
57 ## this shall remove *exactly* those things that are *not* in version control:
58 clean: cleanaux
59 -@rm -f $(PDFs) $(DVIs) info/*.info*
61 ## this removes also things in VC (when they are remade by "make"):
62 distclean : clean
63 -@rm -f $(TXTs) html/*
65 ../README: $(TEXISRC)
66 $(MAKETXT) readme.texi \
67 | perl -pe 'last if /^Concept Index/; print "For INSTALLATION, see way below.\n\n" if /^\s*ESS grew out of/' \
68 > ../README
70 ../ANNOUNCE: $(TEXISRC)
71 $(MAKETXT) announc.texi \
72 | perl -pe 'last if /^Concept Index/;' > ../ANNOUNCE
74 README.Microsoft : README.Microsoft.texi
75 $(MAKETXT) README.Microsoft.texi \
76 | perl -pe 'last if /^Concept Index/;' > README.Microsoft
78 ### File Dependencies
80 info/ess.info: $(TEXISRC)
81 @echo "making Info documentation..."
82 $(MAKEINFO) ess.texi
83 mv -f ess.info info
85 install : info/ess.info
86 -$(INSTALLDIR) $(INFODIR)
87 $(INSTALL) info/ess.info $(INFODIR)
88 test -f $(INFODIR)/dir || $(INSTALL) dir.txt $(INFODIR)/dir
89 grep $(ESSINFONODE1) $(INFODIR)/dir || \
90 (echo >> $(INFODIR)/dir; echo 'Emacs' >> $(INFODIR)/dir; \
91 echo $(ESSINFONODE1) $(ESSINFONODE2) >> $(INFODIR)/dir; \
92 echo $(ESSINFONODE3) >> $(INFODIR)/dir)
94 ## TO DO: ess_toc.html & readme_toc.html should be merged into index.html
95 html/ess.html: $(TEXISRC)
96 @echo "making HTML documentation..."
97 $(MAKEHTML) ess.texi && mv -f ess.html html
98 #MM $(TEXI2HTML) $(SPLITCHAP) ess.texi
99 #MM test -d ess && cp -p ess/ess_toc.html html/index.html || cp -p ess_toc.html html/index.html
100 #MM test -d ess && mv -f ess/*.html html || mv -f *.html html
102 html/readme.html: $(TEXISRC)
103 $(MAKEHTML) --no-validate readme.texi
104 ## ^^^^^^^^^^^^^ (design bug: "FIXME" in ess.texi)
105 #MM $(TEXI2HTML) readme.texi
106 mv -f readme.html html
108 refcard/refcard.pdf: refcard/refcard.tex
109 (cd refcard ; pdflatex refcard)