Make scripts and Makefiles POSIX compliant
authorWolfgang Denk <wd@denx.de>
Wed, 2 Jan 2008 14:54:45 +0000 (15:54 +0100)
committerWolfgang Denk <wd@denx.de>
Wed, 2 Jan 2008 14:54:45 +0000 (15:54 +0100)
The bash builtin versions of the "test" (resp. "[") command allow
using "==" for string comparisons, but POSIX compatible implemen-
tations (like /usr/bin/test) insist on using "=" only. On such systems
you will see:

$ /usr/bin/test a == a && echo OK
/usr/bin/test: ==: binary operator expected

This patch fixes Makefiles and scripts to use POSIX style.

Signed-off-by: Wolfgang Denk <wd@denx.de>
Makefile
board/integratorap/split_by_variant.sh
board/integratorcp/split_by_variant.sh
board/versatile/split_by_variant.sh

index 34e9f9d70d270ab687ab407a84561603fa65a0e1..189e1de23cbc8f72082a029cfce3bed1482ff7e0 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1682,14 +1682,14 @@ TQM8265_AA_config:  unconfig
        fi; \
        echo "#define CONFIG_$${CFREQ}MHz"      >>$(obj)include/config.h ; \
        echo "... with $${CFREQ}MHz system clock" ; \
-       if [ "$${CACHE}" == "yes" ] ; then \
+       if [ "$${CACHE}" = "yes" ] ; then \
                echo "#define CONFIG_L2_CACHE"  >>$(obj)include/config.h ; \
                echo "... with L2 Cache support" ; \
        else \
                echo "#undef CONFIG_L2_CACHE"   >>$(obj)include/config.h ; \
                echo "... without L2 Cache support" ; \
        fi; \
-       if [ "$${BMODE}" == "60x" ] ; then \
+       if [ "$${BMODE}" = "60x" ] ; then \
                echo "#define CONFIG_BUSMODE_60x" >>$(obj)include/config.h ; \
                echo "... with 60x Bus Mode" ; \
        else \
@@ -1803,7 +1803,7 @@ M54455EVB_i66_config :    unconfig
        M54455EVB_i66_config)           FLASH=INTEL; FREQ=66666666;; \
        esac; \
        >include/config.h ; \
-       if [ "$${FLASH}" == "INTEL" ] ; then \
+       if [ "$${FLASH}" = "INTEL" ] ; then \
                echo "#undef CFG_ATMEL_BOOT" >> $(obj)include/config.h ; \
                echo "TEXT_BASE = 0x00000000" > $(obj)board/freescale/m54455evb/config.tmp ; \
                cp $(obj)board/freescale/m54455evb/u-boot.int $(obj)board/freescale/m54455evb/u-boot.lds ; \
index 53b0d1e340ed05b05b6e2450166a40c4b03927dc..4b94d8ff8c4c97aa029278690de6bee38117c8a9 100755 (executable)
@@ -14,7 +14,7 @@ echo  " 1 /* Integrator/AP     */"            >> tmp.fil
 cpu="arm_intcm"
 variant="unknown core module"
 
-if [ "$1" == "" ]
+if [ "$1" = "" ]
 then
        echo "$0:: No parameters - using arm_intcm"
 else
@@ -84,7 +84,7 @@ else
        esac
 fi
 
-if [ "$cpu" == "arm_intcm" ]
+if [ "$cpu" = "arm_intcm" ]
 then
        echo "/* Core module undefined/not ported */"   >> tmp.fil
        echo "#define CONFIG_ARM_INTCM 1"               >> tmp.fil
index 37ae517fc0f37941361281cf4ebc8df047845868..79a6a9d55d59652460e50926706cc9579859d866 100755 (executable)
@@ -12,7 +12,7 @@ echo     " 1 /* Integrator/CP   */"           >> tmp.fil
 cpu="arm_intcm"
 variant="unknown core module"
 
-if [ "$1" == "" ]
+if [ "$1" = "" ]
 then
        echo "$0:: No parameters - using arm_intcm"
 else
@@ -79,7 +79,7 @@ else
 
 fi
 
-if [ "$cpu" == "arm_intcm" ]
+if [ "$cpu" = "arm_intcm" ]
 then
        echo "/* Core module undefined/not ported */"   >> tmp.fil
        echo "#define CONFIG_ARM_INTCM 1"               >> tmp.fil
index 25461c2c01ff1a74c324ef7dff308024ad068684..ccded7e8cfc88c75853ca5eda2feeeb9d8bff572 100755 (executable)
@@ -8,7 +8,7 @@
 
 mkdir -p ${obj}include
 variant=PB926EJ-S
-if [ "$1" == "" ]
+if [ "$1" = "" ]
 then
        echo "$0:: No parameters - using versatilepb_config"
        echo "#define CONFIG_ARCH_VERSATILE_PB" > ${obj}include/config.h