diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Makefile | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Makefile b/src/Makefile index f1eecb2a..ae2b002c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -67,6 +67,10 @@ ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel)))) endif MAKE = gmake endif + DESTDIR = /usr/local + + bin_dir = $(DESTDIR)/bin + data_dir = $(DESTDIR)/share/textadept ifneq (ncurses, $(MAKECMDGOALS)) plat_flag = -DGTK @@ -287,6 +291,19 @@ textadeptjit.osx: textadeptjit; mv ../$< ../$@ textadept-ncurses.osx: textadept-ncurses; mv ../$< ../$@ textadeptjit-ncurses.osx: textadeptjit-ncurses; mv ../$< ../$@ +# Install/uninstall. + +install: ../textadept ../textadeptjit ../textadept-ncurses \ + ../textadeptjit-ncurses | ../core ../doc ../init.lua ../lexers \ + ../LICENSE ../modules ../themes + install -d $(bin_dir) $(data_dir) + install $^ $(data_dir) + cp -r $| $(data_dir) + ln -s $(subst .., $(data_dir), $^) $(bin_dir) +uninstall: + rm $(bin_dir)/textadept* + rm -r $(data_dir) + # Clean. mostlyclean: |