{"thread":{"id":"64129","subject":"[PATCH] libsecret/Makefile: add install target","startedAt":"2025-09-11T20:38:08Z","lastAt":"2025-09-11T21:18:20Z","messageCount":2,"participants":["M Hickford via GitGitGadget","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"526145","messageId":"pull.1970.git.1757623086030.gitgitgadget@gmail.com","threadId":"64129","inReplyTo":null,"subject":"[PATCH] libsecret/Makefile: add install target","fromName":"M Hickford via GitGitGadget","fromEmail":"gitgitgadget@gmail.com","sentAt":"2025-09-11T20:38:06Z","receivedAt":"2025-09-11T20:38:08Z","isPatch":true,"sender":{"key":"mirth.hickford@gmail.com","avatar":"https://avatars.githubusercontent.com/u/105314?v=4"},"body":"From: M Hickford <mirth.hickford@gmail.com>\n\nSigned-off-by: M Hickford <mirth.hickford@gmail.com>\n---\n    libsecret/Makefile: add install target\n\nPublished-As: https://github.com/gitgitgadget/git/releases/tag/pr-1970%2Fhickford%2Flibsecret-makefile-v1\nFetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1970/hickford/libsecret-makefile-v1\nPull-Request: https://github.com/gitgitgadget/git/pull/1970\n\n contrib/credential/libsecret/Makefile | 4 ++++\n 1 file changed, 4 insertions(+)\n\ndiff --git a/contrib/credential/libsecret/Makefile b/contrib/credential/libsecret/Makefile\nindex 97ce9c92fb..6fe70065ab 100644\n--- a/contrib/credential/libsecret/Makefile\n+++ b/contrib/credential/libsecret/Makefile\n@@ -26,3 +26,7 @@ $(MAIN): $(OBJS)\n \n clean:\n \t@$(RM) $(MAIN) $(OBJS)\n+\n+install: $(MAIN)\n+\t$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)\n+\t$(INSTALL) -m 755 $(MAIN) $(DESTDIR)$(gitexecdir)\n\nbase-commit: 4975ec3473b4bc61bc8a3df1ef29d0b7e7959e87\n-- \ngitgitgadget\n"},{"id":"526148","messageId":"xmqqsegsofhi.fsf@gitster.g","threadId":"64129","inReplyTo":"pull.1970.git.1757623086030.gitgitgadget@gmail.com","subject":"Re: [PATCH] libsecret/Makefile: add install target","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2025-09-11T21:18:17Z","receivedAt":"2025-09-11T21:18:20Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"M Hickford via GitGitGadget\" <gitgitgadget@gmail.com> writes:\n\n> From: M Hickford <mirth.hickford@gmail.com>\n>\n> Signed-off-by: M Hickford <mirth.hickford@gmail.com>\n> ---\n>     libsecret/Makefile: add install target\n>\n> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1970%2Fhickford%2Flibsecret-makefile-v1\n> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1970/hickford/libsecret-makefile-v1\n> Pull-Request: https://github.com/gitgitgadget/git/pull/1970\n>\n>  contrib/credential/libsecret/Makefile | 4 ++++\n>  1 file changed, 4 insertions(+)\n>\n> diff --git a/contrib/credential/libsecret/Makefile b/contrib/credential/libsecret/Makefile\n> index 97ce9c92fb..6fe70065ab 100644\n> --- a/contrib/credential/libsecret/Makefile\n> +++ b/contrib/credential/libsecret/Makefile\n> @@ -26,3 +26,7 @@ $(MAIN): $(OBJS)\n>  \n>  clean:\n>  \t@$(RM) $(MAIN) $(OBJS)\n> +\n> +install: $(MAIN)\n> +\t$(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)\n> +\t$(INSTALL) -m 755 $(MAIN) $(DESTDIR)$(gitexecdir)\n>\n> base-commit: 4975ec3473b4bc61bc8a3df1ef29d0b7e7959e87\n\nHmph, the existing make macros used in the Makefile like $(RM),\n$(CC), etc. are all defined in the same Makefile, and the only\nthings this Makefile includes are config.mak and its autogen variant\nif they exist, neither of which are the source of INSTALL or\ngitexecdir that are used in the main Makefile by being defined\nthere.\n\nIt seems that existing Makefiles in contrib/ like the one in subtree\nand contacts, all define their own.  Perhaps you can mimick them by\nadding things like\n\n    prefix ?= /usr/local\n    gitexecdir ?= $(prefix)/libexec/git-core\n\n    # this should be set to a 'standard' bsd-type install program\n    INSTALL  ?= install\n\nthat they commonly add for now to make it work?  Without anything\nlike that, I cannot quite see how it would work with your patch\nalone.\n\nAnd then later we of course should clean things up by splitting the\ndefinitions done in the main Makefile into a common file that can be\nincluded (e.g. path+tool+definitions.mak file), include it from the\nmain Makefile, and then have contrib/*/Makefile also include it so\nthat the duplicated definitions like we see in Makefiles in subtree\nand contacts (there may be others; they just were the first hits in\nmy \"git ls-files | grep /Makefile\").\n\n"}]}