From d1768cdcab291cc9e801523fc2b4698a66b023ea Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Thu, 7 Jul 2011 17:23:50 +0400 Subject: [PATCH] =?UTF-8?q?smake=20=D1=82=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20?= =?UTF-8?q?=D0=BA=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82=D0=BD=D0=BE=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=B5=D1=82=20=D1=81=20=D0=BA?= =?UTF-8?q?=D0=BE=D0=BC=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=D0=BC=D0=B8=20=D0=B2?= =?UTF-8?q?=20C-=D0=BA=D0=BE=D0=B4=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bash/smake/smake.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bash/smake/smake.sh b/bash/smake/smake.sh index 0b530d2..8c6ce9c 100755 --- a/bash/smake/smake.sh +++ b/bash/smake/smake.sh @@ -69,7 +69,7 @@ REP_INCLUDE=`echo $REP_INCLUDE | sed "s~-I~~g ; s~\\$(HOME)~${HOME}~"` # --- Target deplist --- -target_dep_lst=`grep ^\#include\ \" $REP_TARGET.c | sed 's~[^"]*"\([^"]*\)"~\1~' | sort -u` +target_dep_lst=`remove_c_or_cpp_comments.sed $REP_TARGET.c | grep -P '^[\t ]*#include[\t ]*"' | sed 's~[^"]*"\([^"]*\)".*~\1~' | sort -u` while [[ "$target_dep_lst" != "$old_target_dep_lst" ]]; do old_target_dep_lst=$target_dep_lst @@ -85,7 +85,7 @@ while [[ "$target_dep_lst" != "$old_target_dep_lst" ]]; do echo "#include \"$f\" - file not found" exit -1 fi - target_dep_lst="$target_dep_lst "`grep ^\#include\ \" $F | sed 's~[^"]*"\([^"]*\)"~\1~'` + 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` target_dep_lst=`echo $target_dep_lst | sed 's~ ~\n~g' | sort -u` done done