diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1d6f59ab2d36179290472ef80cf4abd061ca699..e685fbd7a1cc7541554ef83d91091bf57302fc7c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,7 +58,7 @@ build: stage: build script: - *doc-workspace-do - - make + - make BUILD_DIR="$CI_PROJECT_DIR/build" artifacts: paths: - build diff --git a/Makefile b/Makefile index ec6ef548619623ca67d92e8d4a50f0d847dc2895..973359eaa0efdc127a354e88c5aedd4e80dd5a80 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,16 @@ # SPDX-License-Identifier: Apache-2.0 # SPDX-FileCopyrightText: Huawei Inc. +BUILD_DIR ?= build + .PHONY: all -all: build +all: $(BUILD_DIR) .PHONY: clean clean: rm -rf build -build: - sphinx-build -W . build +SRC_DIR ?= . +# XXX: cannot add true dependencies because some file names contain spaces. +$(BUILD_DIR): + sphinx-build -W $(SRC_DIR) $(BUILD_DIR)