git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[RFC/PATCH v2] gitweb: respect $GITPERLLIB

From
LWLea Wiemann <lewiemann@gmail.com>
Date
Jun 20, 2008, 19:35 UTC
Message-ID
<1213990547-7585-1-git-send-email-LeWiemann@gmail.com>
In-Reply-To
<1213929117-32037-1-git-send-email-LeWiemann@gmail.com>

gitweb/gitweb.cgi now respects $GITPERLLIB, like the Perl-based Git commands.

Signed-off-by: Lea Wiemann <LeWiemann@gmail.com>
---
Changed since v1: Added missing INSTLIBDIR initialization.

I just noticed that as of now Gitweb isn't using any Perl modules, so this change is actually not necessary yet; hence I'm making it an RFC patch. I'll probably squash this into a larger "gitweb: use new Git::Repo API" patch (which I'll publish in a few days).

Comments on this change to the Makefile are still appreciated, of course. :)

-- Lea
 Makefile |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/Makefile b/Makefile
index 85c0846..64eeac1 100644
--- a/Makefile
+++ b/Makefile
@@ -1083,7 +1083,15 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
 
 gitweb/gitweb.cgi: gitweb/gitweb.perl
 	$(QUIET_GEN)$(RM) $@ $@+ && \
-	sed -e '1s|#!.*perl|#!$(PERL_PATH_SQ)|' \
+	INSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \
+	sed -e '1{' \
+	    -e '	s|#!.*perl|#!$(PERL_PATH_SQ)|' \
+	    -e '	h' \
+	    -e '	s=.*=use lib (split(/:/, $$ENV{GITPERLLIB} || "@@INSTLIBDIR@@"));=' \
+	    -e '	H' \
+	    -e '	x' \
+	    -e '}' \
+	    -e 's|@@INSTLIBDIR@@|'"$$INSTLIBDIR"'|g' \
 	    -e 's|++GIT_VERSION++|$(GIT_VERSION)|g' \
 	    -e 's|++GIT_BINDIR++|$(bindir)|g' \
 	    -e 's|++GITWEB_CONFIG++|$(GITWEB_CONFIG)|g' \
-- 
1.5.6.79.g01e9.dirty
Previous: Lea WiemannNext: Lea Wiemann
Message 2 of 5 in “gitweb: respect $GITPERLLIB”
  1. gitweb: respect $GITPERLLIBLea Wiemann, Jun 20, 2008
  2. gitweb: respect $GITPERLLIBLea Wiemann, Jun 20, 2008
  3. gitweb: respect $GITPERLLIBLea Wiemann, Jun 20, 2008
  4. Junio C HamanoJun 21, 2008
  5. gitweb: respect $GITPERLLIBLea Wiemann, Jun 21, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.