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>
This commit is contained in:

committed by
Junio C Hamano

parent
b7835b941b
commit
d2507bbbf4
@ -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@";
|
||||
|
Reference in New Issue
Block a user