Git fork

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>

authored by

David Aguilar and committed by
Junio C Hamano
0eeacde5 16bd9f20

+9 -16
+5 -6
Makefile
··· 3946 3946 $(MAKE) -C t/ unit-tests 3947 3947 3948 3948 .PHONY: libgit-sys libgit-rs 3949 - libgit-sys libgit-rs: 3950 - $(QUIET)(\ 3951 - cd contrib/$@ && \ 3952 - cargo build \ 3953 - ) 3949 + libgit-sys: 3950 + $(QUIET)cargo build --manifest-path contrib/libgit-sys/Cargo.toml 3951 + libgit-rs: libgit-sys 3952 + $(QUIET)cargo build --manifest-path contrib/libgit-rs/Cargo.toml 3954 3953 ifdef INCLUDE_LIBGIT_RS 3955 - all:: libgit-sys libgit-rs 3954 + all:: libgit-rs 3956 3955 endif 3957 3956 3958 3957 LIBGIT_PUB_OBJS += contrib/libgit-sys/public_symbol_export.o
+4 -10
t/Makefile
··· 190 190 191 191 .PHONY: libgit-sys-test libgit-rs-test 192 192 libgit-sys-test: 193 - $(QUIET)(\ 194 - cd ../contrib/libgit-sys && \ 195 - cargo test \ 196 - ) 197 - libgit-rs-test: 198 - $(QUIET)(\ 199 - cd ../contrib/libgit-rs && \ 200 - cargo test \ 201 - ) 193 + $(QUIET)cargo test --manifest-path ../contrib/libgit-sys/Cargo.toml 194 + libgit-rs-test: libgit-sys-test 195 + $(QUIET)cargo test --manifest-path ../contrib/libgit-rs/Cargo.toml 202 196 ifdef INCLUDE_LIBGIT_RS 203 - all:: libgit-sys-test libgit-rs-test 197 + all:: libgit-rs-test 204 198 endif