Skip to content

Commit

Permalink
docs/Makefile.am, docs/man/Makefile.am: .prep-src-docs for out-of-tre…
Browse files Browse the repository at this point in the history
…e builds: only rewrite "linkman" references for doc text sources that have them [#722]

Spare asciidoc.conf, docinfo.xml and similar resource files,
as well as docs that do not have those tags in the first place.

Signed-off-by: Jim Klimov <[email protected]>
  • Loading branch information
jimklimov committed Jan 2, 2025
1 parent 66c4193 commit 5c42be8
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
10 changes: 9 additions & 1 deletion docs/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -925,7 +925,15 @@ $(abs_top_builddir)/docs/.prep-src-docs: $(PREP_SRC)
ln -fs "$${linksrcroot}/$$F" "$${linkroot}/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \
COUNT="`expr $$COUNT + 1`" ; \
fi ; \
if $$MAN_SECTIONS_DEFAULT ; then \
case "$$F" in \
*.txt|*.adoc) IS_TEXT=true ;; \
*.*) IS_TEXT=false ;; \
*) IS_TEXT=true ;; \
esac; \
if $$IS_TEXT ; then \
grep -w linkman "$${linkroot}/$${F}" > /dev/null || IS_TEXT=false ; \
fi ; \
if $$MAN_SECTIONS_DEFAULT || ! $$IS_TEXT ; then \
cat ; \
else \
sed \
Expand Down
10 changes: 9 additions & 1 deletion docs/man/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -1326,7 +1326,15 @@ $(abs_top_builddir)/docs/man/.prep-src-docs: $(PREP_SRC)
ln -fs "$${linksrcroot}/$$F" "$${linkroot}/$$F" || { rm -f "$@.working" ; exit 1 ; } ; \
COUNT="`expr $$COUNT + 1`" ; \
fi ; \
if $$MAN_SECTIONS_DEFAULT ; then \
case "$$F" in \
*.txt|*.adoc) IS_TEXT=true ;; \
*.*) IS_TEXT=false ;; \
*) IS_TEXT=true ;; \
esac; \
if $$IS_TEXT ; then \
grep -w linkman "$${linkroot}/$${F}" > /dev/null || IS_TEXT=false ; \
fi ; \
if $$MAN_SECTIONS_DEFAULT || ! $$IS_TEXT ; then \
cat ; \
else \
sed \
Expand Down

0 comments on commit 5c42be8

Please sign in to comment.