]> git.ipfire.org Git - thirdparty/git.git/commit
Makefile: extract script to generate gitweb.cgi
authorPatrick Steinhardt <ps@pks.im>
Fri, 6 Dec 2024 13:24:47 +0000 (14:24 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 6 Dec 2024 22:52:11 +0000 (07:52 +0900)
commitd2507bbbf4cec59fc002ca8e59e03155836d5005
tree3906a2294f069177671c9bb45364edea9cb3ed47
parentb7835b941bd437aa770ab91d7323ce74d2bd81b7
Makefile: extract script to generate gitweb.cgi

In order to generate "gitweb.cgi" we have to replace various different
placeholders. This is done ad-hoc and is thus not easily reusable across
different build systems.

Introduce a new GITWEB-BUILD-OPTIONS.in template that we populate at
configuration time with the expected options. This script is then used
as input for a new "generate-gitweb.sh" script that generates the final
"gitweb.cgi" file. While this requires us to repeat the options multiple
times, it is in line to how we generate other build options like our
GIT-BUILD-OPTIONS file.

While at it, refactor how we replace the GITWEB_PROJECT_MAXDEPTH. Even
though this variable is supposed to be an integer, the source file has
the value quoted. The quotes are eventually stripped via sed(1), which
replaces `"@GITWEB_PROJECT_MAXDEPTH@"` with the actual value, which is
rather nonsensical. This is made clearer by just dropping the quotes in
the source file.

Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
gitweb/GITWEB-BUILD-OPTIONS.in [new file with mode: 0644]
gitweb/Makefile
gitweb/generate-gitweb-cgi.sh [new file with mode: 0755]
gitweb/gitweb.perl