All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Narebski <jnareb@gmail.com>
To: Jonathan Nieder <jrnieder@gmail.com>
Cc: git@vger.kernel.org, Christian Couder <chriscool@tuxfamily.org>,
	Petr Baudis <pasky@suse.cz>,
	Pavan Kumar Sunkara <pavan.sss1991@gmail.com>,
	John Hawley <warthog9@kernel.org>
Subject: Re: [RFC] Splitting gitweb and build-time configuration variables
Date: Wed, 18 Aug 2010 10:05:48 +0200	[thread overview]
Message-ID: <201008181005.49524.jnareb@gmail.com> (raw)
In-Reply-To: <20100818030321.GB21185@burratino>

On Wed, 18 Aug 2010, Jonathan Nieder wrote:
> Jakub Narebski wrote:
> 
> > 1. Description of build-time configuration variable is in the module
> >    that defines it, and each block of variables coming from the same
> >    module would have notice where one can find description of those
> >    variables
> [...]
> > 2. Description of build-time configuration variables is in gitweb.perl,
> >    and in each module there is comment that full description of those
> >    variables can be found there, e.g. (proposal):
> > 
> >      # Values of those variables are set during build time in 
> >      # gitweb/gitweb.perl (main script).  You can find their description
> >      # there.
> [...]
> > 3. Duplicate description of those variables
> 
> With #2, a person reading the Makefile can grep for some particular
> substitution (++GITWEB_PROJECTROOT++) and quickly find the name and
> description of the variable it is used for.  If there were a 1:1
> correspondence between the variables in gitweb.perl and the Makefile,
> I would even suggest moving the description to the Makefile.

There is a bit of difference between Perl variables in gitweb.perl and
make build-time variables in gitweb/Makefile, namely:

  our $GIT = "++GIT_BINDIR++/git";

  our $site_name = "++GITWEB_SITENAME++"
                 || ($ENV{'SERVER_NAME'} || "Untitled") . " Git";

  our @stylesheets = ("++GITWEB_CSS++");

  our @git_base_url_list = grep { $_ ne '' } ("++GITWEB_BASE_URL++");

  our $GITWEB_CONFIG = $ENV{'GITWEB_CONFIG'} || "++GITWEB_CONFIG++";
  our $GITWEB_CONFIG_SYSTEM = $ENV{'GITWEB_CONFIG_SYSTEM'}
                            || "++GITWEB_CONFIG_SYSTEM++";

Perl variables can be overriden in run-time configuration (testsuite
uses this to test _source_ version i.e. gitweb.perl rather than 
generated gitweb.cgi), so they have to be described anyway.

I think that adding description of make variables to gitweb/Makefile,
similar to what main Makefile does, would be a good idea, though I don't
like that it leads to some duplication.

> 
> In practice, I suspect the run-time configuration is more important to
> people.  That is already fairly well documented in gitweb/README.

Build-time configuration is also described in gitweb/README, in more
detail.

-- 
Jakub Narebski
Poland

      reply	other threads:[~2010-08-18  8:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-17 18:15 [RFC] Splitting gitweb and build-time configuration variables Jakub Narebski
2010-08-18  3:03 ` Jonathan Nieder
2010-08-18  8:05   ` Jakub Narebski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201008181005.49524.jnareb@gmail.com \
    --to=jnareb@gmail.com \
    --cc=chriscool@tuxfamily.org \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=pasky@suse.cz \
    --cc=pavan.sss1991@gmail.com \
    --cc=warthog9@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.