From 0d4bdebac976f5c9386695380931dbb605f0c873 Mon Sep 17 00:00:00 2001 From: ktyl Date: Wed, 15 Nov 2023 01:06:03 +0000 Subject: [PATCH] ci(garden): build garden site files --- makefile | 12 ++++++++++-- src/garden/Makefile | 14 +++++++++++++- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/makefile b/makefile index 18afab7..82d33fa 100644 --- a/makefile +++ b/makefile @@ -15,6 +15,9 @@ BLOG_BUILD_DIR = $(BLOG_BASE_DIR)out/html/ BLOG_OUT_DIR = $(OUT_DIR)/blog BLOG_INDEX = $(BLOG_BUILD_DIR)/index.html +GARDEN_BASE_DIR = $(SRC_DIR)/garden/ +GARDEN_BUILD_DIR = $(GARDEN_BASE_DIR)html + PAGES = $(shell find $(ROOT_DIR) -wholename "$(ROOT_DIR)*.html") STYLES = $(shell find $(ROOT_DIR) -wholename "$(ROOT_DIR)*.css") IMAGES = $(shell find $(IMG_DIR) -wholename "$(IMG_DIR)/*.png") @@ -26,7 +29,8 @@ HTML_TARGETS = $(PAGES:$(ROOT_DIR)/%.html=$(OUT_DIR)/%.html) CSS_TARGETS = $(STYLES:$(ROOT_DIR)/%.css=$(OUT_DIR)/%.css) PNG_TARGETS = $(IMG_DIR)/%.png=$(OUT_DIR)/%.png -all: html blog | $(OUT_DIR) +all: html blog garden | $(OUT_DIR) + cp -r src/garden/html $(OUT_DIR)/garden html: $(HTML_TARGETS) $(CSS_TARGETS) | $(OUT_DIR) cp $(IMG_DIR)/*.png $(OUT_DIR)/ @@ -62,8 +66,12 @@ blog: $(HTML_INCLUDES) $(CSS_TARGETS) cp $(CSS_TARGETS) `dirname $$page` ; \ done +garden: + make --directory $(GARDEN_BASE_DIR) html + clean: + make --directory $(GARDEN_BASE_DIR) clean make --directory $(BLOG_BASE_DIR) clean rm -rf $(OUT_DIR) -.PHONY: blog +.PHONY: blog garden diff --git a/src/garden/Makefile b/src/garden/Makefile index cb61bd0..974b7ad 100644 --- a/src/garden/Makefile +++ b/src/garden/Makefile @@ -1,6 +1,18 @@ +html: + mkdir html + cp feed.py Makefile html + cp *.md html + +clean-html: + [[ -d html ]] && rm -r html + +.PHONY: clean-html + feed: python feed.py `pwd` rss: feed -.PHONY: feed +clean: clean-html + +.PHONY: feed clean