aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorDavid Aguilar <davvid@gmail.com>2025-08-26 16:35:25 -0700
committerJunio C Hamano <gitster@pobox.com>2025-08-26 17:02:12 -0700
commit0eeacde50e71cc320016f0bcf9f8b17d5168cbfd (patch)
treece0d011b9d3553d225cfd0f719cd9ba5e98019c8 /Makefile
parent16bd9f20a403117f2e0d9bcda6c6e621d3763e77 (diff)
downloadgit-0eeacde50e71cc320016f0bcf9f8b17d5168cbfd.tar.xz
Makefile: build libgit-rs and libgit-sys serially
"make -JN" with INCLUDE_LIBGIT_RS enabled causes cargo lock warnings and can trigger ld errors during the build. The build errors are caused by two inner "make" invocations getting triggered concurrently: once inside of libgit-sys and another inside of libgit-rs. Make libgit-rs depend on libgit-sys so that "make" prevents them from running concurrently. Apply the same logic to the test invocations. Use cargo's "--manifest-path" option instead of "cd" in the recipes. Signed-off-by: David Aguilar <davvid@gmail.com> Acked-by: Kyle Lippincott <spectral@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 5 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index 70d1543b6b..13ac35a151 100644
--- a/Makefile
+++ b/Makefile
@@ -3946,13 +3946,12 @@ unit-tests: $(UNIT_TEST_PROGS) $(CLAR_TEST_PROG) t/helper/test-tool$X
$(MAKE) -C t/ unit-tests
.PHONY: libgit-sys libgit-rs
-libgit-sys libgit-rs:
- $(QUIET)(\
- cd contrib/$@ && \
- cargo build \
- )
+libgit-sys:
+ $(QUIET)cargo build --manifest-path contrib/libgit-sys/Cargo.toml
+libgit-rs: libgit-sys
+ $(QUIET)cargo build --manifest-path contrib/libgit-rs/Cargo.toml
ifdef INCLUDE_LIBGIT_RS
-all:: libgit-sys libgit-rs
+all:: libgit-rs
endif
LIBGIT_PUB_OBJS += contrib/libgit-sys/public_symbol_export.o