configure: Fix evaluation of config-host.mak in create_config
PATCH 1/1 configure: Fix evaluation of config-host.mak in create_config
From: Jan Kiszka <[email protected]>
Only match on true dir variable assignments, avoid generating garbage due to the "# Configured with: ..." line which may contain "*dir=" as well.
--- create_config | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
create_config +1 -1
@@ -13,7 +13,7 @@ case $line in pkgversion=${line#*=} echo "#define QEMU_PKGVERSION \"$pkgversion\"" ;; - prefix=* | *dir=*) # directory configuration + prefix=* | [a-z]*dir=*) # directory configuration name=${line%=*} value=${line#*=} define_name=`echo $name | tr '[:lower:]' '[:upper:]'`
Quoted 5 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
Only match on true dir variable assignments, avoid generating garbage due to the "# Configured with: ..." line which may contain "*dir=" as well.
Wouldn't it be better to skip all lines starting with '#', as this problem might happen again after some more changes?
Or maybe we should do both.
Quoted 20 lines
Signed-off-by Jan Kiszka <[email protected]>--- create_config | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)create_config +1
-1@@ -13,7 +13,7 @@ case $line in pkgversion=${line#*=} echo "#define QEMU_PKGVERSION \"$pkgversion\"" ;; - prefix=* | *dir=*) # directory configuration + prefix=* | [a-z]*dir=*) # directory configuration name=${line%=*} value=${line#*=} define_name=`echo $name | tr '[:lower:]' '[:upper:]'`
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
Quoted 11 lines · Aurelien Jarno
Quoted 5 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
Only match on true dir variable assignments, avoid generating garbage due to the "# Configured with: ..." line which may contain "*dir=" as well.
Wouldn't it be better to skip all lines starting with '#', as this problem might happen again after some more changes?
Or maybe we should do both.
This is what the patch (implicitly) does.
Jan
Quoted 22 lines
Quoted 21 lines
Signed-off-by Jan Kiszka <[email protected]>--- create_config | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)create_config +1
-1@@ -13,7 +13,7 @@ case $line in pkgversion=${line#*=} echo "#define QEMU_PKGVERSION \"$pkgversion\"" ;; - prefix=* | *dir=*) # directory configuration + prefix=* | [a-z]*dir=*) # directory configuration name=${line%=*} value=${line#*=} define_name=`echo $name | tr '[:lower:]' '[:upper:]'`
Quoted 8 lines · Jan Kiszka
Quoted 7 lines · Aurelien Jarno
Quoted 5 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
Only match on true dir variable assignments, avoid generating garbage due to the "# Configured with: ..." line which may contain "*dir=" as well.
Quoted 6 lines
Quoted 4 lines
Wouldn't it be better to skip all lines starting with '#', as this problem might happen again after some more changes?
Or maybe we should do both.
This is what the patch (implicitly) does.
Yes, but only for this line. What I mean is something more generic like:
"#"*) # comment
continue
;;Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net
Quoted 12 lines · Aurelien Jarno
Quoted 11 lines · Jan Kiszka
Quoted 10 lines · Aurelien Jarno
Quoted 5 lines · Jan Kiszka
From: Jan Kiszka <[email protected]>
Only match on true dir variable assignments, avoid generating garbage due to the "# Configured with: ..." line which may contain "*dir=" as well.
Wouldn't it be better to skip all lines starting with '#', as this problem might happen again after some more changes?
Or maybe we should do both.
Quoted 9 lines
Quoted 1 line
This is what the patch (implicitly) does.
Yes, but only for this line. What I mean is something more generic like:
"#"*) # comment
continue ;;
IMO, that would only paper over suboptimally expressed patterns for the other line evaluations.
Jan
Quoted 10 lines · Jan Kiszka
Quoted 7 lines
Yes, but only for this line. What I mean is something more generic like:
"#"*) # comment
continue ;;IMO, that would only paper over suboptimally expressed patterns for the other line evaluations.
Agreed. I like Jan's patch more.
Paolo
Quoted 9 lines · Paolo Bonzini
Quoted 8 lines · Jan Kiszka
Quoted 7 lines
Yes, but only for this line. What I mean is something more generic like:
"#"*) # comment
continue ;;
Quoted 5 lines
Quoted 2 lines
IMO, that would only paper over suboptimally expressed patterns for the other line evaluations.
Agreed. I like Jan's patch more.
I have applied it.
Signature · 2 lines
Aurelien Jarno GPG: 1024D/F1BCDB73 [email protected] http://www.aurel32.net