diff scripts/mk-component.sh @ 122:feba9ffc2627

scripts/mk-component.sh: filename case muck for str2ind
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 07 Oct 2016 04:57:01 +0000
parents 5e2b0806b098
children 87347425b11f
line wrap: on
line diff
--- a/scripts/mk-component.sh	Fri Oct 07 03:58:51 2016 +0000
+++ b/scripts/mk-component.sh	Fri Oct 07 04:57:01 2016 +0000
@@ -101,8 +101,8 @@
 	if [ "$USE_STR2IND" = 1 ]
 	then
 		objname=`basename "$1" .c`.obj
-		pp_name=`echo $1 | sed -e s/.c\$/.pp/`
-		pp__name=`echo $1 | sed -e s/.c\$/.pp_/`
+		pp_name=`echo $1 | sed -e 's/\.c$/.pp/' | tr A-Z a-z`
+		pp__name=`echo $1 | sed -e 's/\.c$/.pp_/' | tr A-Z a-z`
 		helpers/makeline dep $objname "$1" \
 			>> $BUILD_DIR/$LIBNAME/Makefile
 		helpers/makeline cmd ../../toolwrap/cl470 -q -po -p? -x \
@@ -116,6 +116,13 @@
 			>> $BUILD_DIR/$LIBNAME/Makefile
 		helpers/makeline cmd @rm -f "$pp__name" \
 			>> $BUILD_DIR/$LIBNAME/Makefile
+		case "$objname" in
+			*[A-Z]*)
+				objname_lc=`echo $objname | tr A-Z a-z`
+				helpers/makeline cmd mv $objname_lc $objname \
+					>> $BUILD_DIR/$LIBNAME/Makefile
+				;;
+		esac
 		echo >> $BUILD_DIR/$LIBNAME/Makefile
 		OBJS="$OBJS $objname"
 	else