]> git.rmz.io Git - dotfiles.git/commitdiff
Makefile: fix some target dependencies
authorSamir Benmendil <me@rmz.io>
Sun, 25 Feb 2018 21:22:29 +0000 (21:22 +0000)
committerSamir Benmendil <me@rmz.io>
Sun, 25 Feb 2018 21:22:29 +0000 (21:22 +0000)
Makefile

index 3184bb619f16f60853b29708be82c716bbfeda38..eb5f29b39a80721db4254bc222475da86ebc9910 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -10,13 +10,13 @@ install: $(FILES) $(DOTFILES) $(CONFIGFILES)
 ~/.config:
        mkdir -p ~/.config
 
 ~/.config:
        mkdir -p ~/.config
 
-vim:
+vim: ~/.config
        ln -sfT $(APATH)/vim ~/.config/vim
        mkdir -p ~/.local/share/vim
        git clone https://github.com/gmarik/vundle ~/.local/share/vim/vundle
 .PHONY: vim
 
        ln -sfT $(APATH)/vim ~/.config/vim
        mkdir -p ~/.local/share/vim
        git clone https://github.com/gmarik/vundle ~/.local/share/vim/vundle
 .PHONY: vim
 
-mutt:
+mutt: ~/.config
        ln -sfT $(APATH)/mutt ~/.config/mutt
 .PHONY: mutt
 
        ln -sfT $(APATH)/mutt ~/.config/mutt
 .PHONY: mutt
 
@@ -41,12 +41,12 @@ mpd: systemd
        systemctl --user start mpd
 .PHONY: mpd
 
        systemctl --user start mpd
 .PHONY: mpd
 
-ncmpcpp:
+ncmpcpp: ~/.config
        ln -sfT $(APATH)/ncmpcpp ~/.config/ncmpcpp
        mkdir -p ~/.local/share/mpd/lyrics
 .PHONY: ncmpcpp
 
        ln -sfT $(APATH)/ncmpcpp ~/.config/ncmpcpp
        mkdir -p ~/.local/share/mpd/lyrics
 .PHONY: ncmpcpp
 
-systemd:
+systemd: ~/.config
        ln -sfT $(APATH)/$@ ~/.config/$@
 .PHONY: systemd
 
        ln -sfT $(APATH)/$@ ~/.config/$@
 .PHONY: systemd
 
@@ -56,7 +56,7 @@ gnupg: systemd
        systemctl --user start gpg-agent.socket gpg-agent-extra.socket gpg-agent-browser.socket dirmngr.socket
 .PHONY: gnupg
 
        systemctl --user start gpg-agent.socket gpg-agent-extra.socket gpg-agent-browser.socket dirmngr.socket
 .PHONY: gnupg
 
-zsh:
+zsh: ~/.config
        ln -sfT $(APATH)/zshrc ~/.zshrc
        ln -sfT $(APATH)/zprofile ~/.zprofile
        ln -sfT $(APATH)/zshenv ~/.zshenv
        ln -sfT $(APATH)/zshrc ~/.zshrc
        ln -sfT $(APATH)/zprofile ~/.zprofile
        ln -sfT $(APATH)/zshenv ~/.zshenv
@@ -68,15 +68,15 @@ xprofile:
        ln -sfT $(APATH)/xprofile ~/.xprofile
 .PHONY: xprofile
 
        ln -sfT $(APATH)/xprofile ~/.xprofile
 .PHONY: xprofile
 
-dircolors:
+dircolors: ~/.config
        ln -sfT $(APATH)/dircolors ~/.config/dircolors
 .PHONY: dircolors
 
        ln -sfT $(APATH)/dircolors ~/.config/dircolors
 .PHONY: dircolors
 
-urxvt:
+urxvt: ~/.config
        ln -sfT $(APATH)/urxvt ~/.config/urxvt
 .PHONY: urxvt
 
        ln -sfT $(APATH)/urxvt ~/.config/urxvt
 .PHONY: urxvt
 
-$(FILES): 
+$(FILES):
        @if [[ -e ~/$@ && ! -L ~/$@ ]]; then \
            if [[ -d $@ ]]; then \
              cp -r ~/$@/* $@; \
        @if [[ -e ~/$@ && ! -L ~/$@ ]]; then \
            if [[ -d $@ ]]; then \
              cp -r ~/$@/* $@; \
@@ -84,10 +84,10 @@ $(FILES):
              cp -r ~/$@ $@; \
            fi; \
            rm -r ~/$@; \
              cp -r ~/$@ $@; \
            fi; \
            rm -r ~/$@; \
-       fi; 
+       fi;
        ln -sfT $(APATH)/$@ ~/$@
 
        ln -sfT $(APATH)/$@ ~/$@
 
-$(DOTFILES): 
+$(DOTFILES):
        @if [[ -e ~/.$@ && ! -L ~/.$@ ]]; then \
            if [[ -d .$@ ]]; then \
              cp -r ~/.$@/* $@; \
        @if [[ -e ~/.$@ && ! -L ~/.$@ ]]; then \
            if [[ -d .$@ ]]; then \
              cp -r ~/.$@/* $@; \
@@ -95,7 +95,7 @@ $(DOTFILES):
              cp -r ~/.$@ $@; \
            fi; \
            rm -r ~/.$@; \
              cp -r ~/.$@ $@; \
            fi; \
            rm -r ~/.$@; \
-       fi; 
+       fi;
        ln -sfT $(APATH)/$@ ~/.$@
 
 $(CONFIGFILES):  ~/.config
        ln -sfT $(APATH)/$@ ~/.$@
 
 $(CONFIGFILES):  ~/.config
@@ -106,5 +106,5 @@ $(CONFIGFILES):  ~/.config
              cp -r ~/.config/$@ $@; \
            fi; \
            rm -r ~/.config/$@; \
              cp -r ~/.config/$@ $@; \
            fi; \
            rm -r ~/.config/$@; \
-       fi; 
+       fi;
        ln -sfT $(APATH)/$@ ~/.config/$@
        ln -sfT $(APATH)/$@ ~/.config/$@