diff options
author | Case Duckworth | 2023-03-15 14:24:10 -0500 |
---|---|---|
committer | Case Duckworth | 2023-03-15 14:24:10 -0500 |
commit | 3319d70e4e8fd89fe6140e95504a718717bd4e80 (patch) | |
tree | 33e9de59e234ae64141e11a8733c1323b1ad21ab /Makefile | |
parent | Add shin.sh (sh library; acts a little differently to shin.awk/shin) (diff) | |
download | shin-main.tar.gz shin-main.zip |
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) | ||