Skip to contentSkip to conversation

configure: do not create roms/seabios/config.mak if SeaBIOS not present

PATCH In review Paolo Bonzini 3 participants 3 messages Jan 7, 2022 – Jan 13, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: do not create roms/seabios/config.mak if SeaBIOS not present

If roms/seabios/Makefile is not present, the configure script is not creating the roms/seabios directory anymore (commit 5dce7b8d8c, "configure: remove DIRS", 2021-12-18); thus, creating roms/seabios/config.mak fails.

The easiest thing to do is to not create the file, since it will not be used.

---
 configure | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
configure +4 -2
index 0026388343..e1a31fb332 100755
@@ -3704,7 +3704,8 @@ export target_list source_path use_containers cpu
 $source_path/tests/tcg/configure.sh)
 
 # temporary config to build submodules
-for rom in seabios; do
+if test -f $source_path/roms/seabios/Makefile; then
+  for rom in seabios; do
     config_mak=roms/$rom/config.mak
     echo "# Automatically generated by configure - do not modify" > $config_mak
     echo "SRC_PATH=$source_path/roms/$rom" >> $config_mak
@@ -3717,7 +3718,8 @@ for rom in seabios; do
     echo "IASL=$iasl" >> $config_mak
     echo "LD=$ld" >> $config_mak
     echo "RANLIB=$ranlib" >> $config_mak
-done
+  done
+fi
 
 config_mak=pc-bios/optionrom/config.mak
 echo "# Automatically generated by configure - do not modify" > $config_mak
Signature · 1 line
2.33.1
Reviewed-by on v1 1/1
#1 lore raw
Quoted 5 lines · Paolo Bonzini

If roms/seabios/Makefile is not present, the configure script is not creating the roms/seabios directory anymore (commit 5dce7b8d8c, "configure: remove DIRS", 2021-12-18); thus, creating roms/seabios/config.mak fails.

Quoted 7 lines

The easiest thing to do is to not create the file, since it will not be used.

---
  configure | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)

r~

#2 lore raw
In reply to Paolo Bonzini
Quoted 18 lines · Paolo Bonzini

If roms/seabios/Makefile is not present, the configure script is not creating the roms/seabios directory anymore (commit 5dce7b8d8c, "configure: remove DIRS", 2021-12-18); thus, creating roms/seabios/config.mak fails.

The easiest thing to do is to not create the file, since it will not be used.

---
  configure | 6 ++++--
  1 file changed, 4 insertions(+), 2 deletions(-)
configure +0 -0
index 0026388343..e1a31fb332 100755

configure export target_list source_path use_containers cpu · line 3709

Quoted 7 lines
configure +2 -1
@@ -3704,7 +3704,8 @@ export target_list source_path use_containers cpu
  $source_path/tests/tcg/configure.sh)
 
  # temporary config to build submodules
-for rom in seabios; do
+if test -f $source_path/roms/seabios/Makefile; then
+  for rom in seabios; do
      config_mak=roms/$rom/config.mak

I think you can now simply remove the "for" loop line by setting config_mak=roms/seabios/config.mak here.

Thomas

Quoted 12 lines
configure +2 -1
      echo "# Automatically generated by configure - do not modify" > $config_mak
      echo "SRC_PATH=$source_path/roms/$rom" >> $config_mak
@@ -3717,7 +3718,8 @@ for rom in seabios; do
      echo "IASL=$iasl" >> $config_mak
      echo "LD=$ld" >> $config_mak
      echo "RANLIB=$ranlib" >> $config_mak
-done
+  done
+fi
 
  config_mak=pc-bios/optionrom/config.mak
  echo "# Automatically generated by configure - do not modify" > $config_mak