{"thread":{"id":"33926","subject":"[PATCH 0/6] build: cleanups","startedAt":"2013-05-25T02:41:00Z","lastAt":"2013-05-26T21:50:39Z","messageCount":8,"participants":["Felipe Contreras","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":6},"messages":[{"id":"218483","messageId":"1369449666-18879-1-git-send-email-felipe.contreras@gmail.com","threadId":"33926","inReplyTo":null,"subject":"[PATCH 0/6] build: cleanups","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-25T02:41:00Z","receivedAt":"2013-05-25T02:41:00Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Hi,\n\nHere's a bunch of cleanups, after which it's trivial to avoid the installation\nof test scripts, namely git-remote-testpy.\n\nFelipe Contreras (6):\n  build: trivial simplification\n  build: cleanup using $^\n  build: cleanup using $<\n  build: be clearer about order-only prerequisites\n  build: add NO_INSTALL variable\n  build: do not install git-remote-testpy\n\n Makefile | 48 +++++++++++++++++++++++++++---------------------\n 1 file changed, 27 insertions(+), 21 deletions(-)\n\n-- \n1.8.3.rc3.312.g47657de\n"},{"id":"218484","messageId":"1369449666-18879-2-git-send-email-felipe.contreras@gmail.com","threadId":"33926","inReplyTo":"1369449666-18879-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 1/6] build: trivial simplification","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-25T02:41:01Z","receivedAt":"2013-05-25T02:41:01Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"SCRIPT_PYTHON_GEN is '$(patsubst %.py,%,$(SCRIPT_PYTHON))', so replace\n'$(patsubst %.py,%,$(SCRIPT_PYTHON))' with it\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n Makefile | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 985598b..2704df4 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1822,8 +1822,8 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)) git-instaweb: % : unimplemented.sh\n endif # NO_PERL\n \n ifndef NO_PYTHON\n-$(patsubst %.py,%,$(SCRIPT_PYTHON)): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS\n-$(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py\n+$(SCRIPT_PYTHON_GEN): GIT-CFLAGS GIT-PREFIX GIT-PYTHON-VARS\n+$(SCRIPT_PYTHON_GEN): % : %.py\n \t$(QUIET_GEN)$(RM) $@ $@+ && \\\n \tINSTLIBDIR=`MAKEFLAGS= $(MAKE) -C git_remote_helpers -s \\\n \t\t--no-print-directory prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' \\\n@@ -1835,7 +1835,7 @@ $(patsubst %.py,%,$(SCRIPT_PYTHON)): % : %.py\n \tchmod +x $@+ && \\\n \tmv $@+ $@\n else # NO_PYTHON\n-$(patsubst %.py,%,$(SCRIPT_PYTHON)): % : unimplemented.sh\n+$(SCRIPT_PYTHON_GEN): % : unimplemented.sh\n \t$(QUIET_GEN)$(RM) $@ $@+ && \\\n \tsed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \\\n \t    -e 's|@@REASON@@|NO_PYTHON=$(NO_PYTHON)|g' \\\n-- \n1.8.3.rc3.312.g47657de\n"},{"id":"218485","messageId":"1369449666-18879-3-git-send-email-felipe.contreras@gmail.com","threadId":"33926","inReplyTo":"1369449666-18879-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 2/6] build: cleanup using $^","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-25T02:41:02Z","receivedAt":"2013-05-25T02:41:02Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"There's no need to list again the prerequisites. No functional changes.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n Makefile | 8 ++++----\n 1 file changed, 4 insertions(+), 4 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 2704df4..1ac52dd 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -510,11 +510,11 @@ build-python-script: $(SCRIPT_PYTHON_GEN)\n \n .PHONY: install-perl-script install-sh-script install-python-script\n install-sh-script: $(SCRIPT_SH_GEN)\n-\t$(INSTALL) $(SCRIPT_SH_GEN) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n+\t$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n install-perl-script: $(SCRIPT_PERL_GEN)\n-\t$(INSTALL) $(SCRIPT_PERL_GEN) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n+\t$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n install-python-script: $(SCRIPT_PYTHON_GEN)\n-\t$(INSTALL) $(SCRIPT_PYTHON_GEN) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n+\t$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \n .PHONY: clean-perl-script clean-sh-script clean-python-script\n clean-sh-script:\n@@ -1671,7 +1671,7 @@ please_set_SHELL_PATH_to_a_more_modern_shell:\n shell_compatibility_test: please_set_SHELL_PATH_to_a_more_modern_shell\n \n strip: $(PROGRAMS) git$X\n-\t$(STRIP) $(STRIP_OPTS) $(PROGRAMS) git$X\n+\t$(STRIP) $(STRIP_OPTS) $^\n \n ### Target-specific flags and dependencies\n \n-- \n1.8.3.rc3.312.g47657de\n"},{"id":"218486","messageId":"1369449666-18879-4-git-send-email-felipe.contreras@gmail.com","threadId":"33926","inReplyTo":"1369449666-18879-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 3/6] build: cleanup using $<","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-25T02:41:03Z","receivedAt":"2013-05-25T02:41:03Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"No need to list the first prerequisite. No functional changes.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n Makefile | 10 +++++-----\n 1 file changed, 5 insertions(+), 5 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 1ac52dd..28b6117 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1731,9 +1731,9 @@ version.sp version.s version.o: EXTRA_CPPFLAGS = \\\n \n $(BUILT_INS): git$X\n \t$(QUIET_BUILT_IN)$(RM) $@ && \\\n-\tln git$X $@ 2>/dev/null || \\\n-\tln -s git$X $@ 2>/dev/null || \\\n-\tcp git$X $@\n+\tln $< $@ 2>/dev/null || \\\n+\tln -s $< $@ 2>/dev/null || \\\n+\tcp $< $@\n \n common-cmds.h: ./generate-cmdlist.sh command-list.txt\n \n@@ -1798,7 +1798,7 @@ $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl GIT-VERSION-FILE\n \t    -e '\tx' \\\n \t    -e '}' \\\n \t    -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \\\n-\t    $@.perl >$@+ && \\\n+\t    $< >$@+ && \\\n \tchmod +x $@+ && \\\n \tmv $@+ $@\n \n@@ -1831,7 +1831,7 @@ $(SCRIPT_PYTHON_GEN): % : %.py\n \tsed -e '1s|#!.*python|#!$(PYTHON_PATH_SQ)|' \\\n \t    -e 's|\\(os\\.getenv(\"GITPYTHONLIB\"\\)[^)]*)|\\1,\"@@INSTLIBDIR@@\")|' \\\n \t    -e 's|@@INSTLIBDIR@@|'\"$$INSTLIBDIR\"'|g' \\\n-\t    $@.py >$@+ && \\\n+\t    $< >$@+ && \\\n \tchmod +x $@+ && \\\n \tmv $@+ $@\n else # NO_PYTHON\n-- \n1.8.3.rc3.312.g47657de\n"},{"id":"218487","messageId":"1369449666-18879-5-git-send-email-felipe.contreras@gmail.com","threadId":"33926","inReplyTo":"1369449666-18879-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 4/6] build: be clearer about order-only prerequisites","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-25T02:41:04Z","receivedAt":"2013-05-25T02:41:04Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n Makefile | 6 +++---\n 1 file changed, 3 insertions(+), 3 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 28b6117..97ff848 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1787,7 +1787,7 @@ perl/PM.stamp: FORCE\n perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL\n \t$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)\n \n-$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl GIT-VERSION-FILE\n+$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl | GIT-VERSION-FILE\n \t$(QUIET_GEN)$(RM) $@ $@+ && \\\n \tINSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \\\n \tsed -e '1{' \\\n@@ -1850,7 +1850,7 @@ CONFIGURE_RECIPE = $(RM) configure configure.ac+ && \\\n \t\t   autoconf -o configure configure.ac+ && \\\n \t\t   $(RM) configure.ac+\n \n-configure: configure.ac GIT-VERSION-FILE\n+configure: configure.ac | GIT-VERSION-FILE\n \t$(QUIET_GEN)$(CONFIGURE_RECIPE)\n \n ifdef AUTOCONFIGURED\n@@ -2415,7 +2415,7 @@ quick-install-html:\n \n ### Maintainer's dist rules\n \n-git.spec: git.spec.in GIT-VERSION-FILE\n+git.spec: git.spec.in | GIT-VERSION-FILE\n \tsed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@+\n \tmv $@+ $@\n \n-- \n1.8.3.rc3.312.g47657de\n"},{"id":"218489","messageId":"1369449666-18879-6-git-send-email-felipe.contreras@gmail.com","threadId":"33926","inReplyTo":"1369449666-18879-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 5/6] build: add NO_INSTALL variable","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-25T02:41:05Z","receivedAt":"2013-05-25T02:41:05Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"So that we can specify which scripts we do not want to install (they are\nfor testing).\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n Makefile | 16 ++++++++++------\n 1 file changed, 10 insertions(+), 6 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 97ff848..333b5d3 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -500,6 +500,10 @@ SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))\n SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))\n SCRIPT_PYTHON_GEN = $(patsubst %.py,%,$(SCRIPT_PYTHON))\n \n+SCRIPT_SH_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_SH_GEN))\n+SCRIPT_PERL_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PERL_GEN))\n+SCRIPT_PYTHON_INS = $(filter-out $(NO_INSTALL),$(SCRIPT_PYTHON_GEN))\n+\n # Individual rules to allow e.g.\n # \"make -C ../.. SCRIPT_PERL=contrib/foo/bar.perl build-perl-script\"\n # from subdirectories like contrib/*/\n@@ -509,11 +513,11 @@ build-sh-script: $(SCRIPT_SH_GEN)\n build-python-script: $(SCRIPT_PYTHON_GEN)\n \n .PHONY: install-perl-script install-sh-script install-python-script\n-install-sh-script: $(SCRIPT_SH_GEN)\n+install-sh-script: $(SCRIPT_SH_INS)\n \t$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n-install-perl-script: $(SCRIPT_PERL_GEN)\n+install-perl-script: $(SCRIPT_PERL_INS)\n \t$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n-install-python-script: $(SCRIPT_PYTHON_GEN)\n+install-python-script: $(SCRIPT_PYTHON_INS)\n \t$(INSTALL) $^ '$(DESTDIR_SQ)$(gitexec_instdir_SQ)'\n \n .PHONY: clean-perl-script clean-sh-script clean-python-script\n@@ -524,9 +528,9 @@ clean-perl-script:\n clean-python-script:\n \t$(RM) $(SCRIPT_PYTHON_GEN)\n \n-SCRIPTS = $(SCRIPT_SH_GEN) \\\n-\t  $(SCRIPT_PERL_GEN) \\\n-\t  $(SCRIPT_PYTHON_GEN) \\\n+SCRIPTS = $(SCRIPT_SH_INS) \\\n+\t  $(SCRIPT_PERL_INS) \\\n+\t  $(SCRIPT_PYTHON_INS) \\\n \t  git-instaweb\n \n ETAGS_TARGET = TAGS\n-- \n1.8.3.rc3.312.g47657de\n"},{"id":"218488","messageId":"1369449666-18879-7-git-send-email-felipe.contreras@gmail.com","threadId":"33926","inReplyTo":"1369449666-18879-1-git-send-email-felipe.contreras@gmail.com","subject":"[PATCH 6/6] build: do not install git-remote-testpy","fromName":"Felipe Contreras","fromEmail":"felipe.contreras@gmail.com","sentAt":"2013-05-25T02:41:06Z","receivedAt":"2013-05-25T02:41:06Z","isPatch":true,"sender":{"key":"felipe.contreras@gmail.com","avatar":"https://avatars.githubusercontent.com/u/8358?v=4"},"body":"It's only meant for testing.\n\nSigned-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n---\n Makefile | 2 ++\n 1 file changed, 2 insertions(+)\n\ndiff --git a/Makefile b/Makefile\nindex 333b5d3..ad70d45 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -495,6 +495,8 @@ SCRIPT_PERL += git-svn.perl\n SCRIPT_PYTHON += git-remote-testpy.py\n SCRIPT_PYTHON += git-p4.py\n \n+NO_INSTALL += git-remote-testpy\n+\n # Generated files for scripts\n SCRIPT_SH_GEN = $(patsubst %.sh,%,$(SCRIPT_SH))\n SCRIPT_PERL_GEN = $(patsubst %.perl,%,$(SCRIPT_PERL))\n-- \n1.8.3.rc3.312.g47657de\n"},{"id":"218586","messageId":"7v1u8t76mo.fsf@alter.siamese.dyndns.org","threadId":"33926","inReplyTo":"1369449666-18879-5-git-send-email-felipe.contreras@gmail.com","subject":"Re: [PATCH 4/6] build: be clearer about order-only prerequisites","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-05-26T21:50:39Z","receivedAt":"2013-05-26T21:50:39Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Felipe Contreras <felipe.contreras@gmail.com> writes:\n\n> Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>\n> ---\n\nThis patch is wrong, I think.\n\nThe canonical example of order-only is something like\n\n  http://www.kolpackov.net/pipermail/notes/2004-January/000001.html\n\nwhere you want to make sure an output directory already exists, but\nyou do not want to list that as prerequiste _input_ to produce\noutput from the source.  G-V-F has real information that is used to\naffect the output, which is quite a different animal.\n\nTry applying this 6-patch series, \"make clean; make git.spec\", and\nthen \"git checkout HEAD~2\" to come back to the commit for this\npatch.  And then try running \"make git.spec\".  I think Version line\nwill not change and still claim you are building a version with the\n6-patch series fully applied.\n\nAfter a quick scan of the other 5 patches in the series, they looked\nall sensible, and I do not think any of them depends on the change\nin this patch, so I think we can safely drop this one.\n\nAdministrivia: as I said in the whats cooking message, I'll be\ntaking things slow til the beginning of next month, so if your (not\nlimited to Felipe) messages are not answered by me, it merely means\nthey were not yet read by me (as opposed to dismissed as not worth\nreading without responding).\n\n>  Makefile | 6 +++---\n>  1 file changed, 3 insertions(+), 3 deletions(-)\n>\n> diff --git a/Makefile b/Makefile\n> index 28b6117..97ff848 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -1787,7 +1787,7 @@ perl/PM.stamp: FORCE\n>  perl/perl.mak: GIT-CFLAGS GIT-PREFIX perl/Makefile perl/Makefile.PL\n>  \t$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)\n>  \n> -$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl GIT-VERSION-FILE\n> +$(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl | GIT-VERSION-FILE\n>  \t$(QUIET_GEN)$(RM) $@ $@+ && \\\n>  \tINSTLIBDIR=`MAKEFLAGS= $(MAKE) -C perl -s --no-print-directory instlibdir` && \\\n>  \tsed -e '1{' \\\n> @@ -1850,7 +1850,7 @@ CONFIGURE_RECIPE = $(RM) configure configure.ac+ && \\\n>  \t\t   autoconf -o configure configure.ac+ && \\\n>  \t\t   $(RM) configure.ac+\n>  \n> -configure: configure.ac GIT-VERSION-FILE\n> +configure: configure.ac | GIT-VERSION-FILE\n>  \t$(QUIET_GEN)$(CONFIGURE_RECIPE)\n>  \n>  ifdef AUTOCONFIGURED\n> @@ -2415,7 +2415,7 @@ quick-install-html:\n>  \n>  ### Maintainer's dist rules\n>  \n> -git.spec: git.spec.in GIT-VERSION-FILE\n> +git.spec: git.spec.in | GIT-VERSION-FILE\n>  \tsed -e 's/@@VERSION@@/$(GIT_VERSION)/g' < $< > $@+\n>  \tmv $@+ $@\n"}]}