infra: Also convert the documentation to use `make-env`.
Signed-off-by: Tim 'mithro' Ansell <me@mith.ro>
This commit is contained in:
parent
7e0b9790e2
commit
f2fccd58c7
|
@ -26,7 +26,7 @@ sphinx:
|
||||||
configuration: docs/conf.py
|
configuration: docs/conf.py
|
||||||
|
|
||||||
conda:
|
conda:
|
||||||
environment: environment.yml
|
environment: docs/environment.yml
|
||||||
|
|
||||||
submodules:
|
submodules:
|
||||||
include:
|
include:
|
||||||
|
|
|
@ -1,15 +1,35 @@
|
||||||
# Minimal makefile for Sphinx documentation
|
# Copyright 2020 SkyWater PDK Authors
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
DOCSDIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
# The top directory where environment will be created.
|
||||||
TOPDIR := $(realpath $(DOCSDIR)/..)
|
DOCS_DIR := $(dir $(lastword $(MAKEFILE_LIST)))
|
||||||
|
TOP_DIR := $(realpath $(DOCS_DIR)/..)
|
||||||
|
|
||||||
ifndef NO_CONDA
|
# A pip `requirements.txt` file.
|
||||||
include $(TOPDIR)/scripts/make/conda.mk
|
# https://pip.pypa.io/en/stable/reference/pip_install/#requirements-file-format
|
||||||
endif
|
REQUIREMENTS_FILE := requirements.txt
|
||||||
ifdef NO_CONDA
|
|
||||||
IN_CONDA_ENV :=
|
# A conda `environment.yml` file.
|
||||||
CONDA_ENV_PYTHON :=
|
# https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
|
||||||
endif
|
ENVIRONMENT_FILE := environment.yml
|
||||||
|
|
||||||
|
$(TOP_DIR)/third_party/make-env/conda.mk: $(TOP_DIR)/.gitmodules
|
||||||
|
cd $(TOP_DIR); git submodule update --init third_party/make-env
|
||||||
|
|
||||||
|
-include $(TOP_DIR)/third_party/make-env/conda.mk
|
||||||
|
|
||||||
SHELL = /bin/bash
|
SHELL = /bin/bash
|
||||||
|
|
||||||
|
@ -22,8 +42,8 @@ SPHINXOPTS = -j $(CPU_CORES_2)
|
||||||
SPHINXBUILD = $(IN_CONDA_ENV) sphinx-build
|
SPHINXBUILD = $(IN_CONDA_ENV) sphinx-build
|
||||||
SPHINXAUTOBUILD = $(IN_CONDA_ENV) sphinx-autobuild
|
SPHINXAUTOBUILD = $(IN_CONDA_ENV) sphinx-autobuild
|
||||||
SPHINXPROJ = SkyWaterPDK
|
SPHINXPROJ = SkyWaterPDK
|
||||||
SOURCEDIR = $(DOCSDIR)
|
SOURCEDIR = $(DOCS_DIR)
|
||||||
BUILDDIR = $(DOCSDIR)/_build
|
BUILDDIR = $(DOCS_DIR)/_build
|
||||||
|
|
||||||
# Put it first so that "make" without argument is like "make help".
|
# Put it first so that "make" without argument is like "make help".
|
||||||
help: | $(CONDA_ENV_PYTHON)
|
help: | $(CONDA_ENV_PYTHON)
|
||||||
|
@ -75,10 +95,11 @@ echo: | $(CONDA_ENV_PYTHON)
|
||||||
# Catch-all target: route all unknown targets to Sphinx using the new
|
# Catch-all target: route all unknown targets to Sphinx using the new
|
||||||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
||||||
.DEFAULT: | $(CONDA_ENV_PYTHON)
|
.DEFAULT: | $(CONDA_ENV_PYTHON)
|
||||||
|
@make env
|
||||||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
||||||
|
|
||||||
|
|
||||||
clean: clean-docs
|
clean:: clean-docs
|
||||||
|
|
||||||
|
|
||||||
clean-docs:
|
clean-docs:
|
||||||
|
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Copyright 2020 SkyWater PDK Authors
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# https://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
name: skywater-pdk-docs
|
||||||
|
channels:
|
||||||
|
- symbiflow
|
||||||
|
- conda-forge
|
||||||
|
- defaults
|
||||||
|
dependencies:
|
||||||
|
- python=3.8
|
||||||
|
- pip
|
||||||
|
- yosys
|
||||||
|
- netlistsvg
|
||||||
|
# Packages installed from PyPI
|
||||||
|
- pip:
|
||||||
|
- -r file:requirements.txt
|
|
@ -16,14 +16,10 @@
|
||||||
name: skywater-pdk-scripts
|
name: skywater-pdk-scripts
|
||||||
channels:
|
channels:
|
||||||
- symbiflow
|
- symbiflow
|
||||||
- conda-forge
|
|
||||||
- defaults
|
- defaults
|
||||||
dependencies:
|
dependencies:
|
||||||
- python=3.8
|
- python=3.8
|
||||||
- pip
|
- pip
|
||||||
- yosys
|
|
||||||
- netlistsvg
|
|
||||||
# Packages installed from PyPI
|
# Packages installed from PyPI
|
||||||
- pip:
|
- pip:
|
||||||
- -r file:requirements.txt
|
- -r file:requirements.txt
|
||||||
- -r file:docs/requirements.txt
|
|
||||||
|
|
Loading…
Reference in New Issue