diff options
author | Case Duckworth | 2023-02-10 22:55:24 -0600 |
---|---|---|
committer | Case Duckworth | 2023-02-10 22:55:24 -0600 |
commit | 71386a596dba6b1e98d2ae4ca6e340ba36ffad39 (patch) | |
tree | 09d9e47ebfb4bd2da2185bb77c0185ad5c218c2f /Makefile | |
parent | Add examples/yt-dlp (diff) | |
download | misc-71386a596dba6b1e98d2ae4ca6e340ba36ffad39.tar.gz misc-71386a596dba6b1e98d2ae4ca6e340ba36ffad39.zip |
Add example installation to Makefile
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/Makefile b/Makefile index 1d3ce6e..f3c85eb 100644 --- a/Makefile +++ b/Makefile | |||
@@ -9,7 +9,10 @@ PREFIX = /usr/local | |||
9 | BIND = $(DESTDIR)$(PREFIX)/bin | 9 | BIND = $(DESTDIR)$(PREFIX)/bin |
10 | BIN = $(BIND)/$(NAME) | 10 | BIN = $(BIND)/$(NAME) |
11 | 11 | ||
12 | .PHONY: help install link uninstall | 12 | EX_SRC = $(PWD)/examples |
13 | EX_DST = $(XDG_CONFIG_HOME)/$(NAME) | ||
14 | |||
15 | .PHONY: help install link uninstall examples link_examples | ||
13 | 16 | ||
14 | help: | 17 | help: |
15 | @echo "$(NAME) : $(DESC)" | 18 | @echo "$(NAME) : $(DESC)" |
@@ -20,6 +23,8 @@ help: | |||
20 | @echo " install Install $(NAME) to $(BIN)." | 23 | @echo " install Install $(NAME) to $(BIN)." |
21 | @echo " link Install $(NAME) using symlinks." | 24 | @echo " link Install $(NAME) using symlinks." |
22 | @echo " Probably only useful for development." | 25 | @echo " Probably only useful for development." |
26 | @echo " examples Install plans in $(EX_SRC) to $(EX_DST)." | ||
27 | @echo " link_examples Install example plans using symlinks." | ||
23 | @echo " uninstall Uninstall $(NAME)-related files." | 28 | @echo " uninstall Uninstall $(NAME)-related files." |
24 | 29 | ||
25 | $(BIND): | 30 | $(BIND): |
@@ -33,3 +38,9 @@ link: $(NAME) $(BIND) | |||
33 | 38 | ||
34 | uninistall: | 39 | uninistall: |
35 | rm -f $(BIN) | 40 | rm -f $(BIN) |
41 | |||
42 | examples: $(EX_SRC) | ||
43 | install -t $(EX_DST) $</* | ||
44 | |||
45 | link_examples: $(EX_SRC) | ||
46 | ln -sf -t $(EX_DST) $</* | ||