blob: fa516d782a1542360c0b464683c2ace58c58d964 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
EXTRA_DIST = thai-latex-setup.el
emacslispdir = $(emacsdir)/site-lisp
emacslisp_DATA = thai-latex-setup.el
EMACS_SITE_START=$(DESTDIR)$(emacslispdir)/site-start.el
install-data-hook:
@if test -z "$(DESTDIR)" ; then \
if [ -f $(EMACS_SITE_START) ] ; then \
$(SED) -e '/thai-latex-setup/d' $(EMACS_SITE_START) \
> /tmp/tmp.$$$$ ; \
mv /tmp/tmp.$$$$ $(EMACS_SITE_START) ; \
fi ; \
echo '(load-library "thai-latex-setup")' >> $(EMACS_SITE_START) ; \
else \
echo "***" ; \
echo "*** Warning: Emacs site-start.el not patched" ; \
echo "***" ; \
echo "*** update the file on the target system" ; \
echo "*** using 'sync-thailatex install'" ; \
echo "***" ; \
fi
uninstall-hook:
if [ -f $(EMACS_SITE_START) ] ; then \
$(SED) -e '/thai-latex-setup/d' $(EMACS_SITE_START) \
> /tmp/tmp.$$$$ ; \
mv /tmp/tmp.$$$$ $(EMACS_SITE_START) ; \
[ -s $(EMACS_SITE_START) ] || rm -f $(EMACS_SITE_START) ; \
fi
|