-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
32 lines (24 loc) · 765 Bytes
/
Makefile
File metadata and controls
32 lines (24 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
MODULES_BASE=bash git terminfo tmux vim zsh misc
MODULES_BIN=bin
MODULES_X=qgis x
PREFIX:=~
PREFIX_BIN=~/.local
LN_FLAGS=-sfn
export
.PHONY: $(MODULES_BASE) $(MODULES_BIN) $(MODULES_X)
install: create-dest-dirs install-base install-bin install-x
install-non-x: create-dest-dirs install-base install-bin
install-base: $(MODULES_BASE)
install-bin: $(MODULES_BIN)
install-x: $(MODULES_X)
create-dest-dirs:
mkdir -p $(PREFIX) $(PREFIX_BIN)/bin
$(MODULES_BASE) $(MODULES_BIN) $(MODULES_X):
for f in $@/* $@/.*; do \
$$(echo $$f | grep -qvE "[\.*]\.?$$") \
&& ln $(LN_FLAGS) $$(pwd)/$$f \
$(if $(findstring $@,$(MODULES_BIN)),$(PREFIX_BIN)/bin,$(PREFIX))/$$(basename $$f) \
|| true; \
done
export PREFIX
cd $@; [ -e Makefile ] && $(MAKE) || true