Skip to content

Commit 43c4062

Browse files
committed
Update Makefile
1 parent 6cd68e1 commit 43c4062

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

Makefile

+16-11
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ all: ensure_prerequisites
9898
-D latex_elements.inputenc= \
9999
-D latex_elements.fontenc=' \
100100
$(MODE)
101-
@echo "Build success, open file://$(abspath venv/cpython/)/Doc/build/html/index.html or run 'make serve' to see them."
101+
@echo "Build success, open file://$(abspath venv/cpython/)/Doc/build/html/index.html or run 'make htmlview' to see them."
102102

103103

104104
# We clone cpython/ inside venv/ because venv/ is the only directory
@@ -117,14 +117,9 @@ ensure_prerequisites: venv/cpython/.git/HEAD
117117
exit 1; \
118118
fi
119119

120-
121-
.PHONY: serve
122-
serve:
123-
ifdef SERVE_PORT
124-
$(MAKE) -C venv/cpython/Doc/ serve SERVE_PORT=$(SERVE_PORT)
125-
else
126-
$(MAKE) -C venv/cpython/Doc/ serve
127-
endif
120+
.PHONY: htmlview
121+
htmlview: MODE=htmlview
122+
htmlview: all
128123

129124
.PHONY: todo
130125
todo: ensure_prerequisites
@@ -142,17 +137,27 @@ DESTS = $(addprefix $(POSPELL_TMP_DIR)/,$(addsuffix .out,$(SRCS)))
142137
.PHONY: spell
143138
spell: ensure_prerequisites $(DESTS)
144139

140+
.PHONY: line-length
141+
line-length:
142+
@echo "Searching for long lines..."
143+
@awk '{if (length(gensub(/శ్రీనివాస్/, ".", "g", $$0)) > 80 && length(gensub(/[^ ]/, "", "g")) > 1) {print FILENAME ":" FNR, "line too long:", $$0; ERRORS+=1}} END {if (ERRORS>0) {exit 1}}' *.po */*.po
144+
145+
.PHONY: sphinx-lint
146+
sphinx-lint:
147+
@echo "Checking all files using sphinx-lint..."
148+
@sphinx-lint --enable all --disable line-too-long *.po */*.po
149+
145150
$(POSPELL_TMP_DIR)/%.po.out: %.po dict
146151
@echo "Pospell checking $<..."
147-
mkdir -p $(@D)
152+
@mkdir -p $(@D)
148153
pospell -p dict -l tr_TR $< && touch $@
149154

150155
.PHONY: fuzzy
151156
fuzzy: ensure_prerequisites
152157
potodo -f --exclude venv .venv $(EXCLUDED)
153158

154159
.PHONY: verifs
155-
verifs: spell
160+
verifs: spell line-length sphinx-lint
156161

157162
.PHONY: clean
158163
clean:

merge.py

-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ def main():
116116
shutil.rmtree(pot_path)
117117
run("powrap", "-m")
118118
update_makefile(args.cpython_repo)
119-
run("sphinx-lint", "*.po", "*/*.po")
120119

121120

122121
if __name__ == "__main__":

0 commit comments

Comments
 (0)