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