Re: [PATCH] configure: Silence warnings about missing roms/seabios directory

2022-01-07 Thread Paolo Bonzini

On 1/7/22 13:15, Thomas Huth wrote:

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")
Signed-off-by: Thomas Huth 


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


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

diff --git a/configure b/configure
index c798e48faf..51b13b273c 100755
--- a/configure
+++ b/configure
@@ -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





[PATCH] configure: Silence warnings about missing roms/seabios directory

2022-01-07 Thread 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")
Signed-off-by: Thomas Huth 
---
 configure | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/configure b/configure
index c798e48faf..51b13b273c 100755
--- a/configure
+++ b/configure
@@ -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
-- 
2.27.0