summaryrefslogtreecommitdiff
path: root/gitweb/gitweb.perl
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-12-06 14:24:47 +0100
committerJunio C Hamano <gitster@pobox.com>2024-12-07 07:52:11 +0900
commitd2507bbbf4cec59fc002ca8e59e03155836d5005 (patch)
tree3906a2294f069177671c9bb45364edea9cb3ed47 /gitweb/gitweb.perl
parentb7835b941bd437aa770ab91d7323ce74d2bd81b7 (diff)
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>
Diffstat (limited to 'gitweb/gitweb.perl')
-rwxr-xr-xgitweb/gitweb.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index dfb66fdd2a..1c0a0adce4 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -88,7 +88,7 @@ our $projectroot = "@GITWEB_PROJECTROOT@";
# fs traversing limit for getting project list
# the number is relative to the projectroot
-our $project_maxdepth = "@GITWEB_PROJECT_MAXDEPTH@";
+our $project_maxdepth = @GITWEB_PROJECT_MAXDEPTH@;
# string of the home link on top of all pages
our $home_link_str = "@GITWEB_HOME_LINK_STR@";