-
Notifications
You must be signed in to change notification settings - Fork 14
/
Makefile.dist
31 lines (26 loc) · 1.51 KB
/
Makefile.dist
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
# Can be overriden by user using environment variable
PREFIX?=/usr/local
VIM?=/usr/share/vim/vimcurrent
DUCTTAPE=.
# NOTE: This file is called "Makefile.dist" in the ducttape git repo and "Makefile" in the ducttape distribution
install:
test -d ${VIM} || echo "Can't find vim ... is it installed? Perhaps you are a emacs user ;)" | exit 1
test -d ${PREFIX}/share/emacs/site-lisp || echo "Can't find emacs ... is it installed? Perhaps you are a vim user ;)" | exit 1
mkdir -p ${PREFIX}/bin ${PREFIX}/share/ducttape
cp ${DUCTTAPE}/ducttape ${PREFIX}/bin
cp ${DUCTTAPE}/tabular ${PREFIX}/bin
cp ${DUCTTAPE}/ducttape.jar ${PREFIX}/bin
cp -r ${DUCTTAPE}/builtins ${PREFIX}/share/ducttape/
cp ${DUCTTAPE}/tool-support/vim/ducttape.vim ${VIM}/syntax/ducttape.vim
(fgrep -v '*.tape' /usr/share/vim/vimcurrent/filetype.vim; echo; echo '" ducttape files'; echo 'au BufNewFile,BufRead *.tape,*.tconf setf ducttape') > filetype.vim.new
mv filetype.vim.new /usr/share/vim/vimcurrent/filetype.vim
cp ${DUCTTAPE}/tool-support/emacs/ducttape.el /usr/share/emacs/site-lisp/ducttape.el
echo '(load "/usr/share/emacs/site-lisp/ducttape.el")' >> ${PREFIX}/share/emacs/site-lisp/default.el # TODO: Only add once
#install-user:
# cp ${DUCTTAPE}/tool-support/vim/ducttape.vim ~/.vim/syntax/ducttape.vim
# cp ${DUCTTAPE}/tool-support/emacs/ducttape.el ~/.emacs.d/site-lisp/site-lisp/ducttape.el
# echo '(load "~/.emacs.d/site-lisp/ducttape.el")' >> ~/.emacs # TODO: Only add once
install-webui:
echo >&2 "TODO"
uninstall:
rm ${PREFIX}/bin/ducttape