about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--Makefile13
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
9BIND = $(DESTDIR)$(PREFIX)/bin 9BIND = $(DESTDIR)$(PREFIX)/bin
10BIN = $(BIND)/$(NAME) 10BIN = $(BIND)/$(NAME)
11 11
12.PHONY: help install link uninstall 12EX_SRC = $(PWD)/examples
13EX_DST = $(XDG_CONFIG_HOME)/$(NAME)
14
15.PHONY: help install link uninstall examples link_examples
13 16
14help: 17help:
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
34uninistall: 39uninistall:
35 rm -f $(BIN) 40 rm -f $(BIN)
41
42examples: $(EX_SRC)
43 install -t $(EX_DST) $</*
44
45link_examples: $(EX_SRC)
46 ln -sf -t $(EX_DST) $</*