From: "SZEDER Gábor" <szeder.dev@gmail.com>
To: git@vger.kernel.org
Cc: "SZEDER Gábor" <szeder.dev@gmail.com>
Subject: [PATCH 3/4] Makefile: reintroduce REFTABLE_OBJS
Date: Wed, 9 Sep 2026 21:50:05 +0200 [thread overview]
Message-ID: <20260909195006.2179119-4-szeder.dev@gmail.com> (raw)
In-Reply-To: <20260909195006.2179119-1-szeder.dev@gmail.com>
Object files under "reftable/" used to be listed in the REFTABLE_OBJS
Makefile variable so we could build a static library from them. This
static library was removed in f3b4c89d59 (make: delete REFTABLE_LIB,
add reftable to LIB_OBJS, 2025-10-02), along with filling
REFTALBE_OBJS with object files.
However, the reftable source files are kind of special, because the
reftable implementation is supposed to be easily includable in other
projects. Therefore, the reftable source files don't include
"git-compat-util.h", with the sole exception of the purposefully
project-specific "reftable/system.c". Consequently, they shouldn't be
compiled with our precompiled header, as it does include
"git-compat-util.h".
Resurrect listing object files under "reftable/" in REFTABLE_OBJS (but
not the static library), so in the next commit we'll be able to easily
filter them out and keep building them the old way, without the
precompiled header.
Signed-off-by: SZEDER Gábor <szeder.dev@gmail.com>
---
Makefile | 32 ++++++++++++++++-------------
contrib/buildsystems/CMakeLists.txt | 4 ++++
2 files changed, 22 insertions(+), 14 deletions(-)
diff --git a/Makefile b/Makefile
index 7d9ac15c74..2c4d6f4d4a 100644
--- a/Makefile
+++ b/Makefile
@@ -707,6 +707,7 @@ OBJECTS =
OTHER_PROGRAMS =
PROGRAM_OBJS =
PROGRAMS =
+REFTABLE_OBJS =
RUST_SOURCES =
EXCLUDED_PROGRAMS =
SCRIPT_PERL =
@@ -1284,20 +1285,6 @@ LIB_OBJS += refs/iterator.o
LIB_OBJS += refs/packed-backend.o
LIB_OBJS += refs/ref-cache.o
LIB_OBJS += refspec.o
-LIB_OBJS += reftable/basics.o
-LIB_OBJS += reftable/block.o
-LIB_OBJS += reftable/blocksource.o
-LIB_OBJS += reftable/error.o
-LIB_OBJS += reftable/fsck.o
-LIB_OBJS += reftable/iter.o
-LIB_OBJS += reftable/merged.o
-LIB_OBJS += reftable/pq.o
-LIB_OBJS += reftable/record.o
-LIB_OBJS += reftable/stack.o
-LIB_OBJS += reftable/system.o
-LIB_OBJS += reftable/table.o
-LIB_OBJS += reftable/tree.o
-LIB_OBJS += reftable/writer.o
LIB_OBJS += remote.o
LIB_OBJS += repack.o
LIB_OBJS += repack-cruft.o
@@ -1386,6 +1373,23 @@ LIB_OBJS += xdiff/xpatience.o
LIB_OBJS += xdiff/xprepare.o
LIB_OBJS += xdiff/xutils.o
+REFTABLE_OBJS += reftable/basics.o
+REFTABLE_OBJS += reftable/block.o
+REFTABLE_OBJS += reftable/blocksource.o
+REFTABLE_OBJS += reftable/error.o
+REFTABLE_OBJS += reftable/fsck.o
+REFTABLE_OBJS += reftable/iter.o
+REFTABLE_OBJS += reftable/merged.o
+REFTABLE_OBJS += reftable/pq.o
+REFTABLE_OBJS += reftable/record.o
+REFTABLE_OBJS += reftable/stack.o
+REFTABLE_OBJS += reftable/system.o
+REFTABLE_OBJS += reftable/table.o
+REFTABLE_OBJS += reftable/tree.o
+REFTABLE_OBJS += reftable/writer.o
+
+LIB_OBJS += $(REFTABLE_OBJS)
+
BUILTIN_OBJS += builtin/add.o
BUILTIN_OBJS += builtin/am.o
BUILTIN_OBJS += builtin/annotate.o
diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
index 241da0d43a..462c1eb5ec 100644
--- a/contrib/buildsystems/CMakeLists.txt
+++ b/contrib/buildsystems/CMakeLists.txt
@@ -668,6 +668,10 @@ include_directories(${CMAKE_BINARY_DIR})
#libgit
parse_makefile_for_sources(libgit_SOURCES ${CMAKE_SOURCE_DIR}/Makefile "LIB_OBJS")
+#reftable
+parse_makefile_for_sources(reftable_SOURCES ${CMAKE_SOURCE_DIR}/Makefile "REFTABLE_OBJS")
+list(APPEND libgit_SOURCES ${reftable_SOURCES})
+
list(TRANSFORM libgit_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/")
list(TRANSFORM compat_SOURCES PREPEND "${CMAKE_SOURCE_DIR}/")
--
2.55.0.1193.g1b994e35de
next prev parent reply other threads:[~2026-09-09 19:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 19:50 [PATCH 0/4] make: precompile "git-compat-util.h" SZEDER Gábor
2026-09-09 19:50 ` [PATCH 1/4] Makefile: remove XDIFF_OBJS initialization SZEDER Gábor
2026-09-09 19:50 ` [PATCH 2/4] cmake: remove any "$(*_OBJS)" variables when parsing Makefile for sources SZEDER Gábor
2026-09-09 19:50 ` SZEDER Gábor [this message]
2026-09-09 21:07 ` [PATCH 3/4] Makefile: reintroduce REFTABLE_OBJS Junio C Hamano
2026-09-09 19:50 ` [PATCH 4/4] Makefile: precompile "git-compat-util.h" SZEDER Gábor
2026-09-09 19:57 ` SZEDER Gábor
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=20260909195006.2179119-4-szeder.dev@gmail.com \
--to=szeder.dev@gmail.com \
--cc=git@vger.kernel.org \
/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