aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-08-01 13:32:22 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2012-08-01 13:32:22 -0400
commitf1be0e38d3a28328269fc1f219109513041690af (patch)
tree8e068de60aefe66d6586d1afa9e8283fccc8e6dd /src
parentcb44f6df672e276324632d58a35648efc88ab783 (diff)
downloadtextadept-f1be0e38d3a28328269fc1f219109513041690af.tar.gz
textadept-f1be0e38d3a28328269fc1f219109513041690af.zip
Added 'install' and 'uninstall' rules; src/Makefile
Diffstat (limited to 'src')
-rw-r--r--src/Makefile17
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: