Skip to content

Commit

Permalink
Makefile: add a check target
Browse files Browse the repository at this point in the history
Add a `check' target to the Makefile, to run verifications on the
repository. Run the sphinx `linkcheck' step in there for the moment.

Update the CI to call `make check' instead of directly calling sphinx
`linkcheck'.

Mention this `make check' verification in CONTRIBUTING.

Signed-off-by: Vincent Stehlé <[email protected]>
  • Loading branch information
vstehle committed Sep 27, 2023
1 parent 274407f commit ebe72cd
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ jobs:
pip3 install --user typing
pip3 install --user Sphinx
- name: 'Check links'
run: make linkcheck
- name: 'Check'
run: make check

- name: 'Build PDF'
run: |
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ https://github.com/ARM-software/ebbr
Anyone may contribute to the EBBR project.
Contributions are licensed under CC-BY-SA-4.0_ and must be made with a
Developer Certificate of Origin (DCO_) attestation as described below.
It is recommended to run ``make check`` before sending patches.

EBBR discussion uses the boot-architecture_ mailing list.

Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,13 @@ BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@echo
@echo 'Use "make check" to perform verifications on this repository.'

.PHONY: help Makefile
.PHONY: help Makefile check

check:
$(SPHINXBUILD) -M linkcheck "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
Expand Down
4 changes: 4 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,10 @@ To generate a single HTML page::

Output goes in ``./build`` subdirectory.

To run verifications on this repository::

$ make check

To get some help on the available targets::

$ make help
Expand Down

0 comments on commit ebe72cd

Please sign in to comment.