git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: "Ævar Arnfjörð Bjarmason" <avarab@gmail.com>
Cc: git@vger.kernel.org, Jeff King <peff@peff.net>
Subject: Re: [PATCH v2 6/6] Makefile: add {program,xdiff,test,git}-objs & objects targets
Date: Mon, 01 Feb 2021 14:30:05 -0800	[thread overview]
Message-ID: <xmqq1rdzjuaa.fsf@gitster.c.googlers.com> (raw)
In-Reply-To: <20210201111715.10200-7-avarab@gmail.com> ("Ævar Arnfjörð Bjarmason"'s message of "Mon, 1 Feb 2021 12:17:15 +0100")

Ævar Arnfjörð Bjarmason  <avarab@gmail.com> writes:

> Add targets to compile the various *.o files we declared in commonly
> used *_OBJS variables. This is useful for debugging purposes, to
> e.g. get to the point where we can compile a git.o. See [1] for a
> use-case for this target.
>
> https://lore.kernel.org/git/YBCGtd9if0qtuQxx@coredump.intra.peff.net/
>
> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
> ---
>  Makefile | 5 +++++
>  1 file changed, 5 insertions(+)

If you are not actually depositing files whose names are *-objs,
please mark them as .PHONY: targets.

> diff --git a/Makefile b/Makefile
> index 07763353423..31123639f65 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -683,6 +683,7 @@ PROGRAM_OBJS += http-backend.o
>  PROGRAM_OBJS += imap-send.o
>  PROGRAM_OBJS += sh-i18n--envsubst.o
>  PROGRAM_OBJS += shell.o
> +program-objs: $(PROGRAM_OBJS)
>  
>  # Binary suffix, set to .exe for Windows builds
>  X =
> @@ -2383,13 +2384,16 @@ XDIFF_OBJS += xdiff/xmerge.o
>  XDIFF_OBJS += xdiff/xpatience.o
>  XDIFF_OBJS += xdiff/xprepare.o
>  XDIFF_OBJS += xdiff/xutils.o
> +xdiff-objs: $(XDIFF_OBJS)
>  
>  TEST_OBJS := $(patsubst %$X,%.o,$(TEST_PROGRAMS)) $(patsubst %,t/helper/%,$(TEST_BUILTINS_OBJS))
> +test-objs: $(TEST_OBJS)
>  
>  GIT_OBJS += $(LIB_OBJS)
>  GIT_OBJS += $(BUILTIN_OBJS)
>  GIT_OBJS += common-main.o
>  GIT_OBJS += git.o
> +git-objs: $(GIT_OBJS)
>  
>  OBJECTS += $(GIT_OBJS)
>  OBJECTS += $(PROGRAM_OBJS)
> @@ -2399,6 +2403,7 @@ OBJECTS += $(FUZZ_OBJS)
>  ifndef NO_CURL
>  	OBJECTS += http.o http-walker.o remote-curl.o
>  endif
> +objects: $(OBJECTS)
>  
>  dep_files := $(foreach f,$(OBJECTS),$(dir $f).depend/$(notdir $f).d)
>  dep_dirs := $(addsuffix .depend,$(sort $(dir $(OBJECTS))))

  reply	other threads:[~2021-02-01 22:31 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-26 16:07 [PATCH 0/4] Makefile: micro-optimize light non-test builds Ævar Arnfjörð Bjarmason
2021-01-26 16:07 ` [PATCH 1/4] Makefile: refactor assignment for subsequent change Ævar Arnfjörð Bjarmason
2021-01-27  1:29   ` Junio C Hamano
2021-01-26 16:07 ` [PATCH 2/4] Makefile: refactor " Ævar Arnfjörð Bjarmason
2021-01-26 16:07 ` [PATCH 3/4] Makefile: add a NO_TEST_TOOLS flag Ævar Arnfjörð Bjarmason
2021-01-26 16:07 ` [PATCH 4/4] Makefile: add a NO_{INSTALL_,}SCRIPT_FALLBACKS target Ævar Arnfjörð Bjarmason
2021-01-26 21:16 ` [PATCH 0/4] Makefile: micro-optimize light non-test builds Jeff King
2021-01-27  1:38   ` Junio C Hamano
2021-01-27  4:34     ` Jeff King
2021-01-27  6:07       ` Junio C Hamano
2021-01-28 18:23   ` [PATCH 0/6] Makefile: add {program,xdiff,test,git}-objs & objects targets Ævar Arnfjörð Bjarmason
2021-02-01 11:17     ` [PATCH v2 " Ævar Arnfjörð Bjarmason
2021-02-03  1:11       ` Junio C Hamano
2021-02-04  7:06         ` Jeff King
2021-02-04 17:49           ` Junio C Hamano
2021-02-23 11:41       ` [PATCH v3 0/6] Makefile: add {program,xdiff,test,git,fuzz}-objs " Ævar Arnfjörð Bjarmason
2021-02-23 17:57         ` Junio C Hamano
2021-02-23 18:31         ` Jeff King
2021-02-23 11:41       ` [PATCH v3 1/6] Makefile: guard against TEST_OBJS in the environment Ævar Arnfjörð Bjarmason
2021-02-23 11:41       ` [PATCH v3 2/6] Makefile: split up long OBJECTS line Ævar Arnfjörð Bjarmason
2021-02-23 11:41       ` [PATCH v3 3/6] Makefile: sort OBJECTS assignment for subsequent change Ævar Arnfjörð Bjarmason
2021-02-23 11:41       ` [PATCH v3 4/6] Makefile: split OBJECTS into OBJECTS and GIT_OBJS Ævar Arnfjörð Bjarmason
2021-02-23 11:41       ` [PATCH v3 5/6] Makefile: add {program,xdiff,test,git,fuzz}-objs & objects targets Ævar Arnfjörð Bjarmason
2021-02-23 11:41       ` [PATCH v3 6/6] Makefile: build "$(FUZZ_OBJS)" in CI, not under "all" Ævar Arnfjörð Bjarmason
2021-02-23 18:28         ` Jeff King
2021-02-23 19:19           ` Junio C Hamano
2021-02-28 20:13           ` Ævar Arnfjörð Bjarmason
2021-03-01  9:39             ` Jeff King
2021-02-01 11:17     ` [PATCH v2 1/6] Makefile: remove "all" on "$(FUZZ_OBJS)" Ævar Arnfjörð Bjarmason
2021-02-04  6:51       ` Jeff King
2021-02-01 11:17     ` [PATCH v2 2/6] Makefile: guard against TEST_OBJS in the environment Ævar Arnfjörð Bjarmason
2021-02-01 11:17     ` [PATCH v2 3/6] Makefile: split up long OBJECTS line Ævar Arnfjörð Bjarmason
2021-02-01 11:17     ` [PATCH v2 4/6] Makefile: sort OBJECTS assignment for subsequent change Ævar Arnfjörð Bjarmason
2021-02-01 11:17     ` [PATCH v2 5/6] Makefile: split OBJECTS into OBJECTS and GIT_OBJS Ævar Arnfjörð Bjarmason
2021-02-01 11:17     ` [PATCH v2 6/6] Makefile: add {program,xdiff,test,git}-objs & objects targets Ævar Arnfjörð Bjarmason
2021-02-01 22:30       ` Junio C Hamano [this message]
2021-01-28 18:23   ` [PATCH 1/6] Makefile: remove "all" on "$(FUZZ_OBJS)" Ævar Arnfjörð Bjarmason
2021-01-28 18:23   ` [PATCH 2/6] Makefile: guard against TEST_OBJS in the environment Ævar Arnfjörð Bjarmason
2021-01-29  7:49     ` Junio C Hamano

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqq1rdzjuaa.fsf@gitster.c.googlers.com \
    --to=gitster@pobox.com \
    --cc=avarab@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).