{"thread":{"id":"8379","subject":"[PATCH] Make the installation targets a little less chatty","startedAt":"2007-05-31T22:23:13Z","lastAt":"2007-06-03T11:43:31Z","messageCount":6,"participants":["Alex Riesen","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"43697","messageId":"20070531222313.GA12204@steel.home","threadId":"8379","inReplyTo":null,"subject":"[PATCH] Make the installation targets a little less chatty","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-05-31T22:23:13Z","receivedAt":"2007-05-31T22:23:13Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"by default. V=1 works as usual.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n\nNow it quite quiet. I tried top show every installed file, but it\nwasn't an improvement at all so I decided to just show what's being\ndone.\n\n Makefile           |   32 +++++++++++++++++++-------------\n templates/Makefile |    5 +++--\n 2 files changed, 22 insertions(+), 15 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex cac0a4a..fccc57b 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -660,6 +660,7 @@ ifeq ($(TCLTK_PATH),)\n NO_TCLTK=NoThanks\n endif\n \n+QUIET=\n QUIET_SUBDIR0  = +$(MAKE) -C # space to separate -C and subdir\n QUIET_SUBDIR1  =\n \n@@ -671,6 +672,8 @@ endif\n \n ifneq ($(findstring $(MAKEFLAGS),s),s)\n ifndef V\n+\tQUIET = @\n+\n \tQUIET_CC       = @echo '   ' CC $@;\n \tQUIET_AR       = @echo '   ' AR $@;\n \tQUIET_LINK     = @echo '   ' LINK $@;\n@@ -973,33 +976,36 @@ check: common-cmds.h\n ### Installation rules\n \n install: all\n-\t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'\n-\t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n-\t$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n-\t$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'\n-\t$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install\n-\t$(MAKE) -C perl prefix='$(prefix_SQ)' install\n+\t$(QUIET)$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'\n+\t$(QUIET)$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n+\t@echo installing programs\n+\t$(QUIET)$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n+\t$(QUIET)$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'\n+\t@echo setting up builtins\n+\t$(QUIET)$(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)\n+\t$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) DESTDIR='$(DESTDIR_SQ)' install\n+\t$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) prefix='$(prefix_SQ)' install\n ifndef NO_TCLTK\n-\t$(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk\n-\t$(MAKE) -C git-gui install\n+\t$(QUIET)$(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk\n+\t$(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) install\n endif\n-\tif test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \\\n+\t@if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \\\n \tthen \\\n \t\tln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \\\n \t\t\t'$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' || \\\n \t\tcp '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \\\n \t\t\t'$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'; \\\n \tfi\n-\t$(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)\n ifneq (,$X)\n-\t$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p';)\n+\t@echo cleaning '$(DESTDIR_SQ)$(gitexecdir_SQ)' of old scripts\n+\t$(QUIET)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p';)\n endif\n \n install-doc:\n-\t$(MAKE) -C Documentation install\n+\t$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) install\n \n quick-install-doc:\n-\t$(MAKE) -C Documentation quick-install\n+\t$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) quick-install\n \n \n \ndiff --git a/templates/Makefile b/templates/Makefile\nindex b8352e7..b9a39e2 100644\n--- a/templates/Makefile\n+++ b/templates/Makefile\n@@ -45,6 +45,7 @@ clean:\n \trm -rf blt boilerplates.made\n \n install: all\n-\t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(template_dir_SQ)'\n-\t(cd blt && $(TAR) cf - .) | \\\n+\t@echo installing templates\n+\t$(QUIET)$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(template_dir_SQ)'\n+\t$(QUIET)(cd blt && $(TAR) cf - .) | \\\n \t(cd '$(DESTDIR_SQ)$(template_dir_SQ)' && $(TAR) xf -)\n-- \n1.5.2.162.gbaa1f\n"},{"id":"43709","messageId":"7v4pls1qjv.fsf@assigned-by-dhcp.cox.net","threadId":"8379","inReplyTo":"20070531222313.GA12204@steel.home","subject":"Re: [PATCH] Make the installation targets a little less chatty","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-06-01T00:12:04Z","receivedAt":"2007-06-01T00:12:04Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alex Riesen <raa.lkml@gmail.com> writes:\n\n> by default. V=1 works as usual.\n>\n> Signed-off-by: Alex Riesen <raa.lkml@gmail.com>\n> ---\n>\n> Now it quite quiet. I tried top show every installed file, but it\n> wasn't an improvement at all so I decided to just show what's being\n> done.\n\nI agree that the long single line that installs the commands to $(bindir)\nmay be somewhat annoying.\n\nCleaning up compilation step is one thing; by tidying up the\noutput it makes compiler warnings stand out.\n\nBut I do not like playing games like this in general in\ninstallation rule.  An excerpt from your patch:\n\n> +\t@echo installing programs\n> +\t$(QUIET)$(foreach p,$(BUILT_INS), rm -f ...\n\nThis would not even let you see what got installed.  At least,\nless verbose compilation step we have these days lets you see\nwhat is being built.  I certainly would not object if the output\nwould look like this, though:\n\n\tCC builtin-cat-file.o\n        ...\n        GEN git-add--interactive\n        ...\n        LINK git-http-push\n        ...\n        BUILTIN git-add\n        ...\n\tMKDIR -p /usr/local/bin\n        INSTALL git-foo\n        INSTALL git-bar\n\t...\n        INSTALL templates/description\n        INSTALL templates/hooks/post-update\n        ...\n"},{"id":"43722","messageId":"81b0412b0706010035s5fc38dc6y6f985675cc3c069@mail.gmail.com","threadId":"8379","inReplyTo":"7v4pls1qjv.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Make the installation targets a little less chatty","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-06-01T07:35:34Z","receivedAt":"2007-06-01T07:35:34Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"On 6/1/07, Junio C Hamano <junkio@cox.net> wrote:\n> This would not even let you see what got installed.  At least,\n> less verbose compilation step we have these days lets you see\n> what is being built.  I certainly would not object if the output\n> would look like this, though:\n>\n>         MKDIR -p /usr/local/bin\n>         INSTALL git-foo\n>         INSTALL git-bar\n>         ...\n>         INSTALL templates/description\n>         INSTALL templates/hooks/post-update\n>         ...\n\nAs I said, it did _not_ look like an improvement (I actually\ndid that first). There is just too much information to be printed.\n\nI'll send that first patch, with every program on its own line.\n"},{"id":"43771","messageId":"20070601230924.GA6360@steel.home","threadId":"8379","inReplyTo":"81b0412b0706010035s5fc38dc6y6f985675cc3c069@mail.gmail.com","subject":"[PATCH] Make the installation targets a little less chatty","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-06-01T23:09:24Z","receivedAt":"2007-06-01T23:09:24Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"by default. V=1 works as usual.\n\nSigned-off-by: Alex Riesen <raa.lkml@gmail.com>\n---\n Makefile           |   35 ++++++++++++++++++++++-------------\n templates/Makefile |    5 +++--\n 2 files changed, 25 insertions(+), 15 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex cac0a4a..f2c9b39 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -660,8 +660,10 @@ ifeq ($(TCLTK_PATH),)\n NO_TCLTK=NoThanks\n endif\n \n+QUIET=\n QUIET_SUBDIR0  = +$(MAKE) -C # space to separate -C and subdir\n QUIET_SUBDIR1  =\n+QUIET_MSG      = :\n \n ifneq ($(findstring $(MAKEFLAGS),w),w)\n PRINT_DIR = --no-print-directory\n@@ -671,6 +673,9 @@ endif\n \n ifneq ($(findstring $(MAKEFLAGS),s),s)\n ifndef V\n+\tQUIET = @\n+\n+\tQUIET_MSG      = echo  '   '\n \tQUIET_CC       = @echo '   ' CC $@;\n \tQUIET_AR       = @echo '   ' AR $@;\n \tQUIET_LINK     = @echo '   ' LINK $@;\n@@ -973,33 +978,37 @@ check: common-cmds.h\n ### Installation rules\n \n install: all\n-\t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'\n-\t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n-\t$(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n-\t$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'\n-\t$(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install\n-\t$(MAKE) -C perl prefix='$(prefix_SQ)' install\n+\t$(QUIET)$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(bindir_SQ)'\n+\t$(QUIET)$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(gitexecdir_SQ)'\n+\t$(QUIET)$(foreach p,$(ALL_PROGRAMS),$(QUIET_MSG)INSTALL $p;\\\n+\t    $(INSTALL) '$p' '$(DESTDIR_SQ)$(gitexecdir_SQ)';)\n+\t$(QUIET)$(INSTALL) git$X '$(DESTDIR_SQ)$(bindir_SQ)'\n+\t$(QUIET)$(foreach p,$(BUILT_INS)   ,$(QUIET_MSG)SETUP BUILTIN $p;\\\n+\t    rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && \\\n+\t    ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p';)\n+\t$(QUIET_SUBDIR0)templates $(QUIET_SUBDIR1) DESTDIR='$(DESTDIR_SQ)' install\n+\t$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) prefix='$(prefix_SQ)' install\n ifndef NO_TCLTK\n-\t$(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk\n-\t$(MAKE) -C git-gui install\n+\t$(QUIET)$(INSTALL) gitk-wish '$(DESTDIR_SQ)$(bindir_SQ)'/gitk\n+\t$(QUIET_SUBDIR0)git-gui $(QUIET_SUBDIR1) install\n endif\n-\tif test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \\\n+\t@if test 'z$(bindir_SQ)' != 'z$(gitexecdir_SQ)'; \\\n \tthen \\\n \t\tln -f '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \\\n \t\t\t'$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' || \\\n \t\tcp '$(DESTDIR_SQ)$(bindir_SQ)/git$X' \\\n \t\t\t'$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X'; \\\n \tfi\n-\t$(foreach p,$(BUILT_INS), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' && ln '$(DESTDIR_SQ)$(gitexecdir_SQ)/git$X' '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p' ;)\n ifneq (,$X)\n-\t$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p';)\n+\t@echo cleaning '$(DESTDIR_SQ)$(gitexecdir_SQ)' of old scripts\n+\t$(QUIET)$(foreach p,$(patsubst %$X,%,$(filter %$X,$(ALL_PROGRAMS) $(BUILT_INS) git$X)), rm -f '$(DESTDIR_SQ)$(gitexecdir_SQ)/$p';)\n endif\n \n install-doc:\n-\t$(MAKE) -C Documentation install\n+\t$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) install\n \n quick-install-doc:\n-\t$(MAKE) -C Documentation quick-install\n+\t$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) quick-install\n \n \n \ndiff --git a/templates/Makefile b/templates/Makefile\nindex b8352e7..b9a39e2 100644\n--- a/templates/Makefile\n+++ b/templates/Makefile\n@@ -45,6 +45,7 @@ clean:\n \trm -rf blt boilerplates.made\n \n install: all\n-\t$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(template_dir_SQ)'\n-\t(cd blt && $(TAR) cf - .) | \\\n+\t@echo installing templates\n+\t$(QUIET)$(INSTALL) -d -m755 '$(DESTDIR_SQ)$(template_dir_SQ)'\n+\t$(QUIET)(cd blt && $(TAR) cf - .) | \\\n \t(cd '$(DESTDIR_SQ)$(template_dir_SQ)' && $(TAR) xf -)\n-- \n1.5.2.162.g8fc0\n"},{"id":"43826","messageId":"7vy7j2p1r5.fsf@assigned-by-dhcp.cox.net","threadId":"8379","inReplyTo":"20070601230924.GA6360@steel.home","subject":"Re: [PATCH] Make the installation targets a little less chatty","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2007-06-02T19:58:22Z","receivedAt":"2007-06-02T19:58:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Alex Riesen <raa.lkml@gmail.com> writes:\n\n> by default. V=1 works as usual.\n\nYou obviously did not test that X-<.  V=1 does not work at all\nfor me.  This is what I get.\n\n    ...\n    install git '/home/junio/git-test/bin'\n    :SETUP BUILTIN git-format-patch; rm -f '/home/junio/git-test/bin/git-format-patch' && ln '/home/junio/git-test/bin/git' '/home/junio/git-test/bin/git-format-patch'; ...\n    ...\n    /bin/sh: :SETUP: command not found\n    /bin/sh: :SETUP: command not found\n    /bin/sh: :SETUP: command not found\n    /bin/sh: :SETUP: command not found\n    ...\n\nTwo problems and a half.\n\n (0) You do not report the creation of target directory done\n     with \"install -d\", so without $V there is no way to tell if\n     things are installed in the expected location.\n\n (1) Obviously : and whatever action message needs to be\n     separated so that it becomes a no-op command ':' followed\n     by parameters;\n\n (2) Even with that \":SETUP: command not found\" fixed, it now\n     makes the command line twice as long as before for $V case,\n     which makes it harder to diagnose a problem when Makefile\n     goes wrong.\n\nI think the way QUIET_CC and friends are done is quite sensible\nand does not have this problem, especially (3).  With V=1 it\njust becomes transparent, and that is what we would want.\n"},{"id":"43855","messageId":"20070603114331.GA2495@steel.home","threadId":"8379","inReplyTo":"7vy7j2p1r5.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Make the installation targets a little less chatty","fromName":"Alex Riesen","fromEmail":"raa.lkml@gmail.com","sentAt":"2007-06-03T11:43:31Z","receivedAt":"2007-06-03T11:43:31Z","isPatch":true,"sender":{"key":"raa.lkml@gmail.com","avatar":"https://avatars.githubusercontent.com/u/324101?v=4"},"body":"Junio C Hamano, Sat, Jun 02, 2007 21:58:22 +0200:\n> I think the way QUIET_CC and friends are done is quite sensible\n\nI don't think it is possible to implement this way: QUIET_CC uses\ntarget-global $@, which the \"install\" target does not have.\n"}]}