для target зависимости строятся

This commit is contained in:
Kolan Sh 2011-07-08 19:09:04 +04:00
parent bc96f2d321
commit 02cfb8f0ba
1 changed files with 17 additions and 4 deletions

View File

@ -132,14 +132,27 @@ while [ $nfiles != $nparsed ]; do
let nparsed++ let nparsed++
done done
# ======= Target rules =======
#echo -n "target_objs = "
for i in `seq 0 $((nfiles-1))`; do for i in `seq 0 $((nfiles-1))`; do
echo ${flist[$i]}:${fdeplist[$i]} echo ${flist[$i]}:${fdeplist[$i]}
done done
# ======= Target rules =======
echo 'target_objs = \' >> Makefile
carry=false
for i in `seq 0 $((nfiles-1))`; do
extension=`basename ${flist[$i]} | sed 's~.*\.~~g'`
f=`echo ${flist[$i]} | sed "s~.$extension$~~"`
[[ "$extension" != c && "$extension" != cpp
&& "$extension" != cxx && "$extension" != cc ]] && continue
[ $carry == true ] && echo ' \' >> Makefile
echo -ne "\t`basename $f.o`" >> Makefile
carry=true
done
echo >> Makefile
# ======= Warning ======= # ======= Warning =======
files_not_found=`echo -e "$files_not_found" | sort -u` files_not_found=`echo -e "$files_not_found" | sort -u`
if [ "$files_not_found" != "" ]; then if [ "$files_not_found" != "" ]; then