From 87feee89db567c5d56b9a26b74a49a26859577b8 Mon Sep 17 00:00:00 2001 From: Scott Johnson Date: Sat, 13 Mar 2021 10:58:31 -0800 Subject: [PATCH] Use `git rev-parse` to find .git dir Otherwise, this code breaks if riscv-gnu-toolchain is itself a submodule of another project. In that case the git config for this tree will be $(srcdir)/../.git/modules/riscv-gnu-toolchain/config. --- Makefile.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.in b/Makefile.in index ab2cc05f..1fd5463d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -245,8 +245,8 @@ endif $(srcdir)/%/.git: cd $(srcdir) && \ - flock $(srcdir)/.git/config git submodule init $(dir $@) && \ - flock $(srcdir)/.git/config git submodule update $(dir $@) + flock `git rev-parse --git-dir`/config git submodule init $(dir $@) && \ + flock `git rev-parse --git-dir`/config git submodule update $(dir $@) # # GLIBC