diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2020-04-20 21:42:15 +0900 |
---|---|---|
committer | bst-marge-bot <marge-bot@buildstream.build> | 2020-04-21 07:51:33 +0000 |
commit | b3878133f152c5eb361eb2524d8198563ec04c65 (patch) | |
tree | 290a5912536f45c6350dd716e9176554e48f4470 | |
parent | 1e0339d948038cf3bc3b0f3e3ccba383f748ca50 (diff) | |
download | buildstream-b3878133f152c5eb361eb2524d8198563ec04c65.tar.gz |
doc/Makefile: Ensure we error out if bst2html.py fails.
The way we were using $(foreach ...) here from GNU Make was causing
errors to be ignored, this should really only be used for collecting
target names and such.
In this commit, we instead:
* Collect the SESSION_FILES using $(wildcard ...)
* Use a "%.run:" Rule to run bst2html.py for each session file
separately, ensuring that we bail out the build if the session
generation fails.
* Having the SESSION_FILES depend on the phony target sessions-prep,
ensures that this rule will be called unconditionally, regardless
of the existance of the .run files.
-rw-r--r-- | doc/Makefile | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/doc/Makefile b/doc/Makefile index 4a9373d34..43b0cd054 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -106,13 +106,20 @@ sessions-prep: mkdir -p source/sessions cp source/sessions-stored/*.html source/sessions +# bst2html is called unconditionally for every session file in SESSION_FILES. +# # By default, this will generate the html fragments of colorized BuildStream terminal -# output only if they don't yet exist. +# output only if the output html files don't yet exist. # # Specify BST_FORCE_SESSION_REBUILD=1 to force rebuild all session html files. # -sessions: sessions-prep - $(foreach file,$(wildcard sessions/*.run),PYTHONPATH=$(PYTHONPATH) $(BST2HTML) $(BST2HTMLOPTS) $(file) ; ) +SESSION_FILES=$(wildcard sessions/*.run) +$(SESSION_FILES): sessions-prep + +%.run: + PYTHONPATH=$(PYTHONPATH) $(BST2HTML) $(BST2HTMLOPTS) $@ + +sessions: $(SESSION_FILES) sessions-clean: rm -rf source/sessions |