Patchwork configure: Fix code which creates config.mak files

login
register
mail settings
Submitter Stefan Weil
Date March 1, 2010, 9:20 p.m.
Message ID <1267478429-6412-1-git-send-email-weil@mail.berlios.de>
Download mbox | patch
Permalink /patch/46608/
State New
Headers show

Comments

Stefan Weil - March 1, 2010, 9:20 p.m.
These files are created by configure and grow
unnecessarily at each new call of configure:

roms/seabios/config.mak
roms/vgabios/config.mak
libhw32/config.mak
libhw64/config.mak

libhw32/config.mak and libhw64/config.mak set
compiler options, and the wrong old code results
in very long command lines.

The new code always writes a new config.mak
instead of appending to an existing one.

Signed-off-by: Stefan Weil <weil@mail.berlios.de>
---
 configure |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Anthony Liguori - March 9, 2010, 5:21 p.m.
On 03/01/2010 03:20 PM, Stefan Weil wrote:
> These files are created by configure and grow
> unnecessarily at each new call of configure:
>
> roms/seabios/config.mak
> roms/vgabios/config.mak
> libhw32/config.mak
> libhw64/config.mak
>
> libhw32/config.mak and libhw64/config.mak set
> compiler options, and the wrong old code results
> in very long command lines.
>
> The new code always writes a new config.mak
> instead of appending to an existing one.
>
> Signed-off-by: Stefan Weil<weil@mail.berlios.de>
>    


Applied.  Thanks.

Regards,

Anthony Liguori
> ---
>   configure |    4 ++--
>   1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index a14aba7..b4db650 100755
> --- a/configure
> +++ b/configure
> @@ -2723,7 +2723,7 @@ fi
>   # temporary config to build submodules
>   for rom in seabios vgabios ; do
>       config_mak=roms/$rom/config.mak
> -    echo "# Automatically generated by configure - do not modify">>  $config_mak
> +    echo "# Automatically generated by configure - do not modify">  $config_mak
>       echo "SRC_PATH=$source_path/roms/$rom">>  $config_mak
>       echo "CC=$cc">>  $config_mak
>       echo "BCC=bcc">>  $config_mak
> @@ -2739,7 +2739,7 @@ for hwlib in 32 64; do
>     mkdir -p $d
>     rm -f $d/Makefile
>     ln -s $source_path/Makefile.hw $d/Makefile
> -  echo "QEMU_CFLAGS+=-DTARGET_PHYS_ADDR_BITS=$hwlib">>  $d/config.mak
> +  echo "QEMU_CFLAGS+=-DTARGET_PHYS_ADDR_BITS=$hwlib">  $d/config.mak
>   done
>
>   d=libuser
>

Patch

diff --git a/configure b/configure
index a14aba7..b4db650 100755
--- a/configure
+++ b/configure
@@ -2723,7 +2723,7 @@  fi
 # temporary config to build submodules
 for rom in seabios vgabios ; do
     config_mak=roms/$rom/config.mak
-    echo "# Automatically generated by configure - do not modify" >> $config_mak
+    echo "# Automatically generated by configure - do not modify" > $config_mak
     echo "SRC_PATH=$source_path/roms/$rom" >> $config_mak
     echo "CC=$cc" >> $config_mak
     echo "BCC=bcc" >> $config_mak
@@ -2739,7 +2739,7 @@  for hwlib in 32 64; do
   mkdir -p $d
   rm -f $d/Makefile
   ln -s $source_path/Makefile.hw $d/Makefile
-  echo "QEMU_CFLAGS+=-DTARGET_PHYS_ADDR_BITS=$hwlib" >> $d/config.mak
+  echo "QEMU_CFLAGS+=-DTARGET_PHYS_ADDR_BITS=$hwlib" > $d/config.mak
 done
 
 d=libuser