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

Re: [PATCHv2/RFC] gitweb: Prepare for splitting gitweb

From
Jakub Narebski <jnareb@gmail.com>
Date
Jul 7, 2010, 20:20 UTC
Message-ID
<201007072220.18824.jnareb@gmail.com>
In-Reply-To
<7viq4rxnro.fsf@alter.siamese.dyndns.org>
On Wed, 7 Jul 2010, Junio C Hamano wrote:
Show 31 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes:
> 
> > diff --git a/gitweb/Makefile b/gitweb/Makefile
> > index 2fb7c2d..84a1d71 100644
> > --- a/gitweb/Makefile
> > +++ b/gitweb/Makefile
> > @@ -145,12 +146,23 @@ gitweb.cgi: gitweb.perl GITWEB-BUILD-OPTIONS
> >  
> >  ### Installation rules
> >  
> > -install: all
> > +install: all install-modules
> >  	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebdir_SQ)'
> >  	$(INSTALL) -m 755 $(GITWEB_PROGRAMS) '$(DESTDIR_SQ)$(gitwebdir_SQ)'
> >  	$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebstaticdir_SQ)'
> >  	$(INSTALL) -m 644 $(GITWEB_FILES) '$(DESTDIR_SQ)$(gitwebstaticdir_SQ)'
> >  
> > +install-modules:
> > +	install_dirs=$(sort $(dir $(GITWEB_MODULES))) && \
> > +	for dir in $$install_dirs; do \
> > +		test -d '$(DESTDIR_SQ)$(gitwebdir_SQ)/$$dir' || \
> > +		$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(gitwebdir_SQ)/$$dir'; \
> > +	done
> > +	gitweb_modules=$(GITWEB_MODULES) && \
> > +	for mod in $$gitweb_modules; do \
> > +		$(INSTALL) -m 644 $$mod '$(DESTDIR_SQ)$(gitwebdir_SQ)/$$(dirname $$mod)'; \
> > +	done
> > +
> 
> Sorry, but you lost me here.  Where is GITWEB_MODULES defined (iow, what
> commit is this patch supposed to be applied)?

This is preparatory patch either for Pavan GSoC2010 work on splitting gitweb and adding committool / admin write capabilities, or for mine gitweb caching series split into modules (based on J.H. patch for git.kernel.org).

So currently $(GITWEB_MODULES) is not defined / empty.
> I also suspect that your assignment to "install_dirs" is completely bogus
> when the files listed in GITWEB_MODULES span multiple directories.

install_dirs contains _list_ of directories gitweb modules are to be installed into. `$(dir NAMES...)' extracts the directory-part of each file name in NAMES ('./' if there is no '/' in a file name), and `$(sort LIST)' is used to remove duplicate words in LIST.

It was actually tested that it works for modularized gitweb caching, in the older form using `$(foreach ...)' rather than current shell 'for' loop.

For example with the following Makefile:
  GITWEB_MODULES += GitwebCache/SimpleFileCache.pm
  GITWEB_MODULES += GitwebCache/Capture.pm
  GITWEB_MODULES += GitwebCache/Capture/SelectFH.pm
  GITWEB_MODULES += Gitweb/Config.pm
  
  all:
  	@echo $(sort $(dir $(GITWEB_MODULES)))
running 'make' results in:
  Gitweb/ GitwebCache/ GitwebCache/Capture/
-- 
Jakub Narebski
Poland
Previous: Junio C HamanoNext: Junio C Hamano
Message 11 of 14 in “[PATCHv2/RFC] gitweb: Prepare for splitting gitweb”
  1. Jakub NarebskiJul 7, 2010
  2. Ævar Arnfjörð BjarmasonJul 7, 2010
  3. Jakub NarebskiJul 7, 2010
  4. Jakub NarebskiJul 8, 2010
  5. Jakub NarebskiJul 13, 2010
  6. Ævar Arnfjörð BjarmasonJul 13, 2010
  7. Jakub NarebskiJul 14, 2010
  8. Ævar Arnfjörð BjarmasonJul 14, 2010
  9. Jakub NarebskiJul 14, 2010
  10. Junio C HamanoJul 7, 2010
  11. Jakub NarebskiJul 7, 2010
  12. Junio C HamanoJul 8, 2010
  13. Jakub NarebskiJul 8, 2010
  14. [PATCHv3/RFC] gitweb: Prepare for splitting gitwebJakub Narebski, Jul 8, 2010

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.