Initial Commit
[packages] / xemacs-packages / auctex / doc / Makefile.in
1 # Makefile for AUCTeX
2
3 # Maintainer: auctex-devel@gnu.org
4
5 # Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
6
7 # This file is part of AUCTeX.
8
9 # AUCTeX is free software; you can redistribute it and/or modify it
10 # under the terms of the GNU General Public License as published by
11 # the Free Software Foundation; either version 3, or (at your option)
12 # any later version.
13
14 # AUCTeX is distributed in the hope that it will be useful, but
15 # WITHOUT ANY WARRANTY; without even the implied warranty of
16 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
17 # General Public License for more details.
18
19 # You should have received a copy of the GNU General Public License
20 # along with AUCTeX; see the file COPYING.  If not, write to the Free
21 # Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
22 # MA 02110-1301, USA.
23
24 prefix=@prefix@$(null)
25 datarootdir=@datarootdir@$(null)
26 datadir=@datadir@$(null)
27 packagedir=@packagedir@$(null)
28 infodir=@infodir@$(null)
29 docdir=@docdir@$(null)
30 TEX=@TEX@
31 PDFTEX=@PDFTEX@
32 MAKEINFO=@MAKEINFO@
33 MAKEINFO_PLAIN=-D rawfile --no-headers
34 INSTALL_INFO=@INSTALL_INFO@
35 INSTALL=@INSTALL@
36 INSTALL_DATA=@INSTALL_DATA@
37 DESTDIR=
38 # If `texi2html' is not available, use `makeinfo' when possible.  Set the ToC
39 # file accordingly.  Actually, makeinfo >= 5 is needed, but we don't check the
40 # version.
41 ifneq (@TEXI2HTML@,:)
42         TEXI2HTML=@TEXI2HTML@
43         TEXI2HTML_TOC=auctex_toc.html
44 else
45         ifneq (@MAKEINFO@,:)
46                 TEXI2HTML=@MAKEINFO@ --html
47                 TEXI2HTML_TOC=index.html
48         else
49                 TEXI2HTML=@TEXI2HTML@
50                 TEXI2HTML_TOC=auctex_toc.html
51         endif
52 endif
53 TEXI2DVI=@TEXI2DVI@
54 TEXI2PDF=@TEXI2PDF@
55 MKINSTALLDIRS = ../mkinstalldirs
56 DVIPS=@DVIPS@
57 PERL=@PERL@
58 AUCTEXDATE=@AUCTEXDATE@
59 AUCTEXVERSION=@AUCTEXVERSION@
60 PACKAGE_TARNAME=@PACKAGE_TARNAME@
61
62 AUCTEXTEXIFILES = auctex.texi install.texi wininstall.texi intro.texi \
63         changes.texi todo.texi faq.texi macros.texi quickstart.texi \
64         fdl.texi version.texi
65 PREVIEWTEXIFILES = copying.texi preview-faq.texi macros.texi \
66         preview-dtxdoc.texi preview-latex.texi preview-problems.texi \
67         preview-readme.texi preview-todo.texi version.texi
68 DISTTEXTS = ../README ../INSTALL ../TODO ../INSTALL.windows ../FAQ ../CHANGES   \
69         ../PROBLEMS.preview
70
71 all: dist
72
73 info: auctex.info preview-latex.info
74
75 dvi: auctex.dvi tex-ref.dvi preview-latex.dvi
76
77 install: install-auctex install-preview
78
79 install-man:
80         test x$(packagedir) != xno && \
81         { $(MKINSTALLDIRS) $(DESTDIR)$(packagedir)/man/auctex ; \
82         for i in $(AUCTEXTEXIFILES) $(PREVIEWTEXIFILES) tex-ref.tex ; \
83         do echo $(INSTALL_DATA) $$i $(DESTDIR)$(packagedir)/man/auctex; \
84            $(INSTALL_DATA) $$i $(DESTDIR)$(packagedir)/man/auctex; \
85         done ; \
86         }
87
88 dist: $(DISTTEXTS) preview-latex.info auctex.info tex-ref.pdf
89
90 extradist: html/$(TEXI2HTML_TOC) auctex.ps auctex.pdf tex-ref.ps tex-ref.pdf
91
92 .PHONY: all info dvi dist install-auctex disttexts clean distclean \
93         maintainer-clean install-preview install-man html-docs extradist
94
95 # AUCTeX
96
97 html/$(TEXI2HTML_TOC): auctex.texi
98         rm -rf html
99         mkdir html
100         cd html && $(TEXI2HTML) --split=node -I .. ../auctex.texi && \
101         test ! -d auctex || { mv auctex/* . && rm -rf auctex ; }
102
103 tex-ref.dvi: tex-ref.tex
104         $(TEX) tex-ref
105
106 tex-ref.ps: tex-ref.dvi
107         $(DVIPS) tex-ref.dvi -Ppdf -o tex-ref.ps
108
109 tex-ref.pdf: tex-ref.tex
110         $(PDFTEX) tex-ref.tex
111
112 version.texi: ../ChangeLog
113         echo @set VERSION $(AUCTEXVERSION) >version.texi
114         echo @set UPDATED $(AUCTEXDATE) >>version.texi
115
116 auctex.dvi: $(AUCTEXTEXIFILES)
117         $(TEXI2DVI) auctex.texi
118
119 auctex.pdf: $(AUCTEXTEXIFILES)
120         $(TEXI2PDF) auctex.texi
121
122 auctex.ps: auctex.dvi
123         $(DVIPS) auctex.dvi -Ppdf -o auctex.ps
124
125 auctex.info: $(AUCTEXTEXIFILES)
126         $(MAKEINFO) auctex.texi
127
128 install-auctex: auctex.info tex-ref.pdf
129         -$(MKINSTALLDIRS) $(DESTDIR)$(infodir)
130         rm -f $(DESTDIR)$(infodir)/auctex $(DESTDIR)$(infodir)/auctex-*
131         $(INSTALL_DATA) auctex.info $(DESTDIR)$(infodir)
132         for x in auctex.info-*; do \
133           if [ -r $$x ]; then \
134             $(INSTALL_DATA) $$x $(DESTDIR)$(infodir) ; \
135           fi; \
136         done
137         -$(INSTALL_INFO)  --info-dir=$(DESTDIR)$(infodir) auctex.info
138         test X$(packagedir) != Xno || { \
139           $(MKINSTALLDIRS) $(DESTDIR)$(docdir); \
140           rm -f $(DESTDIR)$(docdir)/tex-ref.pdf; \
141           $(INSTALL_DATA) tex-ref.pdf $(DESTDIR)$(docdir); \
142         }
143
144 # preview
145
146 preview-latex/index.html: $(PREVIEWTEXIFILES)
147         rm -f preview-latex/*
148         $(TEXI2HTML) preview-latex.texi
149
150 html-docs: preview-latex/index.html
151
152 preview-dtxdoc.texi: ../preview/latex/preview.dtx preview-dtxdoc.pl
153         -$(PERL) preview-dtxdoc.pl ../preview/latex/preview.dtx \
154                 preview-dtxdoc.texi
155
156 preview-latex.dvi: $(PREVIEWTEXIFILES)
157         $(TEXI2DVI) preview-latex.texi
158
159 preview-latex.ps: preview-latex.dvi
160         $(DVIPS) preview-latex.dvi -Ppdf -o preview-latex.ps
161
162 preview-latex.pdf: $(PREVIEWTEXIFILES)
163         $(TEXI2PDF) preview-latex.texi
164
165 preview-latex.info: $(PREVIEWTEXIFILES)
166         $(MAKEINFO) preview-latex.texi
167
168 install-preview: preview-latex.info
169         -$(MKINSTALLDIRS) $(DESTDIR)$(infodir)
170         for x in preview-latex.info* ; do \
171                 $(INSTALL_DATA) $$x $(DESTDIR)$(infodir) ; \
172         done
173         -$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) preview-latex.info
174
175 # disttexts
176
177 ../INSTALL: install.texi macros.texi
178         $(MAKEINFO) $(MAKEINFO_PLAIN) install.texi --output $@
179
180 ../INSTALL.windows: wininstall.texi macros.texi
181         $(MAKEINFO) $(MAKEINFO_PLAIN) wininstall.texi --output $@
182
183 ../README: intro.texi preview-readme.texi macros.texi
184         $(MAKEINFO) $(MAKEINFO_PLAIN) intro.texi --output $@
185         $(MAKEINFO) $(MAKEINFO_PLAIN) preview-readme.texi --output - >> $@
186
187 ../CHANGES: changes.texi macros.texi
188         $(MAKEINFO) $(MAKEINFO_PLAIN) changes.texi --output $@
189
190 ../TODO: todo.texi preview-todo.texi macros.texi
191         $(MAKEINFO) $(MAKEINFO_PLAIN) todo.texi --output $@
192         $(MAKEINFO) $(MAKEINFO_PLAIN) preview-todo.texi --output - >> $@
193
194 ../FAQ: faq.texi preview-faq.texi macros.texi
195         $(MAKEINFO) $(MAKEINFO_PLAIN) faq.texi --output $@
196         $(MAKEINFO) $(MAKEINFO_PLAIN) --number-sections preview-faq.texi --output - >> $@
197
198 ../PROBLEMS.preview: preview-problems.texi macros.texi
199         $(MAKEINFO) $(MAKEINFO_PLAIN) --number-sections preview-problems.texi --output $@
200
201 # clean
202
203 clean:
204         rm -f *.dvi *.ps *.pdf *.aux *.cp *.fn *.ky *.log *~ \#*\# \
205                 *.tp *.vr *.pg *.toc *.tp *.bak *.cps *.kys *.tps \
206                 *.fns *.vrs *.pgs *.tmp *.html
207         rm -rf html preview-latex
208
209 distclean: clean
210         rm -f Makefile
211
212 maintainer-clean: distclean
213         rm -f INSTALL.windows README CHANGES HISTORY TODO FAQ \
214                 preview-dtxdoc.texi version.texi $(DISTTEXTS) *.info *.info-*