fxd: обратная сортировка INCLUDE для подстановки была ошибочной =)

This commit is contained in:
Kolan Sh 2011-07-09 00:46:36 +04:00
parent af9ce6d072
commit 634f3f6f5d
1 changed files with 3 additions and 18 deletions

View File

@ -135,10 +135,6 @@ while [ $nfiles != $nparsed ]; do
let nparsed++
done
for i in `seq 0 $((nfiles-1))`; do
echo ${flist[$i]}:${fdeplist[$i]}
done
# ======= Target rules =======
echo 'target_objs = \' >> Makefile
@ -167,7 +163,6 @@ for i in `seq 0 $((nfiles-1))`; do
[[ "$extension" != c && "$extension" != cpp
&& "$extension" != cxx && "$extension" != cc ]] && continue
echo -n `basename $f.o:` >> Makefile
#echo -ne "\t${fpath[$i]}" >> Makefile
dep_lst=${fdeplist[$i]}
_dep_lst=
@ -193,24 +188,14 @@ for i in `seq 0 $((nfiles-1))`; do
echo ' \' >> Makefile
echo -ne "\t" >> Makefile
fname=${fpath[$j]}
k=`echo $REP_INCLUDE | sed 's~ ~\n~g' | wc -l`
REVERT_REP_INCLUDE=`echo "$REP_INCLUDE" | sed "s~ ~\n~g" | sort -ur`
echo "==================="
echo k=$k
echo "REVERT_REP_INCLUDE=$REVERT_REP_INCLUDE"
echo "==================="
for d in $REVERT_REP_INCLUDE ; do
echo "==================="
echo "fname=$_fname ; d=$d ; INCLUDE$k"
k=1
for d in $REP_INCLUDE ; do
_fname=`echo ${fpath[$j]} | sed "s~^$d~\$\(INCLUDE$k\)~" `
[ "$_fname" != "${fpath[$j]}" ] && fname=$_fname
echo "fname=$_fname ; d=$d ; INCLUDE$k"
echo "==================="
let k--
let k++
done
echo -n "$fname" >> Makefile
#echo -ne "\t${fpath[$j]}" >> Makefile
break
fi
done