diff options
author | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2021-02-23 17:40:07 +0300 |
---|---|---|
committer | Dmitry Baryshkov <dmitry.baryshkov@linaro.org> | 2021-02-23 17:40:07 +0300 |
commit | 7aa1b79a7abb35ac425eb39cd5b4bb0ad921c49d (patch) | |
tree | ad13d3183684c1d84cd959ce92731f4303bf31be | |
parent | ad40fe5e8cdf7167bc4a9cf78f9839e7e5b1ead2 (diff) |
make: improve textile->html conversionopenembedded-qcom-rb5-21.02
- Allow one to override python binary (e.g. make html PYTHON=python3)
- Output to the temporary file instead of the target file, so that the
target html is not created in case of an error.
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Change-Id: Ie6b5755b705cf148512c11db2e7b32ba45f1747d
-rw-r--r-- | Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -9,6 +9,8 @@ include openembedded/boards/rb5/Makefile HTML=$(subst .textile,.html,$(TEXTILE)) +PYTHON ?= python + textile: $(TEXTILE) html: $(HTML) @@ -18,7 +20,8 @@ clean: .PRECIOUS: %.textile %.html: %.textile @echo "Converting $< to $@" - @python -c "import sys,textile; print(textile.textile(sys.stdin.read()))" < $< > $@ + @$(PYTHON) -c "import sys,textile; print(textile.textile(sys.stdin.read()))" < $< > $@-temp + @mv $@-temp $@ %.textile: %.textile.in %.textile.vars Makefile @echo "Processing $< to $@" |