Skip to content

Commit d7f380d

Browse files
committed
doc: don't included stray .md files in index.rst
If you change branches and have a generated .md file, index.rst will pick it up. Use the Makefile variable, not the contents of the filesystem! Signed-off-by: Rusty Russell <[email protected]>
1 parent 4f5ea34 commit d7f380d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

doc/Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -258,11 +258,11 @@ doc-clean:
258258
$(RM) $(MANPAGES) $(MARKDOWN_WITH_SCHEMA) doc/.doc_version
259259
$(RM) doc/deployable-lightning.{aux,bbl,blg,dvi,log,out,tex}
260260

261-
doc/index.rst: $(MANPAGES:=.md)
261+
doc/index.rst: $(MANPAGES:=.md) Makefile
262262
@$(call VERBOSE, "genidx $@", \
263-
find doc -maxdepth 1 -name '*\.[0-9]\.md' | \
264-
cut -b 5- | LC_ALL=C sort | \
265-
sed "s/\(.*\)\.\(.*\).*\.md/\1 <\1.\2.md>/" | \
263+
for m in $(MANPAGES); do basename $$m; done | \
264+
LC_ALL=C sort | \
265+
sed "s/\(.*\)\.\(.*\)/\1 <\1.\2.md>/" | \
266266
$(PYTHON) devtools/blockreplace.py doc/index.rst manpages --language=rst --indent " " \
267267
)
268268

0 commit comments

Comments
 (0)