git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff King <peff@peff.net>
To: Junio C Hamano <gitster@pobox.com>
Cc: "Robin H. Johnson" <robbat2@gentoo.org>, git@vger.kernel.org
Subject: [PATCH] Makefile: fix NO_PERL bug with gitweb
Date: Mon, 27 Apr 2009 23:34:24 -0400	[thread overview]
Message-ID: <20090428033423.GA7704@coredump.intra.peff.net> (raw)

When the user has defined NO_PERL, we want to skip building
gitweb entirely.  However, the conditional to add
gitweb/gitweb.cgi to OTHER_PROGRAMS was evaluated before we
actually parsed the user's config.mak. This meant that "make
NO_PERL=NoThanks" worked fine, but putting "NO_PERL=NoThanks"
into your config.mak broke the build (it wanted gitweb.cgi
to satisfy "all", but the rule to build it was conditionally
ignored, so it complained).

Signed-off-by: Jeff King <peff@peff.net>
---
Robin, I believe your original patch has this problem, too. I'm assuming
it never came up because the Gentoo build specifies the options on the
make command-line instead of through config.mak (which is also why my
earlier testing didn't catch it). So you may or may not want to modify
your patch.

I moved the offending code close to the gitweb.cgi rule definition (it
was originally near the OTHER_PROGRAMS definition). I tried to find a
spot that would make some sense, rather than just plopping it randomly
somewhere after config.mak has been read. But if something else would
make more sense, Junio, feel free to tweak the patch.

 Makefile |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 49f36f5..0292b4f 100644
--- a/Makefile
+++ b/Makefile
@@ -361,9 +361,6 @@ ALL_PROGRAMS = $(PROGRAMS) $(SCRIPTS)
 
 # what 'all' will build but not install in gitexecdir
 OTHER_PROGRAMS = git$X
-ifndef NO_PERL
-OTHER_PROGRAMS += gitweb/gitweb.cgi
-endif
 
 # Set paths to tools early so that they can be used for version tests.
 ifndef SHELL_PATH
@@ -1271,6 +1268,7 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
 	chmod +x $@+ && \
 	mv $@+ $@
 
+OTHER_PROGRAMS += gitweb/gitweb.cgi
 gitweb/gitweb.cgi: gitweb/gitweb.perl
 	$(QUIET_GEN)$(RM) $@ $@+ && \
 	sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \
-- 
1.6.3.rc1.226.ga8d61c

                 reply	other threads:[~2009-04-28  3:34 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20090428033423.GA7704@coredump.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=robbat2@gentoo.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).