{"thread":{"id":"40324","subject":"[PATCH] Makefile: use SHELL_PATH when running generate-cmdlist.sh","startedAt":"2015-09-10T23:37:07Z","lastAt":"2015-09-11T00:35:07Z","messageCount":2,"participants":["Alejandro R. Sedeño","Eric Sunshine"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"269750","messageId":"1441928227-830-1-git-send-email-asedeno@mit.edu","threadId":"40324","inReplyTo":null,"subject":"[PATCH] Makefile: use SHELL_PATH when running generate-cmdlist.sh","fromName":"Alejandro R. Sedeño","fromEmail":"asedeno@mit.edu","sentAt":"2015-09-10T23:37:07Z","receivedAt":"2015-09-10T23:37:07Z","isPatch":true,"sender":{"key":"asedeno@mit.edu","avatar":"https://avatars.githubusercontent.com/u/28302?v=4"},"body":"Some /bin/sh implementations can't deal with $() arithmetic and command\nsubstitution. If we already have a better shell on hand, we should use it.\n\nFixes the build on SunOS, probably others.\n\nSigned-off-by: Alejandro R. Sedeño <asedeno@mit.edu>\n---\n Makefile | 2 +-\n 1 file changed, 1 insertion(+), 1 deletion(-)\n\ndiff --git a/Makefile b/Makefile\nindex ce0cfe2..6301cc8 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -1699,7 +1699,7 @@ $(BUILT_INS): git$X\n common-cmds.h: generate-cmdlist.sh command-list.txt\n \n common-cmds.h: $(wildcard Documentation/git-*.txt)\n-\t$(QUIET_GEN)./generate-cmdlist.sh command-list.txt >$@+ && mv $@+ $@\n+\t$(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh command-list.txt >$@+ && mv $@+ $@\n \n SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\\\n \t$(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\\\n-- \n2.5.2\n"},{"id":"269751","messageId":"CAPig+cTQqVxo7qmFCu2h98+g2hrXogN785Wv1GRssHBtSm8VLA@mail.gmail.com","threadId":"40324","inReplyTo":"1441928227-830-1-git-send-email-asedeno@mit.edu","subject":"Re: [PATCH] Makefile: use SHELL_PATH when running generate-cmdlist.sh","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2015-09-11T00:35:07Z","receivedAt":"2015-09-11T00:35:07Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Sep 10, 2015 at 7:37 PM, Alejandro R. Sedeño <asedeno@mit.edu> wrote:\n> Some /bin/sh implementations can't deal with $() arithmetic and command\n> substitution. If we already have a better shell on hand, we should use it.\n>\n> Fixes the build on SunOS, probably others.\n\nMakes sense. 527ec39^:generate-cmdlist.sh didn't use either of these\nfeatures, whereas 82aec45:generate-cmdlist.sh does, and older\n(pre-POSIX) shells lacked these features. Thanks.\n\nI'd probably re-word the commit message slightly to mention $(())\narithmetic expansion, not $(), and to state specifically $(...)\ncommand substitution since saying only \"command substitution\" is\nambiguous considering that backtick `...` command substitution long\npredates POSIX. Perhaps like this:\n\n    Non-POSIX shells, such as /bin/sh on SunOS, do not support\n    $((...)) arithmetic expansion or $(...) command substitution\n    needed by generate-cmdlist.sh. Therefore, use the POSIX shell\n    $(SHELL_PATH) when running generate-cmdlist.sh.\n\nOther than that:\n\nAcked-by: Eric Sunshine <sunshine@sunshineco.com>\n\n> Signed-off-by: Alejandro R. Sedeño <asedeno@mit.edu>\n> ---\n> diff --git a/Makefile b/Makefile\n> index ce0cfe2..6301cc8 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -1699,7 +1699,7 @@ $(BUILT_INS): git$X\n>  common-cmds.h: generate-cmdlist.sh command-list.txt\n>\n>  common-cmds.h: $(wildcard Documentation/git-*.txt)\n> -       $(QUIET_GEN)./generate-cmdlist.sh command-list.txt >$@+ && mv $@+ $@\n> +       $(QUIET_GEN)$(SHELL_PATH) ./generate-cmdlist.sh command-list.txt >$@+ && mv $@+ $@\n>\n>  SCRIPT_DEFINES = $(SHELL_PATH_SQ):$(DIFF_SQ):$(GIT_VERSION):\\\n>         $(localedir_SQ):$(NO_CURL):$(USE_GETTEXT_SCHEME):$(SANE_TOOL_PATH_SQ):\\\n> --\n> 2.5.2\n"}]}