Makefile 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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 bash zsh tmux ack vimperator tridactyl vim
  5. rm-all = rm-git rm-bash rm-zsh rm-tmux rm-ack rm-vimperator rm-tridactyl rm-vim
  6. aux = help install uninstall upgrade show-versions xdg
  7. .PHONY: $(all) $(rm-all) $(aux)
  8. # Auto-Documenting Section. Displays a target list with `##` descriptions.
  9. help:
  10. @grep -E '^[a-zA-Z_-]+:.*## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "* %-16s %s\n", $$1, $$2}'
  11. @echo ""
  12. @echo "Individual setup tasks:"
  13. @echo "$(all)"
  14. install: $(all) ## Set up all configuration files.
  15. @echo "Install complete!"
  16. uninstall: $(rm-all) ## Remove all configuration files.
  17. @echo "Uninstalled!"
  18. upgrade: ## Update external files to latest versions.
  19. @./bin/dotfiles-upgrade
  20. show-versions: ## List versions of installed software.
  21. @./bin/show-versions
  22. # Setup Tasks {{{
  23. xdg:
  24. @mkdir -p $(XDG_CONFIG_HOME)
  25. XDG_CONFIG_HOME ?= $(HOME)/.config
  26. git:
  27. git config --global color.ui true
  28. git config --global core.editor vim
  29. git config --global core.excludesFile ~/dotfiles/git/globalignore
  30. git config --global diff.mnemonicPrefix true
  31. rm-git:
  32. git config --global --unset color.ui true
  33. git config --global --unset core.editor vim
  34. git config --global --unset core.excludesFile ".*/dotfiles/git/globalignore"
  35. git config --global --unset diff.mnemonicPrefix true
  36. bash:
  37. @./bin/linkup ~/dotfiles/shell/bash_profile ~/.bash_profile
  38. @./bin/linkup ~/dotfiles/shell/bashrc ~/.bashrc
  39. rm-bash:
  40. rm ~/.bash_profile
  41. rm ~/.bashrc
  42. zsh:
  43. @./bin/linkup ~/dotfiles/shell/env ~/.zshenv
  44. @./bin/linkup ~/dotfiles/shell/zshrc ~/.zshrc
  45. rm-zsh:
  46. rm ~/.zshenv
  47. rm ~/.zshrc
  48. tmux:
  49. @./bin/linkup ~/dotfiles/tmux/tmux.conf ~/.tmux.conf
  50. rm-tmux:
  51. rm ~/.tmux.conf
  52. ack:
  53. @./bin/linkup ~/dotfiles/ack/ackrc ~/.ackrc
  54. rm-ack:
  55. rm ~/.ackrc
  56. vimperator:
  57. @./bin/linkup ~/dotfiles/vimperator ~/.vimperator
  58. @./bin/linkup ~/dotfiles/vimperator/vimperatorrc ~/.vimperatorrc
  59. rm-vimperator:
  60. rm ~/.vimperator
  61. rm ~/.vimperatorrc
  62. tridactyl:
  63. @./bin/linkup ~/dotfiles/tridactyl/tridactylrc ~/.tridactylrc
  64. rm-tridactyl:
  65. rm ~/.tridactylrc
  66. vim: xdg
  67. @./bin/linkup ~/dotfiles/vim ~/.vim
  68. @./bin/linkup ~/dotfiles/vim/vimrc ~/.vimrc
  69. @./bin/linkup ~/dotfiles/vim $(XDG_CONFIG_HOME)/nvim
  70. @# Use barebones config to avoid vimrc errors on fresh dotfiles installs.
  71. @vim -N -u ~/dotfiles/vim/plugins.vim +PlugClean! +PlugUpdate! +quitall!
  72. rm-vim:
  73. rm ~/.vim
  74. rm ~/.vimrc
  75. rm $(XDG_CONFIG_HOME)/nvim
  76. # }}}