тяк, зашибися
This commit is contained in:
parent
381b9070d5
commit
2cbfae3282
|
@ -12,7 +12,7 @@ BUILD_FILE=$SMAKE_DIR/build.smk
|
|||
RULES_FILE=$SMAKE_DIR/rules.smk
|
||||
|
||||
# Debug
|
||||
DEBUG=1
|
||||
DEBUG=0
|
||||
|
||||
# Parameters processing
|
||||
TEMP=`getopt -o c:x:i:l:t: --long cc:,cxx:,include:,libraries:,target: -- "$@"`
|
||||
|
@ -69,7 +69,8 @@ REP_INCLUDE=`echo $REP_INCLUDE | sed "s~-I~~g ; s~\\$(HOME)~${HOME}~"`
|
|||
|
||||
# --- Target deplist ---
|
||||
|
||||
target_dep_lst=`remove_c_or_cpp_comments.sed $REP_TARGET.c | grep -P '^[\t ]*#include[\t ]*"' | sed 's~[^"]*"\([^"]*\)".*~\1~' | sort -u`
|
||||
target_dep_lst=`remove_c_comments.pl $REP_TARGET.c | grep -P '^[\t ]*#include[\t ]*"' | sed 's~[^"]*"\([^"]*\)".*~\1~' | sort -u`
|
||||
files_not_found=
|
||||
|
||||
while [[ "$target_dep_lst" != "$old_target_dep_lst" ]]; do
|
||||
old_target_dep_lst=$target_dep_lst
|
||||
|
@ -86,13 +87,23 @@ while [[ "$target_dep_lst" != "$old_target_dep_lst" ]]; do
|
|||
fi
|
||||
done
|
||||
if [ "$F" == "" ]; then
|
||||
echo "#include \"$f\": file $f not found"
|
||||
exit -1
|
||||
files_not_found="$files_not_found\n$f"
|
||||
continue
|
||||
fi
|
||||
target_dep_lst="$target_dep_lst "`remove_c_or_cpp_comments.sed $REP_TARGET.c | grep -P '^[\t ]*#include[\t ]*"' | sed 's~[^"]*"\([^"]*\)".*~\1~' | sort -u`
|
||||
#echo F=$F
|
||||
target_dep_lst="$target_dep_lst "`remove_c_comments.pl $F | grep -P '^[\t ]*#include[\t ]*"' | sed 's~[^"]*"\([^"]*\)".*~\1~' | sort -u`
|
||||
target_dep_lst=`echo $target_dep_lst | sed 's~ ~\n~g' | sort -u`
|
||||
done
|
||||
#echo "target_dep_lst=$target_dep_lst"
|
||||
#echo "---------------"
|
||||
done
|
||||
|
||||
echo "target_dep_lst=$target_dep_lst"
|
||||
if [ $DEBUG == 1 ]; then
|
||||
echo -e "target_dep_lst:\n`echo $target_dep_lst | sed -e 's~ ~\n~g' | sed 's~\(^..\)~ \1~g'`"
|
||||
fi
|
||||
|
||||
files_not_found=`echo -e "$files_not_found" | sort -u`
|
||||
if [ "$files_not_found" != "" ]; then
|
||||
echo WARNING: Include files not found: $files_not_found
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue