From 77e11a1f48cef9deeafd051563b6dfcb6e31fe72 Mon Sep 17 00:00:00 2001 From: froggleston Date: Tue, 17 Sep 2024 21:05:08 +0100 Subject: [PATCH] Fix makefile --- Makefile | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 8f1e6e55..616189e1 100644 --- a/Makefile +++ b/Makefile @@ -5,21 +5,25 @@ all : commands commands : @grep -h -E '^##' ${MAKEFILE_LIST} | sed -e 's/## //g' | column -t -s ':' +# Create copy of glossary file for GitHub Pages site. _data/glossary.yml : ./glossary.yml @mkdir -p _data @cp $< $@ +## sort : sort the glossary file and build _data glossary file per language sort-glossary : _data/glossary.yml @yamllint glossary.yml @python utils/sort-glossary.py ## site : rebuild GitHub Pages site locally. -site : sort-glossary +site : + $(MAKE) sort-glossary rm -rf .jekyll-cache .jekyll-metadata _site bundle exec jekyll build ## gh-site : builds the website for GitHub pages (part of the GH Actions workflow) -gh-site : sort-glossary +gh-site : _data/glossary.yml + $(MAKE) sort-glossary @rm -rf _gh-site @mkdir -p _gh-site @cp -r `ls -A | grep -v '.git' | grep -v '_gh-site' | grep -v '_site'` _gh-site @@ -27,7 +31,8 @@ gh-site : sort-glossary @cp $< _gh-site/$< ## serve : serve GitHub Pages site locally. -serve : sort-glossary +serve : + $(MAKE) sort-glossary rm -rf _site bundle exec jekyll serve -I