Просмотр исходного кода

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 лет назад
Родитель
Сommit
5728c7be88
2 измененных файлов с 11 добавлено и 11 удалено
  1. 8 7
      Makefile
  2. 3 4
      install

+ 8 - 7
Makefile

@@ -4,6 +4,8 @@
 # Groups of targets
 # Groups of targets
 all = git bash zsh tmux ack vimperator vim
 all = git bash zsh tmux ack vimperator vim
 rm-all = rm-git rm-bash rm-zsh rm-tmux rm-ack rm-vimperator rm-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.
 # Auto-Documenting Section. Displays a target list with `##` descriptions.
 help:
 help:
@@ -12,9 +14,8 @@ help:
 	@echo ""
 	@echo ""
 	@echo "* Individual setup tasks:"
 	@echo "* Individual setup tasks:"
 	@echo "$(all)"
 	@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!"
 	@echo "Install complete!"
 
 
 uninstall: $(rm-all) ## Remove all configurations.
 uninstall: $(rm-all) ## Remove all configurations.
@@ -28,14 +29,14 @@ show-versions: ## List versions of installed software.
 
 
 # Setup Tasks {{{
 # Setup Tasks {{{
 
 
-prep:
+submodules:
+	@cd ~/dotfiles && git submodule sync && git submodule update --init
+
+xdg:
 	@mkdir -p $(XDG_CONFIG_HOME)
 	@mkdir -p $(XDG_CONFIG_HOME)
 
 
 XDG_CONFIG_HOME ?= $(HOME)/.config
 XDG_CONFIG_HOME ?= $(HOME)/.config
 
 
-submodules:
-	@cd ~/dotfiles && git submodule sync && git submodule update --init
-
 git:
 git:
 	git config --global color.ui true
 	git config --global color.ui true
 	git config --global core.editor vim
 	git config --global core.editor vim
@@ -78,7 +79,7 @@ rm-vimperator:
 	rm ~/.vimperator
 	rm ~/.vimperator
 	rm ~/.vimperatorrc
 	rm ~/.vimperatorrc
 
 
-vim:
+vim: xdg
 	@./bin/linkup ~/dotfiles/vim ~/.vim
 	@./bin/linkup ~/dotfiles/vim ~/.vim
 	@./bin/linkup ~/dotfiles/vim/vimrc ~/.vimrc
 	@./bin/linkup ~/dotfiles/vim/vimrc ~/.vimrc
 	@./bin/linkup ~/dotfiles/vim $(XDG_CONFIG_HOME)/nvim
 	@./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.
 # dotfiles installer for when `make` is not available.
 
 
-# Prep tasks
-mkdir -p ${XDG_CONFIG_HOME:=$HOME/.config}
-echo "Prepared."
-
 # Initialise submodules
 # Initialise submodules
 (cd ~/dotfiles && git submodule sync && git submodule update --init)
 (cd ~/dotfiles && git submodule sync && git submodule update --init)
 
 
+# XDG folder
+mkdir -p ${XDG_CONFIG_HOME:=$HOME/.config}
+
 # Git config
 # Git config
 git config --global color.ui true
 git config --global color.ui true
 git config --global core.editor vim
 git config --global core.editor vim