Skip to contentSkip to conversation

Use = rather than == in test.

PATCH In review Adam Sampson 2 participants 3 messages Oct 7, 2014 – Oct 9, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Use = rather than == in test.

The POSIX standard only requires test to support "="; "==" works in bash but not in dash. Other comparisons in configure.ac use "=" already.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This is the same patch that I submitted to Bugzilla:
https://bugs.freedesktop.org/show_bug.cgi?id=84750

configure.ac +1 -1
index 7c6ee75..76487c0 100644
@@ -137,7 +137,7 @@ if test "x$DUMPER" = xauto; then
 	# find SWING on the system, that's enough to try compiling the dumper.
 	AX_PKG_SWIG(2.0.0, [DUMPER=yes], [DUMPER=no])
 fi
-if test "x$DUMPER" == xyes; then
+if test "x$DUMPER" = xyes; then
 	AC_DEFINE(HAVE_DUMPER, 1, [Have dumper support])
 	# SWIG configuration
 	AX_PKG_SWIG(2.0.0, [], [ AC_MSG_ERROR([SWIG 2.0.0 or higher is required to build..]) ])
Signature · 1 line
2.1.0
#1 lore raw

PATCH 2/2 Don't use += to append to a shell variable.

POSIX only requires "=" to be supported; "+=" works in bash but not in dash.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index 76487c0..9cdd202 100644
@@ -203,7 +203,7 @@ AC_DEFINE_UNQUOTED(TARGET_CPU_PLATFORM, ["$host_cpu"], [Target platform])
 
 files="broadwell cherryview haswell ivybridge sandybridge valleyview"
 for file in $files; do
-	QUICK_DUMP_EXTRA_DIST+="$file `tr '\n' ' ' < tools/quick_dump/$file`"
+	QUICK_DUMP_EXTRA_DIST="$QUICK_DUMP_EXTRA_DIST $file `tr '\n' ' ' < tools/quick_dump/$file`"
 done
 AC_SUBST(QUICK_DUMP_EXTRA_DIST)
 
Signature · 1 line
2.1.0
#2 lore raw

Re: [PATCH 2/2] Don't use += to append to a shell variable.

Quoted 4 lines · Adam Sampson

POSIX only requires "=" to be supported; "+=" works in bash but not in dash.

Both patches merged, thanks.

Quoted 24 lines
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -2
index 76487c0..9cdd202 100644
@@ -203,7 +203,7 @@ AC_DEFINE_UNQUOTED(TARGET_CPU_PLATFORM, ["$host_cpu"], [Target platform])
 
 files="broadwell cherryview haswell ivybridge sandybridge valleyview"
 for file in $files; do
-       QUICK_DUMP_EXTRA_DIST+="$file `tr '\n' ' ' < tools/quick_dump/$file`"
+       QUICK_DUMP_EXTRA_DIST="$QUICK_DUMP_EXTRA_DIST $file `tr '\n' ' ' < tools/quick_dump/$file`"
 done
 AC_SUBST(QUICK_DUMP_EXTRA_DIST)
 
--

2.1.0

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx