Skip to contentSkip to conversation

configure: Silence warnings about missing roms/seabios directory

PATCH In review Thomas Huth 2 participants 2 messages Jan 7, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Silence warnings about missing roms/seabios directory

The configure script tries to always create a config.mak file in the roms/seabios/ subdirectory. However, since commit 5dce7b8d8ce6 ("configure: remove DIRS"), this subdirectory is not created anymore if the git submodule hasn't been checked out. Thus let's properly check for the existance of the folder first now to get rid of the warnings.

Fixes 5dce7b8d8ce6 ("configure: remove DIRS")
---
 configure | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
configure +3 -3
index c798e48faf..51b13b273c 100755
@@ -3773,8 +3773,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
-    config_mak=roms/$rom/config.mak
+if test -d roms/seabios ; then
+    config_mak=roms/seabios/config.mak
     echo "# Automatically generated by configure - do not modify" > $config_mak
     echo "SRC_PATH=$source_path/roms/$rom" >> $config_mak
     echo "AS=$as" >> $config_mak
@@ -3786,7 +3786,7 @@ for rom in seabios; do
     echo "IASL=$iasl" >> $config_mak
     echo "LD=$ld" >> $config_mak
     echo "RANLIB=$ranlib" >> $config_mak
-done
+fi
 
 config_mak=pc-bios/optionrom/config.mak
 echo "# Automatically generated by configure - do not modify" > $config_mak
Signature · 1 line
2.27.0
#1 lore raw
Quoted 9 lines · Thomas Huth

The configure script tries to always create a config.mak file in the roms/seabios/ subdirectory. However, since commit 5dce7b8d8ce6 ("configure: remove DIRS"), this subdirectory is not created anymore if the git submodule hasn't been checked out. Thus let's properly check for the existance of the folder first now to get rid of the warnings.

Fixes 5dce7b8d8ce6 ("configure: remove DIRS")

I beat you to it shortly:

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

(I didn't see your reply to the pull request).

"test -d" is not really enough, what you need is test -f $source_path/roms/seabios/Makefile.

Paolo

Quoted 28 lines
---
  configure | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
configure +3 -3
index c798e48faf..51b13b273c 100755
@@ -3773,8 +3773,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
-    config_mak=roms/$rom/config.mak
+if test -d roms/seabios ; then
+    config_mak=roms/seabios/config.mak
      echo "# Automatically generated by configure - do not modify" > $config_mak
      echo "SRC_PATH=$source_path/roms/$rom" >> $config_mak
      echo "AS=$as" >> $config_mak
@@ -3786,7 +3786,7 @@ for rom in seabios; do
      echo "IASL=$iasl" >> $config_mak
      echo "LD=$ld" >> $config_mak
      echo "RANLIB=$ranlib" >> $config_mak
-done
+fi
 
  config_mak=pc-bios/optionrom/config.mak
  echo "# Automatically generated by configure - do not modify" > $config_mak