From c8dea64ee21c16b35c2a8b4982806984daba3273 Mon Sep 17 00:00:00 2001 From: Matt Singleton Date: Fri, 31 May 2024 14:13:01 -0500 Subject: simplify makefile --- Makefile | 12 +++--------- README.md | 11 ++++++----- 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 6f6fc48..5b132e7 100644 --- a/Makefile +++ b/Makefile @@ -1,21 +1,15 @@ REPO_CHANGES := $(shell git status --porcelain | wc -l) -DEV_MODE := 0 IS_FEDORA := $(shell command -v dnf > /dev/null && test -f /etc/fedora-release; echo $$?) -.PHONY: .initialize -.initialize: +.PHONY: console +console: ifneq ($(REPO_CHANGES),0) -ifeq ($(DEV_MODE),0) - $(error will not run with a dirty repo. stash or commit changes, or re-run with DEV_MODE=1.) -endif + $(error will not run with a dirty repo. stash or commit changes, or re-run forcing REPO_CHANGES=0.) endif git submodule update --init --recursive cp --update=none local/vimrc-local stow/vim/.vimrc-local cp --update=none local/gitconfig-local stow/git/.config/git/config-local cp --update=none local/local.zsh stow/zsh/.config/zsh/00-local.zsh - -.PHONY: console -console: .initialize stow --adopt --dir=stow --target=$(HOME) console-utils stow --adopt --dir=stow --target=$(HOME) dircolors stow --adopt --dir=stow --target=$(HOME) git diff --git a/README.md b/README.md index f6b672b..c75ffa1 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,15 @@ Manages dotfiles with stow and make. Make targets: + * `console`: configs for os-independent cli tools * `fedora-packages`: install rpmfusion and fedora packages (standalone, should only need to be run once unless new packages or repos are added) * `fedora`: configs for fedora-specific gui tools (depends on `console`) * `restore`: restore committed versions of files in `stow\` and `sway-de/` -Note: stow is run with the `--adopt` option, which will overwrite files in the -stow directory with the version that would be replaced with a symlink. You can -do a `git diff` to see the differences and if you don't care about them you can -quickly revert to the committed versions with `make restore`. Makefile will do -it's best to abort if there are uncommitted changes in the repo. +Note: Stow is run with the `--adopt` option (see [Invoking +Stow](https://www.gnu.org/software/stow/manual/html_node/Invoking-Stow.html). +You can do a `git diff` to see the differences and if you don't care about them +you can quickly revert to the committed versions with `make restore`. Makefile +will do it's best to abort if there are uncommitted changes in the repo. -- cgit v1.2.3