Makefile 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # vim: set sw=2 ts=2 sts=2 et tw=80 fmr={{{,}}} fdl=0 fdm=marker:
  2. # dotfiles setup. Run `make install` to perform all setup tasks.
  3. # Groups of targets
  4. all = git zsh tmux ack vimperator vim
  5. rm-all = rm-git rm-zsh rm-tmux rm-ack rm-vimperator rm-vim
  6. # Auto-Documenting Section. Displays a target list with `##` descriptions.
  7. help:
  8. @echo "Available tasks:"
  9. @grep -E '^[a-zA-Z_-]+:.*## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "%-16s %s\n", $$1, $$2}'
  10. @echo ""
  11. @echo "Individual setup tasks:"
  12. @echo "$(all)"
  13. .PHONY: help uninstall install $(all) $(rm-all)
  14. install: prep $(all) ## Set up all configurations.
  15. @echo "Install complete!"
  16. uninstall: $(rm-all) ## Remove all configurations.
  17. @echo "Uninstalled!"
  18. show-versions: ## List versions of installed software.
  19. @./bin/show-versions
  20. # Setup Tasks {{{
  21. prep:
  22. @mkdir -p ~/.ssh $(XDG_CONFIG_HOME)
  23. @touch ~/.ssh/known_hosts
  24. XDG_CONFIG_HOME ?= $(HOME)/.config
  25. submodules:
  26. @cd ~/dotfiles && git submodule sync && git submodule update --init
  27. git:
  28. git config --global color.ui true
  29. git config --global core.editor vim
  30. git config --global core.excludesFile ~/dotfiles/git/globalignore
  31. git config --global diff.mnemonicPrefix true
  32. rm-git:
  33. git config --global --unset color.ui true
  34. git config --global --unset core.editor vim
  35. git config --global --unset core.excludesFile ".*/dotfiles/git/globalignore"
  36. git config --global --unset diff.mnemonicPrefix true
  37. zsh: submodules
  38. @./bin/linkup ~/dotfiles/zsh/zshenv ~/.zshenv
  39. @./bin/linkup ~/dotfiles/zsh/zshrc ~/.zshrc
  40. rm-zsh:
  41. rm ~/.zshenv
  42. rm ~/.zshrc
  43. tmux: submodules
  44. @./bin/linkup ~/dotfiles/tmux/tmux.conf ~/.tmux.conf
  45. rm-tmux:
  46. rm ~/.tmux.conf
  47. ack:
  48. @./bin/linkup ~/dotfiles/ack/ackrc ~/.ackrc
  49. rm-ack:
  50. rm ~/.ackrc
  51. vimperator:
  52. @./bin/linkup ~/dotfiles/vimperator ~/.vimperator
  53. @./bin/linkup ~/dotfiles/vimperator/vimperatorrc ~/.vimperatorrc
  54. rm-vimperator:
  55. rm ~/.vimperator
  56. rm ~/.vimperatorrc
  57. vim:
  58. @./bin/linkup ~/dotfiles/vim ~/.vim
  59. @./bin/linkup ~/dotfiles/vim/vimrc ~/.vimrc
  60. @./bin/linkup ~/dotfiles/vim $(XDG_CONFIG_HOME)/nvim
  61. @vim +PlugClean! +PlugUpdate! +quitall!
  62. rm-vim:
  63. rm ~/.vim
  64. rm ~/.vimrc
  65. rm $(XDG_CONFIG_HOME)/nvim
  66. # }}}