1 # Makefile for AUCTeX lisp code
3 # This file is part of XEmacs.
5 # XEmacs is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU General Public License as published by the
7 # Free Software Foundation; either version 2, or (at your option) any
10 # XEmacs is distributed in the hope that it will be useful, but WITHOUT
11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 # You should have received a copy of the GNU General Public License
16 # along with XEmacs; see the file COPYING. If not, write to
17 # the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 # Boston, MA 02111-1307, USA.
21 AUTHOR_VERSION = 11.88
22 MAINTAINER = Steve Youngs <steve@sxemacs.org>
25 REQUIRES = xemacs-base edit-utils fsf-compat texinfo reftex auctex \
26 mail-lib sh-script textools dired ispell os-utils text-modes \
29 PRELOADS = -l sxepkg.el
31 include ../../Local.rules
33 ## Extra cmds/opts (LATEX & TEX are already defined in XEmacs.rules)
34 MAKEINFO_PLAIN = -D rawfile --no-headers
39 ELCS = bib-cite.elc context-en.elc context-nl.elc context.elc \
40 font-latex.elc latex.elc multi-prompt.elc plain-tex.elc \
41 preview.elc prv-xemacs.elc tex-bar.elc tex-buf.elc \
42 tex-fold.elc tex-font.elc tex-info.elc tex-mik.elc \
43 tex-site.elc tex-style.elc tex.elc texmathp.elc \
46 ifeq ($(BUILD_WITHOUT_MULE),)
50 FLATS = README INSTALL TODO FAQ CHANGES PROBLEMS.preview
52 doc/tex-ref.dvi doc/tex-ref.ps doc/tex-ref.pdf \
53 doc/auctex.dvi doc/auctex.ps doc/auctex.pdf \
54 doc/preview-latex.dvi doc/preview-latex.ps \
57 latex/preview.sty latex/prauctex.def latex/prauctex.cfg \
58 latex/prshowbox.def latex/prshowlabels.def latex/prtracingall.def \
59 latex/prtightpage.def latex/prlyx.def latex/prcounters.def \
61 PREVIEW = latex/preview-mk.ins latex/preview.ins latex/preview.drv
62 PREVIEWDOC = latex/preview.dvi latex/preview.pdf
63 PRVLATEX = $(TEXMFGEN) $(PREVIEW) $(PREVIEWDOC)
65 EXTRA_DEPENDENCIES = $(FLATS) $(PRINTABLES) $(PRVLATEX)
68 STYLESRC = $(wildcard style/*.el)
69 STYLEELC = $(STYLESRC:.el=.elc)
70 # Build the style files by abusing ELCS_1. We set it during compile,
71 # but unset it during installs. Normally, ELCS_1 files are installed
72 # to a subdir under lisp/$PACKAGE and we REALLY DON'T WANT THAT for
73 # AUCTeX style files. Those shouldn't be anywhere near a load-path.
74 # They are installed to etc/auctex/style. (see: DATA_FILES, DATA_DEST).
76 ifeq ('$(MAKECMDGOALS)','install')
79 ifeq ('$(MAKECMDGOALS)','bindist')
83 ## Extra bits and bobs to be installed into the lisp directory
84 EXTRA_SOURCES = $(wildcard ChangeLog.d/*) $(FLATS) auctex.el RELEASE
87 DATA_FILES = $(STYLEELC) $(STYLESRC)
88 DATA_DEST = $(PACKAGE)/style
90 ## Images (includes Preview LaTeX images)
91 DATA_1_FILES = $(wildcard images/*.xpm)
92 DATA_1_DEST = $(PACKAGE)/images
94 ## Preview LaTeX sty texmf
95 # These should ideally be installed to a texmf directory with the ls-R
96 # database updated for them. However, that's a little beyond the
97 # scope of SXEmacs packages and things will still operate OK without
98 # this (though not outside of AUCTeX/SXEmacs)
99 DATA_2_FILES = $(TEXMFGEN) $(PREVIEW)
100 DATA_2_DEST = $(PACKAGE)/latex
101 DATA_3_FILES = latex/bootstrap.ins latex/preview.dtx latex/README
102 DATA_3_DEST = $(PACKAGE)/latex
104 ## Printables (dvi, ps, pdf)
105 DATA_4_FILES = $(PRINTABLES) $(PREVIEWDOC) doc/tex-ref.tex circ.tex
106 DATA_4_DEST = $(PACKAGE)/doc
109 EXPLICIT_DOCS = doc/auctex.texi doc/preview-latex.texi
111 doc/changes.texi doc/faq.texi doc/fdl.texi doc/install.texi \
112 doc/intro.texi doc/macros.texi doc/preview-dtxdoc.texi \
113 doc/preview-faq.texi doc/preview-problems.texi \
114 doc/preview-readme.texi doc/preview-todo.texi \
115 doc/quickstart.texi doc/todo.texi doc/version.texi \
116 doc/wininstall.texi doc/history.texi
118 ## Some extra bits that the clean target misses.
120 doc/tex-ref.log $(wildcard latex/*.log) latex/preview.aux
122 include ../../XEmacs.rules
124 ## Generate the preview-latex
126 latex/preview-mk.ins: latex/preview.dtx latex/bootstrap.ins
127 $(TEX) --output-directory=latex \
128 '\nonstopmode \input bootstrap.ins'
130 latex/preview.ins: latex/preview.dtx
131 $(TEX) --output-directory=latex \
132 '\nonstopmode\def\jobname{.ins}\input docstrip ' \
133 '\generate{\file{preview.ins}{\from{preview.dtx}{installer}}}' \
136 $(TEXMFGEN) latex/preview.drv: latex/preview.dtx latex/preview-mk.ins
137 $(TEX) --output-directory=latex '\nonstopmode \input preview-mk.ins'
139 latex/preview.dvi: latex/preview.drv latex/preview.dtx latex/preview.sty
140 $(LATEX) --output-directory=latex '\nonstopmode \input preview.drv'
141 $(LATEX) --output-directory=latex '\nonstopmode \input preview.drv'
142 $(LATEX) --output-directory=latex '\nonstopmode \input preview.drv'
144 latex/preview.pdf: latex/preview.drv latex/preview.dtx latex/preview.sty
145 $(PDFLATEX) --output-directory=latex \
146 '\nonstopmode \AtBeginDocument{\OnlyDescription}\input{preview.drv}'
147 $(PDFLATEX) --output-directory=latex \
148 '\nonstopmode \AtBeginDocument{\OnlyDescription}\input{preview.drv}'
149 $(PDFLATEX) --output-directory=latex \
150 '\nonstopmode \AtBeginDocument{\OnlyDescription}\input{preview.drv}'
152 ## A plethora of extra docs and manuals
153 README: doc/intro.texi doc/preview-readme.texi doc/macros.texi
154 $(MAKEINFO) $(MAKEINFO_PLAIN) doc/intro.texi --output $@
155 $(MAKEINFO) $(MAKEINFO_PLAIN) doc/preview-readme.texi --output - >> $@
157 INSTALL: doc/install.texi doc/macros.texi
158 $(MAKEINFO) $(MAKEINFO_PLAIN) doc/install.texi --output $@
160 TODO: doc/todo.texi doc/preview-todo.texi doc/macros.texi
161 $(MAKEINFO) $(MAKEINFO_PLAIN) doc/todo.texi --output $@
162 $(MAKEINFO) $(MAKEINFO_PLAIN) doc/preview-todo.texi --output - >> $@
164 FAQ: doc/faq.texi doc/preview-faq.texi doc/macros.texi
165 $(MAKEINFO) $(MAKEINFO_PLAIN) doc/faq.texi --output $@
166 $(MAKEINFO) $(MAKEINFO_PLAIN) --number-sections doc/preview-faq.texi \
169 CHANGES: doc/changes.texi doc/macros.texi
170 $(MAKEINFO) $(MAKEINFO_PLAIN) doc/changes.texi --output $@
172 PROBLEMS.preview: doc/preview-problems.texi doc/macros.texi
173 $(MAKEINFO) $(MAKEINFO_PLAIN) --number-sections \
174 doc/preview-problems.texi --output $@
176 doc/tex-ref.dvi: doc/tex-ref.tex
177 $(TEX) -output-directory=doc doc/tex-ref
179 doc/tex-ref.ps: doc/tex-ref.dvi
180 $(DVIPS) doc/tex-ref.dvi -Ppdf -o $@
182 doc/tex-ref.pdf: doc/tex-ref.tex
183 $(PDFTEX) -output-directory=doc doc/tex-ref.tex
185 doc/auctex.dvi: $(EXPLICIT_DOCS) $(EXTRA_TEXI_FILES)
186 $(TEXI2DVI) -c doc/auctex.texi -o $@
188 doc/auctex.ps: $(EXPLICIT_DOCS) $(EXTRA_TEXI_FILES)
189 $(DVIPS) doc/auctex.dvi -Ppdf -o $@
191 doc/auctex.pdf: $(EXPLICIT_DOCS) $(EXTRA_TEXI_FILES)
192 $(TEXI2PDF) -c doc/auctex.texi -o $@
194 doc/preview-latex.dvi: $(EXPLICIT_DOCS) $(EXTRA_TEXI_FILES)
195 $(TEXI2DVI) -c doc/preview-latex.texi -o $@
197 doc/preview-latex.ps: $(EXPLICIT_DOCS) $(EXTRA_TEXI_FILES)
198 $(DVIPS) doc/preview-latex.dvi -Ppdf -o $@
200 doc/preview-latex.pdf: $(EXPLICIT_DOCS) $(EXTRA_TEXI_FILES)
201 $(TEXI2PDF) -c doc/preview-latex.texi -o $@