не находит ssdparser.c, хотя путь к нему указан
This commit is contained in:
parent
511311b1a3
commit
c8f6aa36d4
|
@ -48,6 +48,9 @@ done
|
||||||
cat $HELP_FILE > Makefile
|
cat $HELP_FILE > Makefile
|
||||||
echo >> Makefile
|
echo >> Makefile
|
||||||
|
|
||||||
|
# ======= Test for target =======
|
||||||
|
[ ! -f $REP_TARGET.c ] && echo "$REP_TARGET.c doesn't exist" && exit -1
|
||||||
|
|
||||||
# ======= Environment =======
|
# ======= Environment =======
|
||||||
sed "s~REP_CC~$REP_CC~ ; s~REP_CXX~$REP_CXX~ ; \
|
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
|
||||||
|
@ -85,33 +88,41 @@ cat $RULES_FILE >> Makefile
|
||||||
|
|
||||||
REP_INCLUDE=`echo $REP_INCLUDE | sed "s~-I~~g ; s~\\$(HOME)~${HOME}~g"`
|
REP_INCLUDE=`echo $REP_INCLUDE | sed "s~-I~~g ; s~\\$(HOME)~${HOME}~g"`
|
||||||
flist[0]=$REP_TARGET.c
|
flist[0]=$REP_TARGET.c
|
||||||
|
fpath[0]=$REP_TARGET.c
|
||||||
nfiles=1
|
nfiles=1
|
||||||
nparsed=0
|
nparsed=0
|
||||||
fdeplist[0]=`remove_c_comments.pl $REP_TARGET.c | grep -P '^[\t ]*#include[\t ]*"' | sed 's~[^"]*"\([^"]*\)".*~\1~' | sort -u`
|
fdeplist[0]=`remove_c_comments.pl $REP_TARGET.c | grep -P '^[\t ]*#include[\t ]*"' | sed 's~[^"]*"\([^"]*\)".*~\1~' | sort -u`
|
||||||
files_not_found=
|
files_not_found=
|
||||||
while [ $nfiles != $nparsed ]; do
|
while [ $nfiles != $nparsed ]; do
|
||||||
for f in ${fdeplist[$nparsed]}; do
|
for f in ${fdeplist[$nparsed]}; do
|
||||||
already_in_list=false
|
extension=`basename $f | sed 's~.*\.~~g'`
|
||||||
for i in `seq 0 $((nparsed))`; do
|
f=`echo $f | sed "s~.$extension$~~"`
|
||||||
if [ "${flist[$i]}" == "$f" ]; then
|
for ext in "$extension" c cxx cpp; do
|
||||||
already_in_list=false
|
already_in_list=false
|
||||||
break;
|
for i in `seq 0 $((nfiles))`; do
|
||||||
fi
|
if [ "${flist[$i]}" == "$f.$ext" ]; then
|
||||||
done
|
already_in_list=true
|
||||||
[ $already_in_list == true ] && continue
|
break;
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
[ $already_in_list == true ] && continue
|
||||||
|
|
||||||
found=false
|
F=
|
||||||
for d in . $REP_INCLUDE; do
|
for d in . $REP_INCLUDE; do
|
||||||
if [ -f "$d/$f" ]; then
|
if [ -f "$d/$f.$ext" ]; then
|
||||||
found=true
|
F="$d/$f.$ext"
|
||||||
flist[$nfiles]=$f
|
fi
|
||||||
fdeplist[$nfiles]=`remove_c_comments.pl $d/$f | grep -P '^[\t ]*#include[\t ]*"' | sed 's~[^"]*"\([^"]*\)".*~\1~' | sort -u`
|
if [ "$F" != "" ]; then
|
||||||
let nfiles++
|
flist[$nfiles]=$f.$ext
|
||||||
break
|
fpath[$nfiles]=$F
|
||||||
fi
|
fdeplist[$nfiles]=`remove_c_comments.pl $F | grep -P '^[\t ]*#include[\t ]*"' | sed 's~[^"]*"\([^"]*\)".*~\1~' | sort -u`
|
||||||
|
let nfiles++
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
[[ "$F" == "" && "$ext" == "$extension" ]] && files_not_found=`echo "$files_not_found\n$f.$ext" | sort -u`
|
||||||
|
[[ "$F" != "" && "$ext" != "$extension" ]] && break
|
||||||
done
|
done
|
||||||
|
|
||||||
[ found == false ] && files_not_found=`echo "$files_not_found\n$f" | sort -u`
|
|
||||||
done
|
done
|
||||||
let nparsed++
|
let nparsed++
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue