From 2570ee5a58a78eab317e0a1f5c504d674d6f44e9 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Thu, 7 Jul 2011 16:13:03 +0400 Subject: [PATCH] =?UTF-8?q?=D0=BD=D1=83=D0=B6=D0=BD=D0=BE=20=D0=B2=D1=8B?= =?UTF-8?q?=D0=BD=D0=B5=D1=81=D1=82=D0=B8=20=D0=BF=D0=BE=D0=B8=D1=81=D0=BA?= =?UTF-8?q?=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC=D0=BE=D1=81=D1=82?= =?UTF-8?q?=D0=B5=D0=B9=20=D0=B2=20=D0=BE=D1=82=D0=B4=D0=B5=D0=BB=D1=8C?= =?UTF-8?q?=D0=BD=D1=83=D1=8E=20=D1=84=D1=83=D0=BD=D0=BA=D1=86=D0=B8=D1=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bash/smake/smake.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/bash/smake/smake.sh b/bash/smake/smake.sh index 1d6c4a1..52fa1d1 100755 --- a/bash/smake/smake.sh +++ b/bash/smake/smake.sh @@ -35,7 +35,7 @@ sed "s~REP_CC~$REP_CC~ ; s~REP_CXX~$REP_CXX~ ; \ s~REP_LIBRARIES~$REP_LIBRARIES~ ; s~REP_TARGET~$REP_TARGET~" $ENV_FILE > Makefile # INCLUDE0, INCLUDE1, INCLUDE2, ... -REP_INCLUDE=`echo $REP_INCLUDE | sed "s~-I~~g ; s~\\$(HOME)~${HOME}~"` +REP_INCLUDE=`echo $REP_INCLUDE | sed "s~-I~~g"` i=1 for d in $REP_INCLUDE; do @@ -43,8 +43,15 @@ for d in $REP_INCLUDE; do i=$((i+1)) done +echo -n "INCLUDE=" >> Makefile + +i=1 for d in $REP_INCLUDE; do - echo -n ' $(INCLUDE'$j')' >> Makefile + if [ $i != 1 ]; then + echo -n ' ' >> Makefile + fi + echo -n '-I$(INCLUDE'$i')' >> Makefile + i=$((i+1)) done echo >> Makefile @@ -58,6 +65,8 @@ echo >> Makefile # --- Rules --- cat $RULES_FILE >> Makefile +REP_INCLUDE=`echo $REP_INCLUDE | sed "s~-I~~g ; s~\\$(HOME)~${HOME}~"` + all_dep_lst=`grep ^\#include\ \" $REP_TARGET.c | sed 's~[^"]*"\([^"]*\)"~\1~' | sort -u` while [[ "$all_dep_lst" != "$old_all_dep_lst" ]]; do