morpheus

suckless linux distro
git clone git://git.2f30.org/morpheus.git
Log | Files | Refs | Submodules | README | LICENSE

commit 8cd269c3b8bb57dd591693e6c888b45afdd2cf6b
parent cf6065812f94a438d00fdbacdd46c8a56a95cead
Author: Daniel Bainton <dpb@driftaway.org>
Date:   Wed Apr  2 07:31:14 +0100

Add support for objects with a dot in their name

Diffstat:
build/mk.build | 2+-
build/mk.clean | 5+++--
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/build/mk.build b/build/mk.build @@ -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 diff --git a/build/mk.clean b/build/mk.clean @@ -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