fix bash-specific syntax in update-rules.sh

Thu, 21 May 2026 12:34:28 +0200

author
Mike Becker <universe@uap-core.de>
date
Thu, 21 May 2026 12:34:28 +0200
changeset 306
a7475f739778
parent 305
67a590cf2d15
child 307
3bb4f69b94e0

fix bash-specific syntax in update-rules.sh

make/update-rules.sh file | annotate | diff | comparison | revisions
--- a/make/update-rules.sh	Tue Apr 07 20:33:29 2026 +0200
+++ b/make/update-rules.sh	Thu May 21 12:34:28 2026 +0200
@@ -41,7 +41,7 @@
 sed '/FORCE:/q' Makefile.old > Makefile
 echo >> Makefile
 for file in `ls *.c` ; do
-  "$CC" -MT "\$(BUILD_DIR)/${file/.c/.o}" -MM $CFLAGS "$file"
+  "$CC" -MT "\$(BUILD_DIR)/${file%.c}.o" -MM $CFLAGS "$file"
   printf '\t@echo "Compiling $<"\n'
   printf '\t$(CC) -o $@ $(CFLAGS) -c $<\n\n'
 done  >> Makefile

mercurial