-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
48 lines (41 loc) · 1.01 KB
/
Copy pathMakefile
File metadata and controls
48 lines (41 loc) · 1.01 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# wildcard only directories
exclude_dirs := root/ PKGBUILD/ Deprecated/ Submodules/
pkgs := $(filter-out $(exclude_dirs),$(dir $(wildcard */.)))
pkgs := $(patsubst %/,%,$(pkgs))
.PHONY: all
all: $(pkgs)
.PHONY: $(pkgs)
$(pkgs): %:
@echo "installing package $@"
@stow -v --no-folding $@ --target=$(HOME)
zsh: Submodules
.PHONY: Submodules
Submodules:
git submodule update --init --recursive
@mkdir -p ~/.config/Submodules
@if [ -w . ]; then \
for mod in $(abspath $(wildcard Submodules/*)); do \
ln -sf $$mod ~/.config/Submodules; \
done \
else \
for mod in $(abspath $(wildcard Submodules/*)); do \
cp --reflink=auto -ru $$mod ~/.config/Submodules; \
done; \
chmod -R 755 ~/.config/Submodules; \
fi
.PHONY: purge
purge:
@echo purge
.PHONY: test
test:
@if [ -w . ]; then \
for mod in $(abspath $(wildcard Submodules/*)); do \
echo $$mod; \
done; \
for mod in $(abspath $(wildcard Submodules/*)); do \
echo $$mod; \
done \
fi
.PHONY: clean
clean:
@stow --delete $(pkgs) --target=$(HOME)