3 PACKAGE_INFO=preview-latex
5 ELCC=$(EMACS) -batch -q -no-site-file -no-init-file
6 AUCTEX=-eval '(let ((dir (pop command-line-args-left))) \
7 (if (not (string-equal dir "")) (push dir load-path)))' $(auctexdir) --eval '(push "." load-path)'
8 AUTOLOAD=--eval '(let ((generated-autoload-file (expand-file-name "$@"))) \
9 (update-file-autoloads "preview.el")(save-buffers-kill-emacs t))'
11 LISP_SOURCES = @PLAT_LISP@ preview.el
12 LISP_OBJS = $(LISP_SOURCES:.el=.elc)
15 images/prverr16.xpm images/prverr20.xpm images/prverr24.xbm \
16 images/prverr24.xpm images/prvtex-cap-up.xpm images/prvtex12.xbm \
17 images/prvtex12.xpm images/prvtex16.xbm images/prvtex16.xpm \
18 images/prvtex20.xpm images/prvtex24.xbm images/prvtex24.xpm \
19 images/prvwrk12.xpm images/prvwrk14.xpm images/prvwrk16.xpm \
20 images/prvwrk20.xpm images/prvwrk24.xbm images/prvwrk24.xpm
22 prefix = @prefix@$(null)
23 exec_prefix = @exec_prefix@$(null)
24 libdir = @libdir@$(null)
25 packagedatadir = @packagedatadir@$(null)
26 datarootdir = @datarootdir@$(null)
27 datadir = @datadir@$(null)
28 previewstartfile = @previewstartfile@
29 packagedir = @packagedir@$(null)
30 packagelispdir = @packagelispdir@$(null)
31 auctexdir = @auctexdir@$(null)
35 INSTALL_DATA = @INSTALL_DATA@
36 MKINSTALLDIRS = ../mkinstalldirs
38 all: texmf lisp install-hint
41 test "x$(packagedir)" != xno || $(MAKE) preview-latex.el
44 (cd latex ; $(MAKE) all)
46 latex/Makefile: latex/Makefile.in Makefile config.status
49 auto.el: auto.el.in Makefile config.status
52 configure: configure.ac ../aclocal.m4
55 Makefile: Makefile.in config.status
58 config.status: configure
59 ./config.status --recheck
62 @echo 'Congratulations! Build is complete.'
64 @echo 'Now, run "make install" as root, or whatever user has permissions'
65 @echo 'to write to the install directory.'
68 .PHONY: install install-texmf install-el install-images install-startup \
69 install-nosearch use-hint all lisp texmf
71 install: install-texmf install-el install-nosearch install-images \
72 install-startup use-hint
75 @echo "Installation completed."
77 @echo "Please read the PROBLEMS file if you use"
78 @echo "a) AUCTeX with a version less than 11.0"
79 @echo "b) GNU Emacs with a version less than 21.2"
80 @echo " OR XEmacs with a version less than 21.4.9"
81 @echo "c) Ghostscript with a version less than 6.51"
82 @echo "Please use M-x preview-report-bug if you experience any"
83 @echo "problems not mentioned in there."
85 install-el: $(LISP_OBJS) auto.el
86 -$(MKINSTALLDIRS) $(DESTDIR)$(packagelispdir)
87 for x in $(LISP_SOURCES) ; do \
88 echo $(INSTALL_DATA) $$x $(DESTDIR)$(packagelispdir) ; \
89 $(INSTALL_DATA) $$x $(DESTDIR)$(packagelispdir) ; \
90 echo $(INSTALL_DATA) $${x}c $(DESTDIR)$(packagelispdir) ; \
91 $(INSTALL_DATA) $${x}c $(DESTDIR)$(packagelispdir) ; \
95 -$(MKINSTALLDIRS) $(DESTDIR)$(packagedatadir)
96 : >$(DESTDIR)$(packagedatadir)/.nosearch
98 install-images: $(ICON_SOURCES)
99 -$(MKINSTALLDIRS) $(DESTDIR)$(packagedatadir)/images
100 for x in $(ICON_SOURCES); do \
101 echo $(INSTALL_DATA) $$x $(DESTDIR)$(packagedatadir)/images ; \
102 $(INSTALL_DATA) $$x $(DESTDIR)$(packagedatadir)/images ; \
106 (cd latex ; $(MAKE) DESTDIR=$(DESTDIR) install)
109 test $(packagedir) != no || $(MAKE) preview-latex.el
110 test $(packagedir) != no || \
111 $(INSTALL_DATA) preview-latex.el $(DESTDIR)$(previewstartfile)
113 $(LISP_OBJS): $(LISP_SOURCES)
114 for x in $(LISP_SOURCES) ; do \
115 echo $(ELCC) $(AUCTEX) -f batch-byte-compile $$x ; \
116 $(ELCC) $(AUCTEX) -f batch-byte-compile $$x ; \
119 preview-latex.el: preview.el auto.el
120 rm -f preview-latex.el
121 -$(EMACS) -batch -no-site-file -no-init-file $(AUTOLOAD) ; \
123 echo ";; Auto-generated preview-latex.el" > $@ ; \
125 $(EMACS) -batch -no-site-file -no-init-file $(AUTOLOAD) ; \
129 .PHONY: clean distclean maintainer-clean tarball-ready
132 rm -f latex.out testdocstrip.tex preview-latex.el
133 rm -rf *.prv *.elc *~ *.aux *.dvi *.log
134 (cd latex ; $(MAKE) clean)
137 rm -f config.log config.cache config.status
138 rm -f Makefile */Makefile auto.el
142 rm -rf autom4te.cache