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

Paolo Bonzini posted 1 patch 2 years, 3 months ago
Test checkpatch passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20220107114717.509665-1-pbonzini@redhat.com
configure | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
[PATCH] configure: do not create roms/seabios/config.mak if SeaBIOS not present
Posted by Paolo Bonzini 2 years, 3 months ago
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.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
 configure | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 0026388343..e1a31fb332 100755
--- a/configure
+++ b/configure
@@ -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
-- 
2.33.1


Re: [PATCH] configure: do not create roms/seabios/config.mak if SeaBIOS not present
Posted by Richard Henderson 2 years, 3 months ago
On 1/7/22 3:47 AM, Paolo Bonzini wrote:
> 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.
> 
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
>   configure | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~

Re: [PATCH] configure: do not create roms/seabios/config.mak if SeaBIOS not present
Posted by Thomas Huth 2 years, 3 months ago
On 07/01/2022 12.47, Paolo Bonzini wrote:
> 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.
> 
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
>   configure | 6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/configure b/configure
> index 0026388343..e1a31fb332 100755
> --- a/configure
> +++ b/configure
> @@ -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


>       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