X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=Makefile;h=c3b5f0696adcc7d8fb625332871ef706702c72da;hb=20b03d569e42f965b2a271f9f56bedf520f091fb;hp=c029724a7df61d5e852b386a9cc1a20907ec1151;hpb=d928c03b1199d828b534dcfc28ffd92426088d5b;p=khome.git diff --git a/Makefile b/Makefile index c029724..c3b5f06 100644 --- a/Makefile +++ b/Makefile @@ -1,19 +1,45 @@ MAKEFLAGS := --no-builtin-rules -.PHONY: install_home install_pkgs +DEPS := $(wildcard deps/*) -install_home: - @cp -Rp home/bin $(HOME)/ - @cp -Rp home/lib $(HOME)/ +.PHONY: home pkgs_deb_install pkgs_deb_purge pkgs deps $(DEPS) + +home: + @cp -Rp home/bin $(HOME)/ + @cp -Rp home/lib $(HOME)/ @cp home/.compton.conf $(HOME)/ - @cp -Rp home/.config/ $(HOME)/ - @cp home/.profile $(HOME)/ - @cp home/.fonts.conf $(HOME)/ - @fc-cache $(HOME)/.fonts - @cp home/.Rprofile $(HOME)/ - @cp home/.mpdconf $(HOME)/ - @cp home/.tmux.conf $(HOME)/ - @cp home/.xbindkeysrc $(HOME)/ - -install_pkgs: list pkgs-install - sudo apt install $(shell ./list pkgs-install) + @cp -Rp home/.config/ $(HOME)/ + @cp home/.profile $(HOME)/ + @cp home/.fonts.conf $(HOME)/ + @fc-cache $(HOME)/.fonts + @cp home/.Rprofile $(HOME)/ + @cp home/.mpdconf $(HOME)/ + @cp home/.tmux.conf $(HOME)/ + @cp home/.xbindkeysrc $(HOME)/ + +pkgs: + $(MAKE) pkgs_deb_install + $(MAKE) pkgs_deb_purge + $(MAKE) pkgs_snap_classic + +pkgs_deb_install: list pkgs-deb-install.list + sudo apt install $(shell ./list pkgs-deb-install.list) + +pkgs_deb_purge: list pkgs-deb-purge.list + sudo apt purge $(shell ./list pkgs-deb-purge.list) + +pkgs_snap_classic: list pkgs-snap-classic.list + @$(MAKE) $(foreach p,$(shell ./list pkgs-snap-classic.list),pkg_snap_classic_$(p)) + +# Depends on 'snapd' deb pkg being already installed +pkg_snap_classic_%: + sudo snap install --classic $* + +deps: $(DEPS) + +define GEN_DEP_RULE +$(1): + cd $1 && make +endef + +$(foreach d,$(DEPS),$(eval $(call GEN_DEP_RULE,$(d))))