summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2021-01-09 18:43:00 +0000
committerbrian m. carlson <sandals@crustytoothpaste.net>2021-01-09 18:43:00 +0000
commit8be2abdcaaa9ff9c1b2d1012f30f814ba63c366d (patch)
tree5f083725ffb247e400df24bc37164ca80c178658
parentee63e6867c90c57b8b9ed0dc17464ab40fdd67ee (diff)
Makefile: add a list of directories to create
We want to specify a list of directories to create on every system and let various rule makefiles add entries to the list. Let's add a variable to which we can add. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
-rw-r--r--Makefile9
1 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 7c4872d..3204cce 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,7 @@
DESTDIR ?= $(HOME)
+INSTALL_DIRS = .config .cache .local/share
+
LINK_PAIRS += .local/share/gems .gem
all:
@@ -19,9 +21,10 @@ include vim/rules.mk
include zsh/rules.mk
install-dirs:
- mkdir -p $(DESTDIR)/.config
- mkdir -p $(DESTDIR)/.cache
- mkdir -p $(DESTDIR)/.local/share
+ for i in $(INSTALL_DIRS); \
+ do \
+ mkdir -p $(DESTDIR)/$$i; \
+ done
install-links: install-dirs
printf "%s %s\n" $(LINK_PAIRS) | (set -e; while read target link; \