libclean: honour an environment variable for the SDCC libs
authorAlan Cox <alan@linux.intel.com>
Fri, 2 Jan 2015 11:15:13 +0000 (11:15 +0000)
committerAlan Cox <alan@linux.intel.com>
Fri, 2 Jan 2015 11:15:13 +0000 (11:15 +0000)
Library/tools/libclean

index f7d99df..e19842b 100755 (executable)
@@ -6,10 +6,12 @@
 #
 UNAME_S=`uname -s`
 
-if [ "${UNAME_S}" = "Darwin" ]; then
-       SDCC_LIB="/usr/local/share/sdcc/lib"
-else
-       SDCC_LIB="/usr/share/sdcc/lib"
+if [ x"$SDCC_LIB" = "x" ]; then
+       if [ "${UNAME_S}" = "Darwin" ]; then
+               SDCC_LIB="/usr/local/share/sdcc/lib"
+       else
+               SDCC_LIB="/usr/share/sdcc/lib"
+       fi
 fi
 
 cp ${SDCC_LIB}/z80/z80.lib tmp.lib