about summary refs log tree commit diff stats
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile15
1 files changed, 10 insertions, 5 deletions
diff --git a/Makefile b/Makefile index a9401a1..b6efa17 100644 --- a/Makefile +++ b/Makefile
@@ -1,10 +1,12 @@
1NAME = shin 1NAME = shin
2DESC = Include shell scripts in other shell scripts 2DESC = Include shell scripts in other shell scripts
3 3
4INSTALLED = shin shinb
5
4DESTDIR = 6DESTDIR =
5PREFIX = /usr/local 7PREFIX = /usr/local
6 8
7BIN = $(DESTDIR)$(PREFIX)/bin/$(NAME) 9BIN = $(DESTDIR)$(PREFIX)/bin
8 10
9.PHONY: help 11.PHONY: help
10help: 12help:
@@ -19,13 +21,16 @@ help:
19 @echo " uninstall Uninstall $(NAME)-related files." 21 @echo " uninstall Uninstall $(NAME)-related files."
20 22
21.PHONY: install 23.PHONY: install
22install: $(NAME) 24install: $(INSTALLED)
23 install -D $< $(BIN) 25 install -Dt $(BIN) $?
24 26
25.PHONY: link 27.PHONY: link
26link: 28link: $(NAME) shinb $(BIN)
27 ln -sf $(PWD)/$(NAME) $(BIN) 29 ln -sf $(PWD)/$(NAME) $(PWD)/shinb $(BIN)
28 30
29.PHONY: uninstall 31.PHONY: uninstall
30uninstall: 32uninstall:
31 rm $(BIN) 33 rm $(BIN)
34
35$(BIN):
36 mkdir -p $(BIN)