Skip to content

Commit 90c07f3

Browse files
committed
configure: Disable git submodule management when there is no .git dir
Tarballs for distribution will not have a git repo.
1 parent 5bee806 commit 90c07f3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

configure

+14
Original file line numberDiff line numberDiff line change
@@ -428,6 +428,14 @@ done
428428
# Configure submodules
429429
step_msg "configuring submodules"
430430

431+
# If we have no git directory then we are probably a tarball distribution
432+
# and shouldn't attempt to load submodules
433+
if [ ! -e ${CFG_SRC_DIR}.git ]
434+
then
435+
msg "git: no git directory. disabling submodules"
436+
CFG_DISABLE_MANAGE_SUBMODULES=1
437+
fi
438+
431439
# Have to be in the top of src directory for this
432440
cd ${CFG_SRC_DIR}
433441

@@ -575,6 +583,12 @@ putvar CFG_TARGET_TRIPLES
575583
putvar CFG_C_COMPILER
576584
putvar CFG_PREFIX
577585

586+
# Setting this again because it may have been changed
587+
if [ $CFG_DISABLE_MANAGE_SUBMODULES ]
588+
then
589+
putvar CFG_DISABLE_MANAGE_SUBMODULES
590+
fi
591+
578592
if head -n 1 ${CFG_SRC_DIR}src/snapshots.txt | grep -q '^T'
579593
then
580594
CFG_IN_TRANSITION=1

0 commit comments

Comments
 (0)