aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Johnson <scott.johnson@arilinc.com>2021-03-13 10:58:31 -0800
committerScott Johnson <scott.johnson@arilinc.com>2021-03-13 10:58:31 -0800
commit87feee89db567c5d56b9a26b74a49a26859577b8 (patch)
tree85f79b06f1dac9a64d37c2f7ae5ec795e4ddee34
parent4e711512e162007e017ff1822e036e2b1219dc5f (diff)
downloadriscv-gnu-toolchain-87feee89db567c5d56b9a26b74a49a26859577b8.zip
riscv-gnu-toolchain-87feee89db567c5d56b9a26b74a49a26859577b8.tar.gz
riscv-gnu-toolchain-87feee89db567c5d56b9a26b74a49a26859577b8.tar.bz2
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.
-rw-r--r--Makefile.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/Makefile.in b/Makefile.in
index ab2cc05..1fd5463 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