From cdaf5f9bf33f25f25b0f36a6e974068f794d9c0f Mon Sep 17 00:00:00 2001 From: sizhiying Date: Thu, 20 Oct 2011 11:02:08 +0800 Subject: [PATCH] Enable "vers" command to show branch name for all target Thanks xiaqichao Signed-off-by: mengxiaofu --- Makefile.inc | 2 +- conf/newvers.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile.inc b/Makefile.inc index 48c39b18..d224d408 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -176,7 +176,7 @@ crtend.o: crtend.c Makefile ${NORMAL_C_C} newvers: ${SYSTEM_DEP} ${SYSTEM_SWAP_DEP} - sh $S/conf/newvers.sh ${TARGET} + sh $S/conf/newvers.sh ${CC} ${CFLAGS} ${CPPFLAGS} ${PROF} -c vers.c clean:: diff --git a/conf/newvers.sh b/conf/newvers.sh index e8dc71d6..d3d418cd 100755 --- a/conf/newvers.sh +++ b/conf/newvers.sh @@ -39,7 +39,7 @@ fi touch version v=`cat version` u=${USER-root} d=`pwd` h=`hostname` t=`date` -id=`basename $1` +id=`basename ${d}` git=`git log -1|head -n 3|perl -e 'local $/;$a=<>;$a=~s/\n/ /g;print $a;'` ost="PMON2011" osr="2.1"