нужно вынести поиск зависимостей в отдельную функцию

This commit is contained in:
Kolan Sh 2011-07-07 16:13:03 +04:00
parent 5cf97862b5
commit 2570ee5a58
1 changed files with 11 additions and 2 deletions

View File

@ -35,7 +35,7 @@ sed "s~REP_CC~$REP_CC~ ; s~REP_CXX~$REP_CXX~ ; \
s~REP_LIBRARIES~$REP_LIBRARIES~ ; s~REP_TARGET~$REP_TARGET~" $ENV_FILE > Makefile
# INCLUDE0, INCLUDE1, INCLUDE2, ...
REP_INCLUDE=`echo $REP_INCLUDE | sed "s~-I~~g ; s~\\$(HOME)~${HOME}~"`
REP_INCLUDE=`echo $REP_INCLUDE | sed "s~-I~~g"`
i=1
for d in $REP_INCLUDE; do
@ -43,8 +43,15 @@ for d in $REP_INCLUDE; do
i=$((i+1))
done
echo -n "INCLUDE=" >> Makefile
i=1
for d in $REP_INCLUDE; do
echo -n ' $(INCLUDE'$j')' >> Makefile
if [ $i != 1 ]; then
echo -n ' ' >> Makefile
fi
echo -n '-I$(INCLUDE'$i')' >> Makefile
i=$((i+1))
done
echo >> Makefile
@ -58,6 +65,8 @@ echo >> Makefile
# --- 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`
while [[ "$all_dep_lst" != "$old_all_dep_lst" ]]; do