Fix handling of multiple deps
[khome.git] / Makefile
1 MAKEFLAGS := --no-builtin-rules
2
3 DEPS := $(wildcard deps/*)
4
5 .PHONY: home pkgs_deb_install pkgs_deb_purge pkgs deps $(DEPS)
6
7 home:
8 @cp -Rp home/bin $(HOME)/
9 @cp -Rp home/lib $(HOME)/
10 @cp home/.compton.conf $(HOME)/
11 @cp -Rp home/.config/ $(HOME)/
12 @cp home/.profile $(HOME)/
13 @cp home/.fonts.conf $(HOME)/
14 @fc-cache $(HOME)/.fonts
15 @cp home/.Rprofile $(HOME)/
16 @cp home/.mpdconf $(HOME)/
17 @cp home/.tmux.conf $(HOME)/
18 @cp home/.xbindkeysrc $(HOME)/
19
20 pkgs:
21 $(MAKE) pkgs_deb_install
22 $(MAKE) pkgs_deb_purge
23 $(MAKE) pkgs_snap_classic
24
25 pkgs_deb_install: list pkgs-deb-install.list
26 sudo apt install $(shell ./list pkgs-deb-install.list)
27
28 pkgs_deb_purge: list pkgs-deb-purge.list
29 sudo apt purge $(shell ./list pkgs-deb-purge.list)
30
31 pkgs_snap_classic: list pkgs-snap-classic.list
32 @$(MAKE) $(foreach p,$(shell ./list pkgs-snap-classic.list),pkg_snap_classic_$(p))
33
34 # Depends on 'snapd' deb pkg being already installed
35 pkg_snap_classic_%:
36 sudo snap install --classic $*
37
38 deps: $(DEPS)
39
40 define GEN_DEP_RULE
41 $(1):
42 cd $1 && make
43 endef
44
45 $(foreach d,$(DEPS),$(eval $(call GEN_DEP_RULE,$(d))))
This page took 0.057361 seconds and 5 git commands to generate.