REP_INCLUDE сортируются, нужна теперь их подстановка в списке зависимостей o-файлов

This commit is contained in:
Kolan Sh 2011-07-08 23:33:55 +04:00
parent 50f951fc49
commit b66c3f5be1
1 changed files with 13 additions and 6 deletions

View File

@ -47,6 +47,7 @@ while true ; do
done
# ======= Show INCLUDES =======
REP_INCLUDE="`echo $REP_INCLUDE | sed 's~ ~\n~g' | sort -u | tr '\n' ' '`"
echo "INCLUDE=$REP_INCLUDE";
# ======= Help =======
@ -160,16 +161,16 @@ for i in `seq 0 $((nfiles-1))`; do
f=`echo ${flist[$i]} | sed "s~.$extension$~~"`
[[ "$extension" != c && "$extension" != cpp
&& "$extension" != cxx && "$extension" != cc ]] && continue
echo -n "`basename $f.o:`" >> Makefile
echo "`basename $f.o:` \\" >> Makefile
echo -ne "\t${fpath[$i]}" >> Makefile
dep_lst=$f.$extension
dep_lst=${fdeplist[$i]}
_dep_lst=
while [ "$dep_lst" != "$_dep_lst" ]; do
_dep_lst="$dep_lst"
for fl in $_dep_lst; do
for i in `seq 0 $((nfiles-1))`; do
#echo "FL=$fl; flist[$i]=${flist[$i]}"
if [ "$fl" == "${flist[$i]}" ]; then
dep_lst="$dep_lst ${fdeplist[$i]}"
fi
@ -180,10 +181,16 @@ for i in `seq 0 $((nfiles-1))`; do
done
for fl in $dep_lst; do
echo ' \' >> Makefile
echo -ne "\t$fl" >> Makefile
for j in `seq 0 $((nfiles-1))`; do
if [ "${flist[$j]}" == "$fl" ]; then
echo ' \' >> Makefile
echo -ne "\t" >> Makefile
echo -ne "${fpath[$j]}" | sed "s~^${HOME}~\$\(HOME\)~g ; s~/*$~~g" >> Makefile
#echo -ne "\t${fpath[$j]}" >> Makefile
break
fi
done
done
#echo "FILE=$f.$extension, DEPLIST=$dep_lst"
echo >> Makefile
echo >> Makefile