3 # Maintainer: auctex-devel@gnu.org
5 # Copyright (C) 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
7 # This file is part of AUCTeX.
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)
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.
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,
24 prefix=@prefix@$(null)
25 datarootdir=@datarootdir@$(null)
26 datadir=@datadir@$(null)
27 packagedir=@packagedir@$(null)
28 infodir=@infodir@$(null)
29 docdir=@docdir@$(null)
33 MAKEINFO_PLAIN=-D rawfile --no-headers
34 INSTALL_INFO=@INSTALL_INFO@
36 INSTALL_DATA=@INSTALL_DATA@
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
43 TEXI2HTML_TOC=auctex_toc.html
46 TEXI2HTML=@MAKEINFO@ --html
47 TEXI2HTML_TOC=index.html
50 TEXI2HTML_TOC=auctex_toc.html
55 MKINSTALLDIRS = ../mkinstalldirs
58 AUCTEXDATE=@AUCTEXDATE@
59 AUCTEXVERSION=@AUCTEXVERSION@
60 PACKAGE_TARNAME=@PACKAGE_TARNAME@
62 AUCTEXTEXIFILES = auctex.texi install.texi wininstall.texi intro.texi \
63 changes.texi todo.texi faq.texi macros.texi quickstart.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 \
73 info: auctex.info preview-latex.info
75 dvi: auctex.dvi tex-ref.dvi preview-latex.dvi
77 install: install-auctex install-preview
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; \
88 dist: $(DISTTEXTS) preview-latex.info auctex.info tex-ref.pdf
90 extradist: html/$(TEXI2HTML_TOC) auctex.ps auctex.pdf tex-ref.ps tex-ref.pdf
92 .PHONY: all info dvi dist install-auctex disttexts clean distclean \
93 maintainer-clean install-preview install-man html-docs extradist
97 html/$(TEXI2HTML_TOC): auctex.texi
100 cd html && $(TEXI2HTML) --split=node -I .. ../auctex.texi && \
101 test ! -d auctex || { mv auctex/* . && rm -rf auctex ; }
103 tex-ref.dvi: tex-ref.tex
106 tex-ref.ps: tex-ref.dvi
107 $(DVIPS) tex-ref.dvi -Ppdf -o tex-ref.ps
109 tex-ref.pdf: tex-ref.tex
110 $(PDFTEX) tex-ref.tex
112 version.texi: ../ChangeLog
113 echo @set VERSION $(AUCTEXVERSION) >version.texi
114 echo @set UPDATED $(AUCTEXDATE) >>version.texi
116 auctex.dvi: $(AUCTEXTEXIFILES)
117 $(TEXI2DVI) auctex.texi
119 auctex.pdf: $(AUCTEXTEXIFILES)
120 $(TEXI2PDF) auctex.texi
122 auctex.ps: auctex.dvi
123 $(DVIPS) auctex.dvi -Ppdf -o auctex.ps
125 auctex.info: $(AUCTEXTEXIFILES)
126 $(MAKEINFO) auctex.texi
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) ; \
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); \
146 preview-latex/index.html: $(PREVIEWTEXIFILES)
147 rm -f preview-latex/*
148 $(TEXI2HTML) preview-latex.texi
150 html-docs: preview-latex/index.html
152 preview-dtxdoc.texi: ../preview/latex/preview.dtx preview-dtxdoc.pl
153 -$(PERL) preview-dtxdoc.pl ../preview/latex/preview.dtx \
156 preview-latex.dvi: $(PREVIEWTEXIFILES)
157 $(TEXI2DVI) preview-latex.texi
159 preview-latex.ps: preview-latex.dvi
160 $(DVIPS) preview-latex.dvi -Ppdf -o preview-latex.ps
162 preview-latex.pdf: $(PREVIEWTEXIFILES)
163 $(TEXI2PDF) preview-latex.texi
165 preview-latex.info: $(PREVIEWTEXIFILES)
166 $(MAKEINFO) preview-latex.texi
168 install-preview: preview-latex.info
169 -$(MKINSTALLDIRS) $(DESTDIR)$(infodir)
170 for x in preview-latex.info* ; do \
171 $(INSTALL_DATA) $$x $(DESTDIR)$(infodir) ; \
173 -$(INSTALL_INFO) --info-dir=$(DESTDIR)$(infodir) preview-latex.info
177 ../INSTALL: install.texi macros.texi
178 $(MAKEINFO) $(MAKEINFO_PLAIN) install.texi --output $@
180 ../INSTALL.windows: wininstall.texi macros.texi
181 $(MAKEINFO) $(MAKEINFO_PLAIN) wininstall.texi --output $@
183 ../README: intro.texi preview-readme.texi macros.texi
184 $(MAKEINFO) $(MAKEINFO_PLAIN) intro.texi --output $@
185 $(MAKEINFO) $(MAKEINFO_PLAIN) preview-readme.texi --output - >> $@
187 ../CHANGES: changes.texi macros.texi
188 $(MAKEINFO) $(MAKEINFO_PLAIN) changes.texi --output $@
190 ../TODO: todo.texi preview-todo.texi macros.texi
191 $(MAKEINFO) $(MAKEINFO_PLAIN) todo.texi --output $@
192 $(MAKEINFO) $(MAKEINFO_PLAIN) preview-todo.texi --output - >> $@
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 - >> $@
198 ../PROBLEMS.preview: preview-problems.texi macros.texi
199 $(MAKEINFO) $(MAKEINFO_PLAIN) --number-sections preview-problems.texi --output $@
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
212 maintainer-clean: distclean
213 rm -f INSTALL.windows README CHANGES HISTORY TODO FAQ \
214 preview-dtxdoc.texi version.texi $(DISTTEXTS) *.info *.info-*