From f1be0e38d3a28328269fc1f219109513041690af Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 1 Aug 2012 13:32:22 -0400 Subject: Added 'install' and 'uninstall' rules; src/Makefile --- src/Makefile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'src') 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: -- cgit v1.2.3