git@vger.kernel.org list mirror (unofficial, one of many)
 help / color / mirror / code / Atom feed
* [PATCH 1/3] git-gui/Makefile: Replace libdir with gitgui_libdir
@ 2007-09-05 23:21 Dmitry V. Levin
  2007-09-06  2:32 ` Shawn O. Pearce
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry V. Levin @ 2007-09-05 23:21 UTC (permalink / raw)
  To: Git Mailing List; +Cc: Junio C Hamano

On GNU/Linux, libdir is used to mean "/usr/lib or /usr/lib64"
depending on architecture.  Different libdir meaning breaks
idiomatic expressions like rpm specfile "make libdir=%_libdir".

Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
---
 git-gui/Makefile |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/git-gui/Makefile b/git-gui/Makefile
index 1bac6fe..f143b2c 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -76,8 +76,8 @@ SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
 TCL_PATH_SQ = $(subst ','\'',$(TCL_PATH))
 TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
 
-libdir   ?= $(sharedir)/git-gui/lib
-libdir_SQ = $(subst ','\'',$(libdir))
+gitgui_libdir   ?= $(sharedir)/git-gui/lib
+gitgui_libdir_SQ = $(subst ','\'',$(gitgui_libdir))
 
 exedir    = $(dir $(gitexecdir))share/git-gui/lib
 exedir_SQ = $(subst ','\'',$(exedir))
@@ -85,7 +85,7 @@ exedir_SQ = $(subst ','\'',$(exedir))
 $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
 	$(QUIET_GEN)rm -f $@ $@+ && \
 	GITGUI_RELATIVE= && \
-	if test '$(exedir_SQ)' = '$(libdir_SQ)'; then \
+	if test '$(exedir_SQ)' = '$(gitgui_libdir_SQ)'; then \
 		if test "$(uname_O)" = Cygwin; \
 		then GITGUI_RELATIVE= ; \
 		else GITGUI_RELATIVE=1; \
@@ -95,7 +95,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh
 		-e 's|^ exec wish "$$0"| exec $(subst |,'\|',$(TCLTK_PATH_SQ)) "$$0"|' \
 		-e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \
 		-e 's|@@GITGUI_RELATIVE@@|'$$GITGUI_RELATIVE'|' \
-		-e $$GITGUI_RELATIVE's|@@GITGUI_LIBDIR@@|$(libdir_SQ)|' \
+		-e $$GITGUI_RELATIVE's|@@GITGUI_LIBDIR@@|$(gitgui_libdir_SQ)|' \
 		$@.sh >$@+ && \
 	chmod +x $@+ && \
 	mv $@+ $@
@@ -126,7 +126,7 @@ TRACK_VARS = \
 	$(subst ','\'',TCL_PATH='$(TCL_PATH_SQ)') \
 	$(subst ','\'',TCLTK_PATH='$(TCLTK_PATH_SQ)') \
 	$(subst ','\'',gitexecdir='$(gitexecdir_SQ)') \
-	$(subst ','\'',libdir='$(libdir_SQ)') \
+	$(subst ','\'',gitgui_libdir='$(gitgui_libdir_SQ)') \
 #end TRACK_VARS
 
 GIT-GUI-VARS: .FORCE-GIT-GUI-VARS
@@ -142,9 +142,9 @@ install: all
 	$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(gitexecdir_SQ)' $(INSTALL_D1)
 	$(QUIET)$(INSTALL_X0)git-gui $(INSTALL_X1) '$(DESTDIR_SQ)$(gitexecdir_SQ)'
 	$(QUIET)$(foreach p,$(GITGUI_BUILT_INS), $(INSTALL_L0)'$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' $(INSTALL_L1)'$(DESTDIR_SQ)$(gitexecdir_SQ)/git-gui' $(INSTALL_L2)'$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' $(INSTALL_L3) &&) true
-	$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(libdir_SQ)' $(INSTALL_D1)
-	$(QUIET)$(INSTALL_R0)lib/tclIndex $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)'
-	$(QUIET)$(foreach p,$(ALL_LIBFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)' &&) true
+	$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(gitgui_libdir_SQ)' $(INSTALL_D1)
+	$(QUIET)$(INSTALL_R0)lib/tclIndex $(INSTALL_R1) '$(DESTDIR_SQ)$(gitgui_libdir_SQ)'
+	$(QUIET)$(foreach p,$(ALL_LIBFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(gitgui_libdir_SQ)' &&) true
 
 dist-version:
 	@mkdir -p $(TARDIR)
-- 
ldv

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] git-gui/Makefile: Replace libdir with gitgui_libdir
  2007-09-05 23:21 [PATCH 1/3] git-gui/Makefile: Replace libdir with gitgui_libdir Dmitry V. Levin
@ 2007-09-06  2:32 ` Shawn O. Pearce
  2007-09-06 10:00   ` Dmitry V. Levin
  0 siblings, 1 reply; 5+ messages in thread
From: Shawn O. Pearce @ 2007-09-06  2:32 UTC (permalink / raw)
  To: Dmitry V. Levin; +Cc: Git Mailing List, Junio C Hamano

"Dmitry V. Levin" <ldv@altlinux.org> wrote:
> On GNU/Linux, libdir is used to mean "/usr/lib or /usr/lib64"
> depending on architecture.  Different libdir meaning breaks
> idiomatic expressions like rpm specfile "make libdir=%_libdir".
> 
> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
> ---
>  git-gui/Makefile |   16 ++++++++--------
>  1 files changed, 8 insertions(+), 8 deletions(-)

Although I could apply this with `am -3` I'm NACK'ing this right
now because...
 
> diff --git a/git-gui/Makefile b/git-gui/Makefile
> index 1bac6fe..f143b2c 100644
> --- a/git-gui/Makefile
> +++ b/git-gui/Makefile
> @@ -76,8 +76,8 @@ SHELL_PATH_SQ = $(subst ','\'',$(SHELL_PATH))
>  TCL_PATH_SQ = $(subst ','\'',$(TCL_PATH))
>  TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
>  
> -libdir   ?= $(sharedir)/git-gui/lib
> -libdir_SQ = $(subst ','\'',$(libdir))
> +gitgui_libdir   ?= $(sharedir)/git-gui/lib
> +gitgui_libdir_SQ = $(subst ','\'',$(gitgui_libdir))

git-gui is its own project with its own Makefile.  Junio includes
it in git.git to help widen its audience, and because it is quite
portable and easy for him to include.   In the future git-gui will
become a proper subproject of git.git.

If you want to define libdir in git's toplevel Makefile *and*
that definition is being exported down into git-gui's Makefile
then I think git's toplevel Makefile should arrange for it to
not export libdir down into git-gui.

Of course one has to wonder if that is even possible in GNU make.
I'm not a GNU make expert so I don't really know.

-- 
Shawn.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] git-gui/Makefile: Replace libdir with gitgui_libdir
  2007-09-06  2:32 ` Shawn O. Pearce
