Initial Commit
[packages] / xemacs-packages / auctex / Makefile
1 # Makefile for AUC TeX 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
21 VERSION = 1.56
22 AUTHOR_VERSION = 11.88
23 MAINTAINER = Uwe Brauer <oub@mat.ucm.es>
24 PACKAGE = auctex
25 PKG_TYPE = regular
26 REQUIRES = xemacs-base texinfo fsf-compat mail-lib edit-utils
27 CATEGORY = standard
28
29 include ../../Local.rules
30
31 ELCC=$(XEMACS) -batch -q -no-site-file -no-init-file -l lpath.el
32
33 MULESRC = tex-jp.el
34 MULEELC = tex-jp.elc
35
36 AUCSRC = tex.el tex-buf.el tex-style.el plain-tex.el latex.el tex-info.el \
37         texmathp.el multi-prompt.el tex-mik.el font-latex.el tex-font.el \
38         context.el context-en.el context-nl.el tex-fold.el \
39         toolbar-x.el tex-bar.el bib-cite.el 
40 AUCELC = $(AUCSRC:.el=.elc)
41
42 STYLESRC = style/prosper.el \
43            style/slides.el    style/foils.el     style/amstex.el \
44            style/article.el   style/book.el      style/letter.el \
45            style/report.el    style/amsart.el    style/amsbook.el \
46            style/epsf.el      style/psfig.el     style/latexinfo.el \
47            style/dutch.el     style/german.el    style/dk.el \
48            style/j-article.el style/j-book.el    style/j-report.el \
49            style/jarticle.el  style/jbook.el     style/jreport.el \
50            style/dinbrief.el  style/virtex.el    style/plfonts.el \
51            style/plhb.el      style/harvard.el   style/swedish.el \
52            style/danish.el    style/slovak.el    style/czech.el \
53            style/amsmath.el   style/amstext.el   style/amsbsy.el \
54            style/amsopn.el    style/amsthm.el    style/natbib.el \
55            style/index.el     style/makeidx.el   style/multind.el \
56            style/varioref.el  style/fancyref.el  style/mdwlist.el \
57            style/ngerman.el   style/graphicx.el  style/graphics.el \
58            style/verbatim.el  style/scrbase.el   style/scrartcl.el \
59            style/scrbook.el   style/scrreprt.el  style/scrlttr2.el \
60            style/scrpage2.el  style/captcont.el  style/subfigure.el \
61            style/paralist.el  style/booktabs.el  style/emp.el \
62            style/jura.el      style/alphanum.el  style/beamer.el \
63            style/alltt.el     style/italian.el   style/doc.el \
64            style/ltxdoc.el    style/ltx-base.el  style/units.el \
65            style/nicefrac.el  style/url.el       style/listings.el \
66            style/jurabib.el   style/csquotes.el  style/jsarticle.el \
67            style/jsbook.el    style/babel.el     style/dk-bib.el \
68            style/inputenc.el  style/frenchb.el   style/francais.el \
69            style/MinionPro.el style/pdfsync.el   style/polish.el \
70            style/polski.el    style/CJK.el       style/CJKutf8.el \
71            style/acro.el      style/comment.el   style/filecontents.el \
72            style/acronym.el       style/english.el       style/flashcards.el \
73            style/afterpage.el style/epigraph.el  style/fontspec.el \
74            style/amssymb.el       style/everysel.el      style/footmisc.el \
75            style/array.el         style/exercise.el      style/french.el \
76            style/austrian.el  style/fancyhdr.el  style/hyperref.el \
77            style/biblatex.el  style/fancynum.el  style/icelandic.el \
78            style/bigdelim.el  style/fancyvrb.el  style/imakeidx.el \
79            style/bigstrut.el  style/kantlipsum.el style/bm.el \
80            style/bulgarian.el style/mathtools.el style/nomencl.el \
81            style/kpfonts.el       style/memoir.el        style/placeins.el \
82            style/lettrine.el  style/metalogo.el  style/plext.el \
83            style/lipsum.el        style/mflogo.el        style/pst-grad.el \
84            style/longtable.el style/multicol.el  style/pst-node.el \
85            style/lscape.el        style/multido.el       style/pst-plot.el \
86            style/luacode.el       style/multirow.el  style/pst-slpe.el \
87            style/ruby.el      style/nameref.el   style/pstricks.el \
88            style/setspace.el  style/naustrian.el style/ragged2e.el \
89            style/shortvrb.el  style/siunitx.el style/tabularx.el \
90            style/tabulary.el  style/ulem.el  style/unicode-math.el \
91            style/xparse.el style/xspace.el style/cleveref.el \
92
93
94 STYLEELC = $(STYLESRC:.el=.elc)
95
96 DISTCLEANFILES = auctex.el auto-loads.el
97 DISTTEXTS = FAQ INSTALL INSTALL.windows README TODO
98
99 EXTRA_DEPENDENCIES = $(STYLEELC) \
100         doc/tex-ref.dvi doc/tex-ref.log \
101         INSTALLATION README CHANGES \
102         $(DATA_3_FILES) $(DATA_4_FILES)
103
104 DATA_FILES = $(STYLEELC) $(STYLESRC)
105 DATA_DEST = $(PACKAGE)/style
106 # DATA_1_FILES = .dummy
107 # DATA_1_DEST = $(PACKAGE)/var
108 # DATA_2_FILES = $(wildcard images/*.xpm)
109 # DATA_2_DEST = $(PACKAGE)/images
110 DATA_1_FILES = $(wildcard images/*.xpm)
111 DATA_1_DEST = $(PACKAGE)/images
112
113 PRVSRC = preview/preview.el preview/prv-xemacs.el
114 ELCS_1 = $(PRVSRC:.el=.elc)
115 ELCS_1_DEST = $(PACKAGE)
116 ELCS_1_FILES = $(ELCS_1) $(PRVSRC)
117
118 ICON_SOURCES = \
119  preview/images/prverr16.xpm  preview/images/prverr20.xpm       preview/images/prverr24.xbm \
120  preview/images/prverr24.xpm  preview/images/prvtex-cap-up.xpm  preview/images/prvtex12.xbm \
121  preview/images/prvtex12.xpm  preview/images/prvtex16.xbm       preview/images/prvtex16.xpm \
122  preview/images/prvtex20.xpm  preview/images/prvtex24.xbm       preview/images/prvtex24.xpm \
123  preview/images/prvwrk12.xpm  preview/images/prvwrk14.xpm       preview/images/prvwrk16.xpm \
124  preview/images/prvwrk20.xpm  preview/images/prvwrk24.xbm       preview/images/prvwrk24.xpm
125 DATA_2_FILES = $(ICON_SOURCES)
126 DATA_2_DEST = $(PACKAGE)/images
127
128 EXPLICIT_DOCS = doc/auctex.texi doc/preview-latex.texi
129 EXTRA_TEXI_FILES = \
130         doc/changes.texi doc/faq.texi doc/fdl.texi doc/install.texi \
131         doc/intro.texi doc/macros.texi doc/quickstart.texi  \
132         doc/todo.texi doc/version.texi \
133         doc/preview-dtxdoc.texi doc/preview-faq.texi      \
134         doc/preview-problems.texi doc/preview-readme.texi \
135         doc/preview-todo.texi \
136         doc/tex-ref.tex doc/wininstall.texi doc/copying.texi RELEASE
137
138 PRELOADS = -eval '(setq load-path (cons "." (cons "preview" load-path)))'
139
140 ELCS = $(AUCELC)
141
142 ifeq ($(BUILD_WITHOUT_MULE),)
143 ELCS += $(MULEELC)
144 endif
145
146 %.dvi: %.tex
147 ifneq ($(TEX),)
148         cd $(@D) && $(TEX) $(*F)
149 else
150         -
151 endif
152
153 RUN_MAKEINFO_INDIVIDUAL = $(MAKEINFO) -I doc/ -D rawfile --no-validate  --force --no-headers -o $@ $<
154
155 ## Preview latex
156 PL = preview/latex
157
158 TEXMFGEN = preview.sty prauctex.def prauctex.cfg prshowbox.def \
159         prshowlabels.def prtracingall.def prtightpage.def prlyx.def \
160         prcounters.def prfootnotes.def
161
162 PREVIEW_TEXMFGEN = $(foreach file,$(TEXMFGEN),$(PL)/$(file))
163 DATA_3_FILES = $(PREVIEW_TEXMFGEN)
164 DATA_3_DEST = $(PACKAGE)/latex
165
166 DATA_4_FILES = preview/latex/preview.dvi
167 DATA_4_DEST = $(PACKAGE)/doc
168
169 EXTRA_AUTOLOADS_DEPENDENCIES = tex-site.el preview/auto.el
170
171 include ../../XEmacs.rules
172
173 # If Makefile or _pkg.el has changed (Makefile will trigger _pkg.el
174 # rebuilding), then our suppress forms may have changed.  Just rebuilding
175 # the autoload file normally isn't enough as the old suppress forms will
176 # still sit there, so nuke it first.
177 $(AUTOLOAD_PATH)/auto-autoloads.el :: $(AUTOLOAD_PATH)/_pkg.el
178         rm -f $(AUTOLOAD_PATH)/auto-autoloads.el
179
180 ifeq ($(XEMACS_21_5),t)
181 $(AUTOLOAD_PATH)/auto-autoloads.el :: $(GENERATED_ELC_DEPENDENCIES) $(EXTRA_AUTOLOADS_DEPENDENCIES)
182         rm -f $(AUTOLOAD_PATH)/auto-autoloads.el
183         $(XEMACS_BATCH_CLEAN) $(LOAD_AUTOLOADS) \
184                 -l autoload -f batch-update-directory-autoloads \
185                 $(PACKAGE) $(AUTOLOAD_PATH)
186         # The equivalent of `touch' is done automatically
187         cat tex-site.el >> $(AUTOLOAD_PATH)/auto-autoloads.el
188         cat preview/auto.el >> $(AUTOLOAD_PATH)/auto-autoloads.el
189         @rm -f $(AUTOLOAD_PATH)/auto-autoloads.el~
190         echo "THIS IS XEMACS_21_5"
191
192 $(AUTOLOAD_PATH)/custom-defines.el : $(GENERATED_ELC_DEPENDENCIES) $(EXTRA_AUTOLOADS_DEPENDENCIES)
193         $(XEMACS_BATCH_CLEAN) $(LOAD_AUTOLOADS) \
194                 -l autoload -f batch-update-directory-custom-defines \
195                 $(PACKAGE) $(AUTOLOAD_PATH)
196         @rm -f $(AUTOLOAD_PATH)/custom-defines.el~
197
198 else
199 AUTOLOAD_PACKAGE_NAME = (setq autoload-package-name \"$(PACKAGE)\")
200 AUTOLOAD_FILE = (setq generated-autoload-file \
201         \"$(AUTOLOAD_PATH)/auto-autoloads.el\")
202
203 $(AUTOLOAD_PATH)/auto-autoloads.el :: $(GENERATED_ELC_DEPENDENCIES) $(EXTRA_AUTOLOADS_DEPENDENCIES)
204         rm -f $(AUTOLOAD_PATH)/auto-autoloads.el
205         $(XEMACS_BATCH_CLEAN) $(LOAD_AUTOLOADS) \
206                 -eval "$(AUTOLOAD_PACKAGE_NAME)" \
207                 -eval "$(AUTOLOAD_FILE)" \
208                 -l autoload -f batch-update-autoloads $^
209         cat tex-site.el >> $(AUTOLOAD_PATH)/auto-autoloads.el
210         cat preview/auto.el >> $(AUTOLOAD_PATH)/auto-autoloads.el
211         @touch $(AUTOLOAD_PATH)/auto-autoloads.el
212         @rm -f $(AUTOLOAD_PATH)/auto-autoloads.el~
213 endif
214
215 ## 70+ pages
216 doc/auctex.dvi: doc/auctex.texi
217         cd $(@D) && $(TEX) "\nonstopmode\input auctex.texi" \
218         && texindex auctex.ky && texindex auctex.fn \
219         && texindex auctex.vr && texindex auctex.cp \
220         && $(TEX) "\nonstopmode\input auctex.texi"
221
222 INSTALLATION: doc/install.texi
223         -$(RUN_MAKEINFO_INDIVIDUAL)
224
225 README: doc/intro.texi
226         -$(RUN_MAKEINFO_INDIVIDUAL)
227
228 CHANGES: doc/changes.texi
229         -$(RUN_MAKEINFO_INDIVIDUAL)
230
231 # does not build.
232 HISTORY: doc/history.texi
233         -$(RUN_MAKEINFO_INDIVIDUAL)
234
235 $(PL)/preview-mk.ins: $(PL)/preview.dtx $(PL)/bootstrap.ins
236         cd $(PL) && \
237         $(TEX) '\nonstopmode \input bootstrap.ins'
238
239 $(PL)/preview.ins: $(PL)/preview.dtx
240         cd $(PL) && \
241         $(TEX) '\nonstopmode\def\jobname{.ins}\input docstrip ' \
242         '\generate{\file{preview.ins}{\from{preview.dtx}{installer}}}' \
243         '\endbatchfile'
244
245 $(PREVIEW_TEXMFGEN) $(PL)/preview.drv: $(PL)/preview.dtx $(PL)/preview-mk.ins
246         cd $(PL) && \
247         $(TEX) '\nonstopmode \input preview-mk.ins'
248
249 $(PL)/preview.dvi: $(PL)/preview.drv $(PL)/preview.dtx $(PL)/preview.sty
250         cd $(PL) && \
251         $(LATEX) '\nonstopmode \input preview.drv' && \
252         $(LATEX) '\nonstopmode \input preview.drv' && \
253         $(LATEX) '\nonstopmode \input preview.drv'
254
255 clean::
256         @rm -f etc/*.elc