Browse Source

Fix Makefile vim dependency and missing phonies

Previously 'submodules' and 'prep' were missing, so any files of the
same name stopped those tasks from running. All tasks that are not one
of the setup domains are now listed in an auxillary group.
Weiyi Lou 9 years ago
parent
commit
5728c7be88
2 changed files with 11 additions and 11 deletions
  1. 8 7
      Makefile
  2. 3 4
      install

+ 8 - 7
Makefile

@@ -4,6 +4,8 @@
 # Groups of targets
 all = git bash zsh tmux ack vimperator vim
 rm-all = rm-git rm-bash rm-zsh rm-tmux rm-ack rm-vimperator rm-vim
+aux = help install uninstall upgrade show-versions submodules xdg
+.PHONY: $(all) $(rm-all) $(aux)
 
 # Auto-Documenting Section. Displays a target list with `##` descriptions.
 help:
@@ -12,9 +14,8 @@ help:
 	@echo ""
 	@echo "* Individual setup tasks:"
 	@echo "$(all)"
-.PHONY: help install uninstall upgrade show-versions $(all) $(rm-all)
 
-install: prep $(all) ## Set up all configurations.
+install: $(all) ## Set up all configurations.
 	@echo "Install complete!"
 
 uninstall: $(rm-all) ## Remove all configurations.
@@ -28,14 +29,14 @@ show-versions: ## List versions of installed software.
 
 # Setup Tasks {{{
 
-prep:
+submodules:
+	@cd ~/dotfiles && git submodule sync && git submodule update --init
+
+xdg:
 	@mkdir -p $(XDG_CONFIG_HOME)
 
 XDG_CONFIG_HOME ?= $(HOME)/.config
 
-submodules:
-	@cd ~/dotfiles && git submodule sync && git submodule update --init
-
 git:
 	git config --global color.ui true
 	git config --global core.editor vim
@@ -78,7 +79,7 @@ rm-vimperator:
 	rm ~/.vimperator
 	rm ~/.vimperatorrc
 
-vim:
+vim: xdg
 	@./bin/linkup ~/dotfiles/vim ~/.vim
 	@./bin/linkup ~/dotfiles/vim/vimrc ~/.vimrc
 	@./bin/linkup ~/dotfiles/vim $(XDG_CONFIG_HOME)/nvim

+ 3 - 4
install

@@ -5,13 +5,12 @@ IFS=$'\n\t'
 
 # dotfiles installer for when `make` is not available.
 
-# Prep tasks
-mkdir -p ${XDG_CONFIG_HOME:=$HOME/.config}
-echo "Prepared."
-
 # Initialise submodules
 (cd ~/dotfiles && git submodule sync && git submodule update --init)
 
+# XDG folder
+mkdir -p ${XDG_CONFIG_HOME:=$HOME/.config}
+
 # Git config
 git config --global color.ui true
 git config --global core.editor vim