@ 2007-09-06 10:00   ` Dmitry V. Levin
  2007-09-07  5:01     ` Shawn O. Pearce
  0 siblings, 1 reply; 5+ messages in thread
From: Dmitry V. Levin @ 2007-09-06 10:00 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: Git Mailing List, Junio C Hamano

[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]

On Wed, Sep 05, 2007 at 10:32:27PM -0400, Shawn O. Pearce wrote:
> "Dmitry V. Levin" <ldv@altlinux.org> wrote:
> > On GNU/Linux, libdir is used to mean "/usr/lib or /usr/lib64"
> > depending on architecture.  Different libdir meaning breaks
> > idiomatic expressions like rpm specfile "make libdir=%_libdir".
> > 
> > Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>
> > ---
> >  git-gui/Makefile |   16 ++++++++--------
> >  1 files changed, 8 insertions(+), 8 deletions(-)
> 
> Although I could apply this with `am -3` I'm NACK'ing this right
> now because...
[...]
> git-gui is its own project with its own Makefile.  Junio includes
> it in git.git to help widen its audience, and because it is quite
> portable and easy for him to include.   In the future git-gui will
> become a proper subproject of git.git.

The idea is that git-gui's libdir is not a traditional arch-dependent
libdir's subdirectory, but rather arch-independent datadir's subdirectory.
That is, I see no reason to call it libdir even in standalone project.

