-
Notifications
You must be signed in to change notification settings - Fork 7.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve php-src docs sphinx build, also on *nix #16743
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# Makefile for php-src/docs | ||
# Copyright (c) The PHP Group | ||
|
||
# If people set these on the make command line, use 'em | ||
|
||
SPHINXBUILD ?= sphinx-build | ||
GH_PAGES_URL ?= https://php.github.io/php-src/ | ||
|
||
SOURCEDIR = source | ||
BUILDDIR = build | ||
|
||
rwildcard = $(foreach d,$(wildcard $(1:=/*)),$(call rwildcard,$d,$2) $(filter $(subst *,%,$2),$d)) | ||
FILES = $(call rwildcard,$(SOURCEDIR),*.rst) | ||
|
||
all : html | ||
|
||
.PHONY : clean html | ||
|
||
clean : | ||
rm -rf -- $(wildcard $(SOURCEDIR)/.~ $(BUILDDIR)) | ||
|
||
html : $(SOURCEDIR)/.~ | ||
$(SPHINXBUILD) -M $@ $(SOURCEDIR) $(BUILDDIR) | ||
@printf 'Browse the php-src docs \e]8;;%s\e\\%s\e]8;;\e\\ (or \e]8;;%s\e\\%s\e]8;;\e\\)\n' \ | ||
"file://$(abspath $(BUILDDIR))/$@/index.$@" "local" "$(GH_PAGES_URL)" "online" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we spell out the online version? That makes it sound like it was deployed. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Found it helpful to have the reference at hand. What would it make sound better to you? @iluuu1994 |
||
|
||
$(SOURCEDIR)/.~ : $(FILES) | ||
rstfmt -w 100 $? | ||
touch $@ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Sphinx | ||
sphinx-design | ||
sphinxawesome-theme | ||
rstfmt |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,7 +16,6 @@ | |
author = 'The PHP Group' | ||
extensions = [ | ||
'sphinx_design', | ||
'sphinxawesome_theme.highlighting', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why is this dropped? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deprecated, details are in the commit message @iluuu1994 |
||
] | ||
templates_path = ['_templates'] | ||
html_theme = 'sphinxawesome_theme' | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably use the make file, to make sure the commands stay consistent.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The makefile does not install the python requirements.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commented line is the
rstfmt
command.