From f6d427ccf5ed62781d3080637eda8eb9041e0dc7 Mon Sep 17 00:00:00 2001 From: Adam Price Date: Tue, 27 Jun 2023 16:39:39 -0400 Subject: [PATCH] feat: fix makefile phony targets can't believe how long i thought that worked --- _posts/2022-11-14-adventures-in-make.md | 4 ++-- makefile | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/_posts/2022-11-14-adventures-in-make.md b/_posts/2022-11-14-adventures-in-make.md index f7a6490..9fd24d9 100644 --- a/_posts/2022-11-14-adventures-in-make.md +++ b/_posts/2022-11-14-adventures-in-make.md @@ -84,7 +84,7 @@ A common pattern I've started coming across is a distinct rule that spits out nicely formatted information describing other rules in the Make environment. ``` -.PHONY: +.PHONY: help help: ### this help output @printf "available targets:\n ---\n" @egrep -h "\s###\s" $(MAKEFILE_LIST) \ @@ -145,7 +145,7 @@ come up with the following bits in my makefile. gemset_paths := $(wildcard tools/rbenv/versions/*/gemsets) gemsets := $(foreach path,$(gemset_paths),$(wildcard $(path)/*)) -.PHONY: +.PHONY: clean-gemsets clean-gemsets: rm -rf $(gemsets) ``` diff --git a/makefile b/makefile index 52fc5cb..0a656a2 100644 --- a/makefile +++ b/makefile @@ -1,9 +1,9 @@ ARCHIVE := site.tar.gz -.PHONY: +.PHONY: dist dist: $(ARCHIVE) -.PHONY: +.PHONY: ci/setup ci/setup: sudo gem install bundler sudo bundle install @@ -11,15 +11,15 @@ ci/setup: $(ARCHIVE): _site tar cvz -C $< -f $@ . -.PHONY: +.PHONY: _site _site: bundle exec jekyll build --verbose -.PHONY: +.PHONY: publish publish: hut pages publish -d $(SITE) $(ARCHIVE) -.PHONY: +.PHONY: clean clean: bundle exec jekyll clean rm -f $(ARCHIVE) -- 2.45.2