diff options
Diffstat (limited to 'obsolete/language/thai/thailatex/emacs/Makefile.am')
-rw-r--r-- | obsolete/language/thai/thailatex/emacs/Makefile.am | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/obsolete/language/thai/thailatex/emacs/Makefile.am b/obsolete/language/thai/thailatex/emacs/Makefile.am new file mode 100644 index 0000000000..c11e8cbe83 --- /dev/null +++ b/obsolete/language/thai/thailatex/emacs/Makefile.am @@ -0,0 +1,37 @@ +EXTRA_DIST = thai-latex-setup.el + +emacslispdir = $(emacsdir)/site-lisp +emacslisp_DATA = thai-latex-setup.el + +EMACS_SITE_START=$(DESTDIR)$(emacslispdir)/site-start.el + +if ENABLE_HOOKS + +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 + +endif # ENABLE_HOOKS + |