Skip to contentSkip to conversation

Makefile: Use $(sharedir)/gitweb for target 'install-gitweb'

PATCH In review Pavan Kumar Sunkara 3 participants 4 messages Jun 15, 2016 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Makefile: Use $(sharedir)/gitweb for target 'install-gitweb'

Export gitwebdir variable so that when user types the command 'make install-gitweb', gitweb is installed in $(sharedir)/gitweb rather than /var/www/cgi-bin. Now, $(sharedir)/gitweb is default for both 'install' and 'install-gitweb' targets.

Remove 'gitwebdir=$(gitwebdir_SQ)' from gitweb part of 'install' target which is unneccessary now.

---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index 8f011a5..32e3146 100644
@@ -294,7 +294,7 @@ lib = lib
 # DESTDIR=
 pathsep = :
 
-export prefix bindir sharedir sysconfdir
+export prefix bindir sharedir gitwebdir sysconfdir
 
 CC = gcc
 AR = ar
@@ -2049,7 +2049,7 @@ install: all
 	$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
 ifndef NO_PERL
 	$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
-	$(MAKE) -C gitweb gitwebdir=$(gitwebdir_SQ) install
+	$(MAKE) -C gitweb install
 endif
 ifndef NO_PYTHON
 	$(MAKE) -C git_remote_helpers prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
Signature · 1 line
1.7.1.447.g40f7.dirty
Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Pavan Kumar Sunkara

Export gitwebdir variable so that when user types the command 'make install-gitweb', gitweb is installed in $(sharedir)/gitweb rather than /var/www/cgi-bin. Now, $(sharedir)/gitweb is default for both 'install' and 'install-gitweb' targets.

Remove 'gitwebdir=$(gitwebdir_SQ)' from gitweb part of 'install' target which is unneccessary now.

For what it is worth:

(But I have not tested it!)

Quoted 9 lines
---
 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Makefile +0 -0
index 8f011a5..32e3146 100644

Makefile lib = lib · line 297

Quoted 5 lines
Makefile +1 -1
@@ -294,7 +294,7 @@ lib = lib
 # DESTDIR=
 pathsep = :
 
-export prefix bindir sharedir sysconfdir
+export prefix bindir sharedir gitwebdir sysconfdir

Nitpick: why not

+export prefix bindir sharedir sysconfdir gitwebdir

i.e. have 'gitwebdir' last? Not that it matters, though....

Makefile install: all · line 2052

Quoted 9 lines
Makefile +1 -1
 CC = gcc
 AR = ar
@@ -2049,7 +2049,7 @@ install: all
 	$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install
 ifndef NO_PERL
 	$(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
-	$(MAKE) -C gitweb gitwebdir=$(gitwebdir_SQ) install
+	$(MAKE) -C gitweb install

Nice.

Quoted 7 lines
Makefile +0 -0
 endif
 ifndef NO_PYTHON
 	$(MAKE) -C git_remote_helpers prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
Signature · 1 line
1.7.1.447.g40f7.dirty
Signature · 2 lines
Jakub Narebski
Poland
#2 lore raw
Quoted 10 lines · Jakub Narebski
Quoted 8 lines · Pavan Kumar Sunkara

Export gitwebdir variable so that when user types the command 'make install-gitweb', gitweb is installed in $(sharedir)/gitweb rather than /var/www/cgi-bin. Now, $(sharedir)/gitweb is default for both 'install' and 'install-gitweb' targets.

Remove 'gitwebdir=$(gitwebdir_SQ)' from gitweb part of 'install' target which is unneccessary now.

Quoted 7 lines
Quoted 1 line

For what it is worth:

(But I have not tested it!)

I am wondering if we would also want to do something with this line

gitwebdir ?= /var/www/cgi-bin

in gitweb/Makefile. This is orthogonal to the patch under discussion does, though.

#3 lore raw
Quoted 9 lines

I am wondering if we would also want to do something with this line

   gitwebdir ?= /var/www/cgi-bin

in gitweb/Makefile.  This is orthogonal to the patch under discussion does, though.

Well, Let us say that we use /var/www/cgi-bin as default if user downloads only gitweb and install it.
If he is installing git, then gitweb needs to be installed in $(sharedir)/gitweb. Putting it as default in main Makefile is supported.

So, It won't be orthogonal to the patch.

Thanks,
Pavan.