diff options
-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) $</* | ||