нужно вынести поиск зависимостей в отдельную функцию
This commit is contained in:
parent
5cf97862b5
commit
2570ee5a58
|
@ -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
|
s~REP_LIBRARIES~$REP_LIBRARIES~ ; s~REP_TARGET~$REP_TARGET~" $ENV_FILE > Makefile
|
||||||
|
|
||||||
# INCLUDE0, INCLUDE1, INCLUDE2, ...
|
# 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
|
i=1
|
||||||
for d in $REP_INCLUDE; do
|
for d in $REP_INCLUDE; do
|
||||||
|
@ -43,8 +43,15 @@ for d in $REP_INCLUDE; do
|
||||||
i=$((i+1))
|
i=$((i+1))
|
||||||
done
|
done
|
||||||
|
|
||||||
|
echo -n "INCLUDE=" >> Makefile
|
||||||
|
|
||||||
|
i=1
|
||||||
for d in $REP_INCLUDE; do
|
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
|
done
|
||||||
echo >> Makefile
|
echo >> Makefile
|
||||||
|
|
||||||
|
@ -58,6 +65,8 @@ echo >> Makefile
|
||||||
# --- Rules ---
|
# --- Rules ---
|
||||||
cat $RULES_FILE >> Makefile
|
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`
|
all_dep_lst=`grep ^\#include\ \" $REP_TARGET.c | sed 's~[^"]*"\([^"]*\)"~\1~' | sort -u`
|
||||||
|
|
||||||
while [[ "$all_dep_lst" != "$old_all_dep_lst" ]]; do
|
while [[ "$all_dep_lst" != "$old_all_dep_lst" ]]; do
|
||||||
|
|
Loading…
Reference in New Issue