Initial Commit
[packages] / xemacs-packages / auctex / preview / Makefile.in
1 @SET_MAKE@
2 PACKAGE=preview
3 PACKAGE_INFO=preview-latex
4 EMACS=@EMACS@
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))'
10
11 LISP_SOURCES = @PLAT_LISP@ preview.el
12 LISP_OBJS = $(LISP_SOURCES:.el=.elc)
13
14 ICON_SOURCES = \
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
21
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)
32 DESTDIR=
33
34 INSTALL = @INSTALL@
35 INSTALL_DATA = @INSTALL_DATA@
36 MKINSTALLDIRS = ../mkinstalldirs
37
38 all: texmf lisp install-hint
39
40 lisp: $(LISP_OBJS)
41         test "x$(packagedir)" != xno || $(MAKE) preview-latex.el
42
43 texmf: latex/Makefile
44         (cd latex ; $(MAKE) all)
45
46 latex/Makefile: latex/Makefile.in Makefile config.status
47         ./config.status
48
49 auto.el: auto.el.in Makefile config.status
50         ./config.status
51
52 configure: configure.ac ../aclocal.m4
53         autoconf -I..
54
55 Makefile: Makefile.in config.status
56         ./config.status
57
58 config.status: configure
59         ./config.status --recheck
60
61 install-hint:
62         @echo 'Congratulations!  Build is complete.'
63         @echo 
64         @echo 'Now, run "make install" as root, or whatever user has permissions'
65         @echo 'to write to the install directory.'
66
67
68 .PHONY: install install-texmf install-el install-images install-startup \
69         install-nosearch use-hint all lisp texmf
70
71 install: install-texmf install-el install-nosearch install-images \
72          install-startup use-hint
73
74 use-hint:
75         @echo "Installation completed."
76         @echo
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."
84
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) ; \
92         done
93
94 install-nosearch:
95         -$(MKINSTALLDIRS) $(DESTDIR)$(packagedatadir)
96         : >$(DESTDIR)$(packagedatadir)/.nosearch
97
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 ; \
103         done
104
105 install-texmf:
106         (cd latex ; $(MAKE) DESTDIR=$(DESTDIR) install)
107
108 install-startup:
109         test $(packagedir) != no || $(MAKE) preview-latex.el
110         test $(packagedir) != no || \
111           $(INSTALL_DATA) preview-latex.el $(DESTDIR)$(previewstartfile)
112
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 ; \
117         done
118
119 preview-latex.el: preview.el auto.el
120         rm -f preview-latex.el
121         -$(EMACS) -batch -no-site-file -no-init-file $(AUTOLOAD) ; \
122         test -r $@ || { \
123           echo ";; Auto-generated preview-latex.el" > $@ ; \
124           echo "\f" >> $@ ; \
125           $(EMACS) -batch -no-site-file -no-init-file $(AUTOLOAD) ; \
126         }
127         cat auto.el >> $@
128
129 .PHONY: clean distclean maintainer-clean tarball-ready
130
131 clean:
132         rm -f latex.out testdocstrip.tex preview-latex.el
133         rm -rf *.prv *.elc *~ *.aux *.dvi *.log 
134         (cd latex ; $(MAKE) clean)
135
136 distclean: clean
137         rm -f config.log config.cache config.status
138         rm -f Makefile */Makefile auto.el
139
140 maintainer-clean: 
141         $(MAKE) distclean
142         rm -rf autom4te.cache