buildsys: docs: restore clean target - #4474
Open
leleliu008 wants to merge 1 commit into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4474 +/- ##
=======================================
Coverage 85.98% 85.98%
=======================================
Files 255 255
Lines 63940 63940
=======================================
Hits 54978 54978
Misses 8962 8962 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
docs clean target was removed in https://github.com/universal-ctags/ctags/pull/4465/changes We expect that clean target will remove _build/ _ext/__pycache__ directories. `sphinx-build -M clean` command won't do this. If users don't want to generate docs, it will fail while executing `make clean` if sphinx-build is not installed. It is unreasonable to force users to install Sphinx, as they may have only executed `make clean`.
leleliu008
force-pushed
the
fix-docs-clean
branch
from
July 30, 2026 16:45
6ac0131 to
d47fc5d
Compare
Member
|
Looks good. However, I want to make changes to the docs/Makefile minimal. I found a way to externalize your change: diff --git a/docs/Makefile b/docs/Makefile
index d4bb2cbb9..ba3d446ce 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -18,3 +18,5 @@ help:
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
+
+include ext.mak
diff --git a/docs/ext.mak b/docs/ext.mak
new file mode 100644
index 000000000..69a29f5d3
--- /dev/null
+++ b/docs/ext.mak
@@ -0,0 +1,8 @@
+.PHONY: ext.mak
+
+EXTDIR = _ext
+
+.PHONY: clean
+
+clean:
+ rm -rf $(BUILDDIR) $(EXTDIR)/__pycache__ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
docs clean target was removed in #4465
We expect that clean target will remove
_build/_ext/__pycache__directories.sphinx-build -M cleancommand won't do this.If users don't want to generate docs, it will fail while executing
make cleanifsphinx-buildis not installed.It is unreasonable to force users to install
Sphinx, as they may have only executedmake clean.