нужно добавить для target включения из c-файлов

This commit is contained in:
Kolan Sh 2011-07-07 16:26:23 +04:00
parent 2570ee5a58
commit 46a4309afd
1 changed files with 13 additions and 13 deletions

View File

@ -30,7 +30,7 @@ while true ; do
esac
done
# --- Environment ---
# ======= Environment =======
sed "s~REP_CC~$REP_CC~ ; s~REP_CXX~$REP_CXX~ ; \
s~REP_LIBRARIES~$REP_LIBRARIES~ ; s~REP_TARGET~$REP_TARGET~" $ENV_FILE > Makefile
@ -57,38 +57,38 @@ echo >> Makefile
echo >> Makefile
# --- Build ---
# ======= Build =======
cat $BUILD_FILE >> Makefile
echo >> Makefile
# --- Rules ---
# ======= Rules =======
cat $RULES_FILE >> Makefile
REP_INCLUDE=`echo $REP_INCLUDE | sed "s~-I~~g ; s~\\$(HOME)~${HOME}~"`
all_dep_lst=`grep ^\#include\ \" $REP_TARGET.c | sed 's~[^"]*"\([^"]*\)"~\1~' | sort -u`
# --- Target deplist ---
while [[ "$all_dep_lst" != "$old_all_dep_lst" ]]; do
old_all_dep_lst=$all_dep_lst
for f in $all_dep_lst; do
target_dep_lst=`grep ^\#include\ \" $REP_TARGET.c | sed 's~[^"]*"\([^"]*\)"~\1~' | sort -u`
while [[ "$target_dep_lst" != "$old_target_dep_lst" ]]; do
old_target_dep_lst=$target_dep_lst
for f in $target_dep_lst; do
F=""
for d in . $REP_INCLUDE; do
#echo "$d/$f" # | sed "s~^${HOME}~$\(HOME\)~"
if [ -f "$d/$f" ]; then
F="$d/$f"
break
fi
done
if [ "$F" == "" ]; then
echo "file \"$f\" not found"
echo "#include \"$f\" - file not found"
exit -1
fi
#echo "F=$F"
all_dep_lst="$all_dep_lst "`grep ^\#include\ \" $F | sed 's~[^"]*"\([^"]*\)"~\1~'`
all_dep_lst=`echo $all_dep_lst | sed 's~ ~\n~g' | sort -u`
target_dep_lst="$target_dep_lst "`grep ^\#include\ \" $F | sed 's~[^"]*"\([^"]*\)"~\1~'`
target_dep_lst=`echo $target_dep_lst | sed 's~ ~\n~g' | sort -u`
done
done
echo "all_dep_lst=$all_dep_lst"
echo "target_dep_lst=$target_dep_lst"