From 0510b1953bce39bdc6a2eb1baad5ef7afdf421fc Mon Sep 17 00:00:00 2001 From: Peter Son Struschka Date: Tue, 30 Jul 2019 12:46:57 +0700 Subject: cleaned makefile, added doom-emacs and other small fixes --- Makefile | 68 ++++++++++++++++++++-------------------------------------------- 1 file changed, 21 insertions(+), 47 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index e970247..db572f7 100644 --- a/Makefile +++ b/Makefile @@ -1,66 +1,40 @@ -all: emacs git i3wm vim x zsh basics +all_files := basics emacs spacemacs doom-emacs git i3wm vim nvim tmux x zsh fish +simple_files := emacs spacemacs doom-emacs vim x zsh fish -clean: uninstall_emacs uninstall_spacemacs \ - uninstall_git uninstall_i3wm \ - uninstall_vim uninstall_x uninstall_zsh \ - uninstall_basics -.PHONY: emacs spacemacs git i3wm vim nvim tmux x zsh fish basics +.PHONY: $(all_files) + +$(simple_files): + stow -t ~ $@ + +# special install rules basics: yay yay -Q - < meta/basic_deps || yay -S --needed - < meta/basic_deps - stow -t ~ basics - -emacs: - stow -t ~ emacs -spacemacs: - stow -t ~ spacemacs + stow -t ~ $@ git: pacman -Q git || sudo pacman -S git - stow -t ~ git + stow -t ~ $@ i3wm: yay pacman -Q - < meta/i3wm_deps || yay -S --needed - < meta/i3wm_deps - stow -t ~ i3wm -vim: - stow -t ~ vim -x: - stow -t ~ x -zsh: - stow -t ~ zsh -fish: - stow -t ~ fish - + stow -t ~ $@ yay: git pacman -Q yay || (git clone aur:yay && pushd yay && makepkg -si && popd) tmux: yay pacman -Q - < meta/powerline_deps || yay -S --needed - < meta/powerline_deps - stow -t ~ tmux + stow -t ~ $@ nvim: curl -fLo nvim/.config/nvim/autoload/plug.vim --create-dirs \ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim - stow -t ~ nvim + stow -t ~ $@ + + + + +$(addprefix uninstall_,$(all_files)): + stow -Dt ~ $(subst uninstall_,,$@) -uninstall_emacs: - stow -Dt ~ emacs -uninstall_spacemacs: - stow -Dt ~ spacemacs -uninstall_git: - stow -Dt ~ git -uninstall_i3wm: - stow -Dt ~ i3wm -uninstall_vim: - stow -Dt ~ vim -uninstall_x: - stow -Dt ~ x -uninstall_zsh: - stow -Dt ~ zsh -uninstall_fish: - stow -Dt ~ fish -uninstall_basics: - stow -Dt ~ basics -uninstall_tmux: - stom -Dt ~ tmux -uninstall_nvim: - stom -Dt ~ nvim +uninstall_%: + stow -Dt ~ $* -- cgit v1.2.3