не находит 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
|
||||||
|
extension=`basename $f | sed 's~.*\.~~g'`
|
||||||
|
f=`echo $f | sed "s~.$extension$~~"`
|
||||||
|
for ext in "$extension" c cxx cpp; do
|
||||||
already_in_list=false
|
already_in_list=false
|
||||||
for i in `seq 0 $((nparsed))`; do
|
for i in `seq 0 $((nfiles))`; do
|
||||||
if [ "${flist[$i]}" == "$f" ]; then
|
if [ "${flist[$i]}" == "$f.$ext" ]; then
|
||||||
already_in_list=false
|
already_in_list=true
|
||||||
break;
|
break;
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
[ $already_in_list == true ] && continue
|
[ $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
|
||||||
|
flist[$nfiles]=$f.$ext
|
||||||
|
fpath[$nfiles]=$F
|
||||||
|
fdeplist[$nfiles]=`remove_c_comments.pl $F | grep -P '^[\t ]*#include[\t ]*"' | sed 's~[^"]*"\([^"]*\)".*~\1~' | sort -u`
|
||||||
let nfiles++
|
let nfiles++
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
[[ "$F" == "" && "$ext" == "$extension" ]] && files_not_found=`echo "$files_not_found\n$f.$ext" | sort -u`
|
||||||
[ found == false ] && files_not_found=`echo "$files_not_found\n$f" | sort -u`
|
[[ "$F" != "" && "$ext" != "$extension" ]] && break
|
||||||
|
done
|
||||||
done
|
done
|
||||||
let nparsed++
|
let nparsed++
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in New Issue