@@ -98,7 +98,7 @@ all: ensure_prerequisites
98
98
-D latex_elements.inputenc= \
99
99
-D latex_elements.fontenc=' \
100
100
$(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."
102
102
103
103
104
104
# We clone cpython/ inside venv/ because venv/ is the only directory
@@ -117,14 +117,9 @@ ensure_prerequisites: venv/cpython/.git/HEAD
117
117
exit 1; \
118
118
fi
119
119
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
128
123
129
124
.PHONY : todo
130
125
todo : ensure_prerequisites
@@ -142,17 +137,27 @@ DESTS = $(addprefix $(POSPELL_TMP_DIR)/,$(addsuffix .out,$(SRCS)))
142
137
.PHONY : spell
143
138
spell : ensure_prerequisites $(DESTS )
144
139
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
+
145
150
$(POSPELL_TMP_DIR ) /% .po.out : % .po dict
146
151
@echo " Pospell checking $<..."
147
- mkdir -p $(@D )
152
+ @ mkdir -p $(@D )
148
153
pospell -p dict -l tr_TR $< && touch $@
149
154
150
155
.PHONY : fuzzy
151
156
fuzzy : ensure_prerequisites
152
157
potodo -f --exclude venv .venv $(EXCLUDED )
153
158
154
159
.PHONY : verifs
155
- verifs : spell
160
+ verifs : spell line-length sphinx-lint
156
161
157
162
.PHONY : clean
158
163
clean :
0 commit comments