aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-12-26 13:10:51 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2012-12-26 13:10:51 -0500
commit49504f36cd57f58ae885ca722ced3a6d933a0ea3 (patch)
tree36b2e90192ab2d2c9e86883a03e750b0dadf44c2 /src
parentb0daaa1699f3bfdb63c1ea9f601f266eb1642cca (diff)
downloadtextadept-49504f36cd57f58ae885ca722ced3a6d933a0ea3.tar.gz
textadept-49504f36cd57f58ae885ca722ced3a6d933a0ea3.zip
"make install" and "make ncurses install" install separate binaries.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Makefile b/src/Makefile
index 09844a22..376583ec 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -65,7 +65,7 @@ ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel))))
LDFLAGS += -ldl
MAKE = make
else
- ifeq (ncurses, $(MAKECMDGOALS))
+ ifeq (ncurses, $(findstring ncurses, $(MAKECMDGOALS)))
LDFLAGS += -liconv
endif
MAKE = gmake
@@ -75,7 +75,7 @@ ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel))))
bin_dir = $(DESTDIR)$(PREFIX)/bin
data_dir = $(DESTDIR)$(PREFIX)/share/textadept
- ifneq (ncurses, $(MAKECMDGOALS))
+ ifneq (ncurses, $(findstring ncurses, $(MAKECMDGOALS)))
plat_flag = -DGTK
ifndef GTK3
gtk_version = 2.0
@@ -84,9 +84,11 @@ ifneq (, $(or $(findstring Linux, $(kernel)), $(findstring BSD, $(kernel))))
endif
gtk_flags = $(shell pkg-config --cflags gtk+-$(gtk_version))
gtk_libs = $(shell pkg-config --libs gtk+-$(gtk_version))
+ install_targets = ../textadept ../textadeptjit
else
plat_flag = -DNCURSES
ncurses_lib = -lncursesw
+ install_targets = ../textadept-ncurses ../textadeptjit-ncurses
endif
x64 = $(shell echo "" | $(CC) -E -dM - | grep __x86_64__ | cut -d ' ' -f 3)
ifeq (1, $(x64))
@@ -297,9 +299,8 @@ textadeptjit-ncurses.osx: textadeptjit-ncurses; mv ../$< ../$@
# Install/uninstall.
-install: ../textadept ../textadeptjit ../textadept-ncurses \
- ../textadeptjit-ncurses | ../core ../doc ../init.lua ../lexers \
- ../LICENSE ../modules ../themes
+install: $(install_targets) | ../core ../doc ../init.lua ../lexers ../LICENSE \
+ ../modules ../themes
install -d $(bin_dir) $(data_dir)
install $^ $(data_dir)
cp -r $| $(data_dir)