9d42d754b8395850284f9fcbca8fa12faae333e5
[packages] / xemacs-packages / auctex / Makefile
1 # Makefile for AUCTeX lisp code
2
3 # This file is part of XEmacs.
4
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
8 # later version.
9
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
13 # for more details.
14
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.
19
20 VERSION = 1.56
21 AUTHOR_VERSION = 11.88
22 MAINTAINER = Steve Youngs <steve@sxemacs.org>
23 PACKAGE = auctex
24 PKG_TYPE = regular
25 REQUIRES = xemacs-base edit-utils fsf-compat texinfo reftex auctex   \
26         mail-lib sh-script textools dired ispell os-utils text-modes \
27         w3
28 CATEGORY = standard
29 PRELOADS = -l sxepkg.el
30
31 include ../../Local.rules
32
33 ## Extra cmds/opts (LATEX & TEX are already defined in XEmacs.rules)
34 MAKEINFO_PLAIN = -D rawfile --no-headers
35 PDFTEX = pdftex
36 PDFLATEX = pdflatex
37
38 ## The lisp
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         \
44         toolbar-x.elc
45
46 ifeq ($(BUILD_WITHOUT_MULE),)
47 ELCS += tex-jp.elc
48 endif
49
50 FLATS = README INSTALL TODO FAQ CHANGES PROBLEMS.preview
51 PRINTABLES = \
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     \
55         doc/preview-latex.pdf
56 TEXMFGEN = \
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        \
60         latex/prfootnotes.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)
64
65 EXTRA_DEPENDENCIES = $(FLATS) $(PRINTABLES) $(PRVLATEX)
66
67 ## LaTeX Style
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).
75 ELCS_1 = $(STYLEELC)
76 ifeq ('$(MAKECMDGOALS)','install')
77 ELCS_1 =
78 endif
79 ifeq ('$(MAKECMDGOALS)','bindist')
80 ELCS_1 =
81 endif
82
83 ## Extra bits and bobs to be installed into the lisp directory
84 EXTRA_SOURCES = $(wildcard ChangeLog.d/*) $(FLATS) auctex.el RELEASE
85
86 ## LaTeX styles
87 DATA_FILES = $(STYLEELC) $(STYLESRC)
88 DATA_DEST = $(PACKAGE)/style
89
90 ## Images (includes Preview LaTeX images)
91 DATA_1_FILES = $(wildcard images/*.xpm)
92 DATA_1_DEST = $(PACKAGE)/images
93
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
103
104 ## Printables (dvi, ps, pdf)
105 DATA_4_FILES = $(PRINTABLES) $(PREVIEWDOC) doc/tex-ref.tex circ.tex
106 DATA_4_DEST = $(PACKAGE)/doc
107
108 ## Info
109 EXPLICIT_DOCS = doc/auctex.texi doc/preview-latex.texi
110 EXTRA_TEXI_FILES = \
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
117
118 ## Some extra bits that the clean target misses.
119 CLEAN_FILES = \
120         doc/tex-ref.log $(wildcard latex/*.log) latex/preview.aux
121
122 include ../../XEmacs.rules
123
124 ## Generate the preview-latex
125 TEXINPUTS="./latex:"
126 latex/preview-mk.ins: latex/preview.dtx latex/bootstrap.ins
127         $(TEX) --output-directory=latex \
128           '\nonstopmode \input bootstrap.ins'
129
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}}}' \
134           '\endbatchfile'
135
136 $(TEXMFGEN) latex/preview.drv: latex/preview.dtx latex/preview-mk.ins
137         $(TEX) --output-directory=latex '\nonstopmode \input preview-mk.ins'
138
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'
143
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}'
151
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 - >> $@
156
157 INSTALL: doc/install.texi doc/macros.texi
158         $(MAKEINFO) $(MAKEINFO_PLAIN) doc/install.texi --output $@
159
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 - >> $@
163
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 \
167                 --output - >> $@
168
169 CHANGES: doc/changes.texi doc/macros.texi
170         $(MAKEINFO) $(MAKEINFO_PLAIN) doc/changes.texi --output $@
171
172 PROBLEMS.preview: doc/preview-problems.texi doc/macros.texi
173         $(MAKEINFO) $(MAKEINFO_PLAIN) --number-sections \
174                 doc/preview-problems.texi --output $@
175
176 doc/tex-ref.dvi: doc/tex-ref.tex
177         $(TEX) -output-directory=doc doc/tex-ref
178
179 doc/tex-ref.ps: doc/tex-ref.dvi
180         $(DVIPS) doc/tex-ref.dvi -Ppdf -o $@
181
182 doc/tex-ref.pdf: doc/tex-ref.tex
183         $(PDFTEX) -output-directory=doc doc/tex-ref.tex
184
185 doc/auctex.dvi: $(EXPLICIT_DOCS) $(EXTRA_TEXI_FILES)
186         $(TEXI2DVI) -c doc/auctex.texi -o $@
187
188 doc/auctex.ps: $(EXPLICIT_DOCS) $(EXTRA_TEXI_FILES)
189         $(DVIPS) doc/auctex.dvi -Ppdf -o $@
190
191 doc/auctex.pdf: $(EXPLICIT_DOCS) $(EXTRA_TEXI_FILES)
192         $(TEXI2PDF) -c doc/auctex.texi -o $@
193
194 doc/preview-latex.dvi: $(EXPLICIT_DOCS) $(EXTRA_TEXI_FILES)
195         $(TEXI2DVI) -c doc/preview-latex.texi -o $@
196
197 doc/preview-latex.ps: $(EXPLICIT_DOCS) $(EXTRA_TEXI_FILES)
198         $(DVIPS) doc/preview-latex.dvi -Ppdf -o $@
199
200 doc/preview-latex.pdf: $(EXPLICIT_DOCS) $(EXTRA_TEXI_FILES)
201         $(TEXI2PDF) -c doc/preview-latex.texi -o $@
202
203 clean::
204         rm -f $(CLEAN_FILES)