]> git.ipfire.org Git - thirdparty/git.git/commit
Documentation: refactor "howto-index.sh" for out-of-tree builds
authorPatrick Steinhardt <ps@pks.im>
Fri, 27 Dec 2024 13:59:36 +0000 (14:59 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 27 Dec 2024 16:28:11 +0000 (08:28 -0800)
commit8922506cb2c34527f8b2321b4f7a4b454a325a07
tree0df5e53e234ff95883a99888e921c4a5e266f6f3
parent88e08b92e9a55fa453d44b26061a6a67a7eefafc
Documentation: refactor "howto-index.sh" for out-of-tree builds

The "howto-index.sh" is used to generate an index of our how-to docs. It
receives as input the paths to these documents, which would typically be
relative to the "Documentation/" directory in Makefile-based builds. In
an out-of-tree build though it will get relative that may be rooted
somewhere else entirely.

The file paths do end up in the generated index, and the expectation is
that they should always start with "howto/". But for out-of-tree builds
we would populate it with the paths relative to the build directory,
which is wrong.

Fix the issue by using `$(basename "$file")` to generate the path. While
at it, move the script into "howto/" to align it with the location of
the comparable "api-index.sh" script.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/Makefile
Documentation/howto/howto-index.sh [moved from Documentation/howto-index.sh with 92% similarity]