diff options
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
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 @@ | |||
1 | NAME = shin | 1 | NAME = shin |
2 | DESC = Include shell scripts in other shell scripts | 2 | DESC = Include shell scripts in other shell scripts |
3 | 3 | ||
4 | INSTALLED = shin shinb | ||
5 | |||
4 | DESTDIR = | 6 | DESTDIR = |
5 | PREFIX = /usr/local | 7 | PREFIX = /usr/local |
6 | 8 | ||
7 | BIN = $(DESTDIR)$(PREFIX)/bin/$(NAME) | 9 | BIN = $(DESTDIR)$(PREFIX)/bin |
8 | 10 | ||
9 | .PHONY: help | 11 | .PHONY: help |
10 | help: | 12 | help: |
@@ -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 |
22 | install: $(NAME) | 24 | install: $(INSTALLED) |
23 | install -D $< $(BIN) | 25 | install -Dt $(BIN) $? |
24 | 26 | ||
25 | .PHONY: link | 27 | .PHONY: link |
26 | link: | 28 | link: $(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 |
30 | uninstall: | 32 | uninstall: |
31 | rm $(BIN) | 33 | rm $(BIN) |
34 | |||
35 | $(BIN): | ||
36 | mkdir -p $(BIN) | ||