From: Junio C Hamano <gitster@pobox.com>
To: "M Hickford via GitGitGadget" <gitgitgadget@gmail.com>
Cc: git@vger.kernel.org, M Hickford <mirth.hickford@gmail.com>
Subject: Re: [PATCH] libsecret/Makefile: add install target
Date: Thu, 11 Sep 2025 14:18:17 -0700 [thread overview]
Message-ID: <xmqqsegsofhi.fsf@gitster.g> (raw)
In-Reply-To: <pull.1970.git.1757623086030.gitgitgadget@gmail.com> (M. Hickford via GitGitGadget's message of "Thu, 11 Sep 2025 20:38:06 +0000")
"M Hickford via GitGitGadget" <gitgitgadget@gmail.com> writes:
> From: M Hickford <mirth.hickford@gmail.com>
>
> Signed-off-by: M Hickford <mirth.hickford@gmail.com>
> ---
> libsecret/Makefile: add install target
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-1970%2Fhickford%2Flibsecret-makefile-v1
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-1970/hickford/libsecret-makefile-v1
> Pull-Request: https://github.com/gitgitgadget/git/pull/1970
>
> contrib/credential/libsecret/Makefile | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/contrib/credential/libsecret/Makefile b/contrib/credential/libsecret/Makefile
> index 97ce9c92fb..6fe70065ab 100644
> --- a/contrib/credential/libsecret/Makefile
> +++ b/contrib/credential/libsecret/Makefile
> @@ -26,3 +26,7 @@ $(MAIN): $(OBJS)
>
> clean:
> @$(RM) $(MAIN) $(OBJS)
> +
> +install: $(MAIN)
> + $(INSTALL) -d -m 755 $(DESTDIR)$(gitexecdir)
> + $(INSTALL) -m 755 $(MAIN) $(DESTDIR)$(gitexecdir)
>
> base-commit: 4975ec3473b4bc61bc8a3df1ef29d0b7e7959e87
Hmph, the existing make macros used in the Makefile like $(RM),
$(CC), etc. are all defined in the same Makefile, and the only
things this Makefile includes are config.mak and its autogen variant
if they exist, neither of which are the source of INSTALL or
gitexecdir that are used in the main Makefile by being defined
there.
It seems that existing Makefiles in contrib/ like the one in subtree
and contacts, all define their own. Perhaps you can mimick them by
adding things like
prefix ?= /usr/local
gitexecdir ?= $(prefix)/libexec/git-core
# this should be set to a 'standard' bsd-type install program
INSTALL ?= install
that they commonly add for now to make it work? Without anything
like that, I cannot quite see how it would work with your patch
alone.
And then later we of course should clean things up by splitting the
definitions done in the main Makefile into a common file that can be
included (e.g. path+tool+definitions.mak file), include it from the
main Makefile, and then have contrib/*/Makefile also include it so
that the duplicated definitions like we see in Makefiles in subtree
and contacts (there may be others; they just were the first hits in
my "git ls-files | grep /Makefile").
prev parent reply other threads:[~2025-09-11 21:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-11 20:38 [PATCH] libsecret/Makefile: add install target M Hickford via GitGitGadget
2025-09-11 21:18 ` Junio C Hamano [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xmqqsegsofhi.fsf@gitster.g \
--to=gitster@pobox.com \
--cc=git@vger.kernel.org \
--cc=gitgitgadget@gmail.com \
--cc=mirth.hickford@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).