Skip to content

Commit

Permalink
Allow target chaining in Windows make
Browse files Browse the repository at this point in the history
  • Loading branch information
lochhh committed Oct 24, 2024
1 parent 8a9e320 commit bb6437c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 4 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,10 @@ The local build can be viewed by opening `docs/build/html/index.html` in a brows

To re-build the documentation after making changes, we recommend removing existing build files first.
The following command will remove all generated files in `docs/`,
including the auto-generated API index `source/api_index.rst`, and those in `build/`, `source/api/`, and `source/examples/`. Once the files are removed, you can re-build the documentation as described above.
including the auto-generated API index `source/api_index.rst`, and those in `build/`, `source/api/`, and `source/examples/`. It will then re-build the documentation:

```sh
make clean
make clean html
```

To check that external links are correctly resolved, run:
Expand All @@ -323,10 +323,9 @@ linkcheck_anchors_ignore_for_url = [

:::{tip}
The `make` commands can be combined to run multiple tasks sequentially.
For example, to clean the build directory, build the documentation, and check the links, run:
For example, to re-build the documentation and check the links, run:
```sh
make clean html linkcheck # Unix-like systems
make clean && make html && make linkcheck # Windows systems
make clean html linkcheck
```
:::

Expand Down
6 changes: 5 additions & 1 deletion docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ if errorlevel 9009 (

if "%1" == "" goto help

:process_targets
if "%1" == "clean" (
@echo Removing auto-generated files under 'docs' and 'src'...
rmdir /S /Q %BUILDDIR%
Expand All @@ -35,9 +36,12 @@ if "%1" == "clean" (
) else (
@echo Generating API index...
python make_api_index.py
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
)

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
shift
if not "%1" == "" goto process_targets

goto end

:help
Expand Down

0 comments on commit bb6437c

Please sign in to comment.