> If you want to define libdir in git's toplevel Makefile *and*
> that definition is being exported down into git-gui's Makefile

Yes, that was my first motivation, but the issue appears to be a bit more
complex.


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] git-gui/Makefile: Replace libdir with gitgui_libdir
  2007-09-06 10:00   ` Dmitry V. Levin
@ 2007-09-07  5:01     ` Shawn O. Pearce
  2007-09-07 12:44       ` Dmitry V. Levin
  0 siblings, 1 reply; 5+ messages in thread
From: Shawn O. Pearce @ 2007-09-07  5:01 UTC (permalink / raw)
  To: Dmitry V. Levin; +Cc: Git Mailing List, Junio C Hamano

"Dmitry V. Levin" <ldv@altlinux.org> wrote:
> > "Dmitry V. Levin" <ldv@altlinux.org> wrote:
> > > On GNU/Linux, libdir is used to mean "/usr/lib or /usr/lib64"
> > > depending on architecture.  Different libdir meaning breaks
> > > idiomatic expressions like rpm specfile "make libdir=%_libdir".
> 
> The idea is that git-gui's libdir is not a traditional arch-dependent
> libdir's subdirectory, but rather arch-independent datadir's subdirectory.
> That is, I see no reason to call it libdir even in standalone project.

Call it datadir then?  I see you point, and now agree with you.
Mind resending a patch to call it 'datadir'?
 
-- 
Shawn.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/3] git-gui/Makefile: Replace libdir with gitgui_libdir
  2007-09-07  5:01     ` Shawn O. Pearce
@ 2007-09-07 12:44       ` Dmitry V. Levin
  0 siblings, 0 replies; 5+ messages in thread
From: Dmitry V. Levin @ 2007-09-07 12:44 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: Git Mailing List, Junio C Hamano

[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]

On Fri, Sep 07, 2007 at 01:01:48AM -0400, Shawn O. Pearce wrote:
> "Dmitry V. Levin" <ldv@altlinux.org> wrote:
> > > "Dmitry V. Levin" <ldv@altlinux.org> wrote:
> > > > On GNU/Linux, libdir is used to mean "/usr/lib or /usr/lib64"
> > > > depending on architecture.  Different libdir meaning breaks
> > > > idiomatic expressions like rpm specfile "make libdir=%_libdir".
> > 
> > The idea is that git-gui's libdir is not a traditional arch-dependent
> > libdir's subdirectory, but rather arch-independent datadir's subdirectory.
> > That is, I see no reason to call it libdir even in standalone project.
> 
> Call it datadir then?  I see you point, and now agree with you.

I'm not sure that "datadir" is better choice than current "libdir".
First, from git-gui point of view, files placed in git-gui/lib/ are
rather library files than data files.
Second, if top-level makefile will define "datadir", original issue will
raise again.
That's why I suggested to add some git-gui specific component to git-gui's
libdir variable name.


-- 
ldv

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2007-09-07 12:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-05 23:21 [PATCH 1/3] git-gui/Makefile: Replace libdir with gitgui_libdir Dmitry V. Levin
2007-09-06  2:32 ` Shawn O. Pearce
2007-09-06 10:00   ` Dmitry V. Levin
2007-09-07  5:01     ` Shawn O. Pearce
2007-09-07 12:44       ` Dmitry V. Levin

Code repositories for project(s) associated with this inbox:

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).