Add support for objects with a dot in their name

This commit is contained in:
Daniel Bainton 2014-04-02 07:31:14 +01:00
parent cf6065812f
commit 8cd269c3b8
2 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,7 @@ BIN = `{ if test "$BIN" != ""; then echo $BIN; else echo "NOBIN"; fi }
LIB = `{ if test "$LIB" != ""; then echo $LIB; else echo "NOLIB"; fi }
`{ printf "# Auto-generated file by mk, do not edit\n\n" > .targs.mk }
`{ for i in $BIN; do printf "$i:Q: \$"$i"_OBJ\n\techo LD \$target\n\t\$LD \$prereq \$LDFLAGS \$DEPS_LDFLAGS \$LOCAL_LDFLAGS \$LOCAL_BIN_LDFLAGS -o \$target\n\n" ; done >> .targs.mk }
`{ for i in $BIN; do tobj=$(echo $i|tr '.' '_'); printf "$i:Q: \$"$tobj"_OBJ\n\techo LD \$target\n\t\$LD \$prereq \$LDFLAGS \$DEPS_LDFLAGS \$LOCAL_LDFLAGS \$LOCAL_BIN_LDFLAGS -o \$target\n\n" ; done >> .targs.mk }
<.targs.mk
<$mkbuild/mk.deps

View File

@ -5,8 +5,9 @@ clean:QV:
l=`if test "$LIB" = "NOLIB"; then echo; else echo $LIB; fi `
bin_obj=
for i in $BIN; do
bin_obj="$bin_obj \$${i}_OBJ"
bobj=$(echo $i|tr '.' '_')
bin_obj="$bin_obj \$${bobj}_OBJ"
done
bin_obj=`eval echo $bin_obj`
bin_obj=$(eval echo $bin_obj)
echo rm -f $t $b $OBJ $bin_obj $l $LOBJ $CLEAN_FILES .targs.mk .deps.mk
rm -f $t $b $OBJ $bin_obj $l $LOBJ $CLEAN_FILES .targs.mk .deps.mk