{"thread":{"id":"9791","subject":"[PATCH 1/3] git-gui/Makefile: Replace libdir with gitgui_libdir","startedAt":"2007-09-05T23:21:53Z","lastAt":"2007-09-07T12:44:54Z","messageCount":5,"participants":["Dmitry V. Levin","Shawn O. Pearce"],"isPatch":true,"patchVersion":1,"patchTotal":3},"messages":[{"id":"52649","messageId":"20070905232153.GA331@nomad.office.altlinux.org","threadId":"9791","inReplyTo":null,"subject":"[PATCH 1/3] git-gui/Makefile: Replace libdir with gitgui_libdir","fromName":"Dmitry V. Levin","fromEmail":"ldv@altlinux.org","sentAt":"2007-09-05T23:21:53Z","receivedAt":"2007-09-05T23:21:53Z","isPatch":true,"sender":{"key":"ldv@altlinux.org","avatar":"https://avatars.githubusercontent.com/u/5281408?v=4"},"body":"On GNU/Linux, libdir is used to mean \"/usr/lib or /usr/lib64\"\ndepending on architecture.  Different libdir meaning breaks\nidiomatic expressions like rpm specfile \"make libdir=%_libdir\".\n\nSigned-off-by: Dmitry V. Levin <ldv@altlinux.org>\n---\n git-gui/Makefile |   16 ++++++++--------\n 1 files changed, 8 insertions(+), 8 deletions(-)\n\ndiff --git a/git-gui/Makefile b/git-gui/Makefile\nindex 1bac6fe..f143b2c 100644\n--- a/git-gui/Makefile\n+++ b/git-gui/Makefile\n@@ -76,8 +76,8 @@ SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n TCL_PATH_SQ = $(subst ','\\'',$(TCL_PATH))\n TCLTK_PATH_SQ = $(subst ','\\'',$(TCLTK_PATH))\n \n-libdir   ?= $(sharedir)/git-gui/lib\n-libdir_SQ = $(subst ','\\'',$(libdir))\n+gitgui_libdir   ?= $(sharedir)/git-gui/lib\n+gitgui_libdir_SQ = $(subst ','\\'',$(gitgui_libdir))\n \n exedir    = $(dir $(gitexecdir))share/git-gui/lib\n exedir_SQ = $(subst ','\\'',$(exedir))\n@@ -85,7 +85,7 @@ exedir_SQ = $(subst ','\\'',$(exedir))\n $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \t$(QUIET_GEN)rm -f $@ $@+ && \\\n \tGITGUI_RELATIVE= && \\\n-\tif test '$(exedir_SQ)' = '$(libdir_SQ)'; then \\\n+\tif test '$(exedir_SQ)' = '$(gitgui_libdir_SQ)'; then \\\n \t\tif test \"$(uname_O)\" = Cygwin; \\\n \t\tthen GITGUI_RELATIVE= ; \\\n \t\telse GITGUI_RELATIVE=1; \\\n@@ -95,7 +95,7 @@ $(patsubst %.sh,%,$(SCRIPT_SH)) : % : %.sh\n \t\t-e 's|^ exec wish \"$$0\"| exec $(subst |,'\\|',$(TCLTK_PATH_SQ)) \"$$0\"|' \\\n \t\t-e 's/@@GITGUI_VERSION@@/$(GITGUI_VERSION)/g' \\\n \t\t-e 's|@@GITGUI_RELATIVE@@|'$$GITGUI_RELATIVE'|' \\\n-\t\t-e $$GITGUI_RELATIVE's|@@GITGUI_LIBDIR@@|$(libdir_SQ)|' \\\n+\t\t-e $$GITGUI_RELATIVE's|@@GITGUI_LIBDIR@@|$(gitgui_libdir_SQ)|' \\\n \t\t$@.sh >$@+ && \\\n \tchmod +x $@+ && \\\n \tmv $@+ $@\n@@ -126,7 +126,7 @@ TRACK_VARS = \\\n \t$(subst ','\\'',TCL_PATH='$(TCL_PATH_SQ)') \\\n \t$(subst ','\\'',TCLTK_PATH='$(TCLTK_PATH_SQ)') \\\n \t$(subst ','\\'',gitexecdir='$(gitexecdir_SQ)') \\\n-\t$(subst ','\\'',libdir='$(libdir_SQ)') \\\n+\t$(subst ','\\'',gitgui_libdir='$(gitgui_libdir_SQ)') \\\n #end TRACK_VARS\n \n GIT-GUI-VARS: .FORCE-GIT-GUI-VARS\n@@ -142,9 +142,9 @@ install: all\n \t$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(gitexecdir_SQ)' $(INSTALL_D1)\n \t$(QUIET)$(INSTALL_X0)git-gui $(INSTALL_X1) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n \t$(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\n-\t$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(libdir_SQ)' $(INSTALL_D1)\n-\t$(QUIET)$(INSTALL_R0)lib/tclIndex $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)'\n-\t$(QUIET)$(foreach p,$(ALL_LIBFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(libdir_SQ)' &&) true\n+\t$(QUIET)$(INSTALL_D0)'$(DESTDIR_SQ)$(gitgui_libdir_SQ)' $(INSTALL_D1)\n+\t$(QUIET)$(INSTALL_R0)lib/tclIndex $(INSTALL_R1) '$(DESTDIR_SQ)$(gitgui_libdir_SQ)'\n+\t$(QUIET)$(foreach p,$(ALL_LIBFILES), $(INSTALL_R0)$p $(INSTALL_R1) '$(DESTDIR_SQ)$(gitgui_libdir_SQ)' &&) true\n \n dist-version:\n \t@mkdir -p $(TARDIR)\n-- \nldv\n"},{"id":"52673","messageId":"20070906023227.GH18160@spearce.org","threadId":"9791","inReplyTo":"20070905232153.GA331@nomad.office.altlinux.org","subject":"Re: [PATCH 1/3] git-gui/Makefile: Replace libdir with gitgui_libdir","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-09-06T02:32:27Z","receivedAt":"2007-09-06T02:32:27Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Dmitry V. Levin\" <ldv@altlinux.org> wrote:\n> On GNU/Linux, libdir is used to mean \"/usr/lib or /usr/lib64\"\n> depending on architecture.  Different libdir meaning breaks\n> idiomatic expressions like rpm specfile \"make libdir=%_libdir\".\n> \n> Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>\n> ---\n>  git-gui/Makefile |   16 ++++++++--------\n>  1 files changed, 8 insertions(+), 8 deletions(-)\n\nAlthough I could apply this with `am -3` I'm NACK'ing this right\nnow because...\n \n> diff --git a/git-gui/Makefile b/git-gui/Makefile\n> index 1bac6fe..f143b2c 100644\n> --- a/git-gui/Makefile\n> +++ b/git-gui/Makefile\n> @@ -76,8 +76,8 @@ SHELL_PATH_SQ = $(subst ','\\'',$(SHELL_PATH))\n>  TCL_PATH_SQ = $(subst ','\\'',$(TCL_PATH))\n>  TCLTK_PATH_SQ = $(subst ','\\'',$(TCLTK_PATH))\n>  \n> -libdir   ?= $(sharedir)/git-gui/lib\n> -libdir_SQ = $(subst ','\\'',$(libdir))\n> +gitgui_libdir   ?= $(sharedir)/git-gui/lib\n> +gitgui_libdir_SQ = $(subst ','\\'',$(gitgui_libdir))\n\ngit-gui is its own project with its own Makefile.  Junio includes\nit in git.git to help widen its audience, and because it is quite\nportable and easy for him to include.   In the future git-gui will\nbecome a proper subproject of git.git.\n\nIf you want to define libdir in git's toplevel Makefile *and*\nthat definition is being exported down into git-gui's Makefile\nthen I think git's toplevel Makefile should arrange for it to\nnot export libdir down into git-gui.\n\nOf course one has to wonder if that is even possible in GNU make.\nI'm not a GNU make expert so I don't really know.\n\n-- \nShawn.\n"},{"id":"52725","messageId":"20070906100012.GC6665@basalt.office.altlinux.org","threadId":"9791","inReplyTo":"20070906023227.GH18160@spearce.org","subject":"Re: [PATCH 1/3] git-gui/Makefile: Replace libdir with gitgui_libdir","fromName":"Dmitry V. Levin","fromEmail":"ldv@altlinux.org","sentAt":"2007-09-06T10:00:12Z","receivedAt":"2007-09-06T10:00:12Z","isPatch":true,"sender":{"key":"ldv@altlinux.org","avatar":"https://avatars.githubusercontent.com/u/5281408?v=4"},"body":"On Wed, Sep 05, 2007 at 10:32:27PM -0400, Shawn O. Pearce wrote:\n> \"Dmitry V. Levin\" <ldv@altlinux.org> wrote:\n> > On GNU/Linux, libdir is used to mean \"/usr/lib or /usr/lib64\"\n> > depending on architecture.  Different libdir meaning breaks\n> > idiomatic expressions like rpm specfile \"make libdir=%_libdir\".\n> > \n> > Signed-off-by: Dmitry V. Levin <ldv@altlinux.org>\n> > ---\n> >  git-gui/Makefile |   16 ++++++++--------\n> >  1 files changed, 8 insertions(+), 8 deletions(-)\n> \n> Although I could apply this with `am -3` I'm NACK'ing this right\n> now because...\n[...]\n> git-gui is its own project with its own Makefile.  Junio includes\n> it in git.git to help widen its audience, and because it is quite\n> portable and easy for him to include.   In the future git-gui will\n> become a proper subproject of git.git.\n\nThe idea is that git-gui's libdir is not a traditional arch-dependent\nlibdir's subdirectory, but rather arch-independent datadir's subdirectory.\nThat is, I see no reason to call it libdir even in standalone project.\n\n> If you want to define libdir in git's toplevel Makefile *and*\n> that definition is being exported down into git-gui's Makefile\n\nYes, that was my first motivation, but the issue appears to be a bit more\ncomplex.\n\n\n-- \nldv\n"},{"id":"52849","messageId":"20070907050148.GA18160@spearce.org","threadId":"9791","inReplyTo":"20070906100012.GC6665@basalt.office.altlinux.org","subject":"Re: [PATCH 1/3] git-gui/Makefile: Replace libdir with gitgui_libdir","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2007-09-07T05:01:48Z","receivedAt":"2007-09-07T05:01:48Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"\"Dmitry V. Levin\" <ldv@altlinux.org> wrote:\n> > \"Dmitry V. Levin\" <ldv@altlinux.org> wrote:\n> > > On GNU/Linux, libdir is used to mean \"/usr/lib or /usr/lib64\"\n> > > depending on architecture.  Different libdir meaning breaks\n> > > idiomatic expressions like rpm specfile \"make libdir=%_libdir\".\n> \n> The idea is that git-gui's libdir is not a traditional arch-dependent\n> libdir's subdirectory, but rather arch-independent datadir's subdirectory.\n> That is, I see no reason to call it libdir even in standalone project.\n\nCall it datadir then?  I see you point, and now agree with you.\nMind resending a patch to call it 'datadir'?\n \n-- \nShawn.\n"},{"id":"52907","messageId":"20070907124454.GD31861@basalt.office.altlinux.org","threadId":"9791","inReplyTo":"20070907050148.GA18160@spearce.org","subject":"Re: [PATCH 1/3] git-gui/Makefile: Replace libdir with gitgui_libdir","fromName":"Dmitry V. Levin","fromEmail":"ldv@altlinux.org","sentAt":"2007-09-07T12:44:54Z","receivedAt":"2007-09-07T12:44:54Z","isPatch":true,"sender":{"key":"ldv@altlinux.org","avatar":"https://avatars.githubusercontent.com/u/5281408?v=4"},"body":"On Fri, Sep 07, 2007 at 01:01:48AM -0400, Shawn O. Pearce wrote:\n> \"Dmitry V. Levin\" <ldv@altlinux.org> wrote:\n> > > \"Dmitry V. Levin\" <ldv@altlinux.org> wrote:\n> > > > On GNU/Linux, libdir is used to mean \"/usr/lib or /usr/lib64\"\n> > > > depending on architecture.  Different libdir meaning breaks\n> > > > idiomatic expressions like rpm specfile \"make libdir=%_libdir\".\n> > \n> > The idea is that git-gui's libdir is not a traditional arch-dependent\n> > libdir's subdirectory, but rather arch-independent datadir's subdirectory.\n> > That is, I see no reason to call it libdir even in standalone project.\n> \n> Call it datadir then?  I see you point, and now agree with you.\n\nI'm not sure that \"datadir\" is better choice than current \"libdir\".\nFirst, from git-gui point of view, files placed in git-gui/lib/ are\nrather library files than data files.\nSecond, if top-level makefile will define \"datadir\", original issue will\nraise again.\nThat's why I suggested to add some git-gui specific component to git-gui's\nlibdir variable name.\n\n\n-- \nldv\n"}]}