Add more sections to Makefile

This commit is contained in:
Evie Litherland-Smith 2023-01-30 10:31:06 +00:00
parent 082a2c6b99
commit f69a37fe13

View file

@ -21,9 +21,9 @@ PACKER_DIR := $(HOME)/.local/share/nvim/site/pack/packer/start/packer.nvim
POWERLEVEL_REPO := https://github.com/romkatv/powerlevel10k.git POWERLEVEL_REPO := https://github.com/romkatv/powerlevel10k.git
POWERLEVEL_DIR := $(ZSH_CUSTOM_DIR)/themes/powerlevel10k POWERLEVEL_DIR := $(ZSH_CUSTOM_DIR)/themes/powerlevel10k
.PHONY := all force clean config zsh nvim .PHONY := all force clean config zsh nvim ssh git
all: config zsh nvim all: config zsh nvim ssh git
force: clean all force: clean all
@ -36,6 +36,13 @@ zsh: $(ZSH_DIR) $(ZSH_CUSTOM_DIR) $(POWERLEVEL_DIR) $(ZSH_TARGETS)
nvim: $(PACKER_DIR) nvim: $(PACKER_DIR)
ssh: $(HOME)/.ssh/config
git: $(HOME)/.gitconfig
grep "name" $? > /dev/null || git config --global user.name "Evie Litherland-Smith"
grep "editor" $? > /dev/null || git config --global core.editor "nvim"
grep "rebase" $? > /dev/null || git config --global pull.rebase false
$(CONFIG_TARGETS): $(CONFIG_DIR)/%: config/% $(CONFIG_TARGETS): $(CONFIG_DIR)/%: config/%
$(SYSTEMD_TARGETS): $(SYSTEMD_DIR)/%: systemd/% $(SYSTEMD_TARGETS): $(SYSTEMD_DIR)/%: systemd/%
$(FONT_TARGETS): $(FONT_DIR)/%: nerdfont_symbols/% $(FONT_TARGETS): $(FONT_DIR)/%: nerdfont_symbols/%
@ -64,8 +71,7 @@ $(POWERLEVEL_DIR):
git clone --depth 1 $(POWERLEVEL_REPO) $@ git clone --depth 1 $(POWERLEVEL_REPO) $@
$(HOME)/.gitconfig: $(HOME)/.gitconfig:
grep "editor" $@ > /dev/null || git config --global core.editor "nvim" touch $@
grep "pull.rebase" $@ > /dev/null || git config --global pull.rebase false
$(LOCAL_BIN) $(CONFIG_DIR) $(SYSTEMD_DIR) $(FONT_DIR) $(HOME)/.ssh $(HOME)/.ssh/sockets: $(LOCAL_BIN) $(CONFIG_DIR) $(SYSTEMD_DIR) $(FONT_DIR) $(HOME)/.ssh $(HOME)/.ssh/sockets:
mkdir -p $@ mkdir -p $@