тяк, зашибися
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
|
RULES_FILE=$SMAKE_DIR/rules.smk
|
||||||
|
|
||||||
# Debug
|
# Debug
|
||||||
DEBUG=1
|
DEBUG=0
|
||||||
|
|
||||||
# Parameters processing
|
# Parameters processing
|
||||||
TEMP=`getopt -o c:x:i:l:t: --long cc:,cxx:,include:,libraries:,target: -- "$@"`
|
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 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
|
while [[ "$target_dep_lst" != "$old_target_dep_lst" ]]; do
|
||||||
old_target_dep_lst=$target_dep_lst
|
old_target_dep_lst=$target_dep_lst
|
||||||
|
@ -86,13 +87,23 @@ while [[ "$target_dep_lst" != "$old_target_dep_lst" ]]; do
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ "$F" == "" ]; then
|
if [ "$F" == "" ]; then
|
||||||
echo "#include \"$f\": file $f not found"
|
files_not_found="$files_not_found\n$f"
|
||||||
exit -1
|
continue
|
||||||
fi
|
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`
|
target_dep_lst=`echo $target_dep_lst | sed 's~ ~\n~g' | sort -u`
|
||||||
done
|
done
|
||||||
|
#echo "target_dep_lst=$target_dep_lst"
|
||||||
|
#echo "---------------"
|
||||||
done
|
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