From: <dan...@us...> - 2007-11-29 20:29:23
|
Revision: 1082 http://cegcc.svn.sourceforge.net/cegcc/?rev=1082&view=rev Author: dannybackx Date: 2007-11-29 12:29:11 -0800 (Thu, 29 Nov 2007) Log Message: ----------- Implement macros that you can use to determine the version of our distribution, and adapt the release scripts to generate all this correctly. At least, I hope so because this can obviously only be tested when creating the next release. Modified Paths: -------------- trunk/cegcc/scripts/make_release.sh trunk/cegcc/src/build-mingw32ce.sh trunk/cegcc/src/gcc/gcc/ChangeLog.ce trunk/cegcc/src/gcc/gcc/config/arm/mingw32.h trunk/cegcc/src/gcc/gcc/config/arm/wince-cegcc.h trunk/cegcc/src/w32api/ChangeLog.ce Added Paths: ----------- trunk/cegcc/src/w32api/include/cegcc.h.in Modified: trunk/cegcc/scripts/make_release.sh =================================================================== --- trunk/cegcc/scripts/make_release.sh 2007-11-29 19:50:38 UTC (rev 1081) +++ trunk/cegcc/scripts/make_release.sh 2007-11-29 20:29:11 UTC (rev 1082) @@ -205,6 +205,42 @@ # # End level 20 (checkout new tag from SVN) # + RESTARTED=21 + report_status + # +fi + +# +# Level 21 +# +if test $RESTARTED -ge 22 +then + echo "Skip level 21 (create version include file)" +else + echo "Level 21 (create version include file)" + + OK=no + TS1=`date +%Y%m%d` + cd $TAGSDIR/cegcc-$VERSION/src/w32api/includes + CEGCC_VERSION_MAJOR=`echo $VERSION | awk -F. '{print $1}'` + CEGCC_VERSION_MINOR=`echo $VERSION | awk -F. '{print $2}'` + CEGCC_VERSION_PATCHLEVEL=`echo $VERSION | awk -F. '{print $3}'` + L1=`grep -s -n "Automatic changes below" cegcc.h.in | awk -F: '{print $1}'` + L2=`grep -s -n "Automatic changes above" cegcc.h.in | awk -F: '{print $1}'` + head -$L1 cegcc.h.in >cegcc.h + echo "#define __CEGCC_VERSION_MAJOR__ " $CEGCC_VERSION_MAJOR >> cegcc.h + echo "#define __CEGCC_VERSION_MINOR__ " $CEGCC_VERSION_MINOR >> cegcc.h + echo "#define __CEGCC_VERSION_PATCHLEVEL__ " $CEGCC_VERSION_PATCHLEVEL >> cegcc.h + echo "#define __CEGCC_BUILD_DATE__" `date +%Y%m%d` >> cegcc.h + tail +$L2 cegcc.h.in >>cegcc.h + svn commit cegcc.h -m "Version file for release $VERSION" && OK=yes + if [ $OK = "no" ]; then + echo "SVN commit failed, exiting..." + exit 1 + fi + # + # End level 21 (create version include file) + # RESTARTED=30 report_status # Modified: trunk/cegcc/src/build-mingw32ce.sh =================================================================== --- trunk/cegcc/src/build-mingw32ce.sh 2007-11-29 19:50:38 UTC (rev 1081) +++ trunk/cegcc/src/build-mingw32ce.sh 2007-11-29 20:29:11 UTC (rev 1082) @@ -120,6 +120,17 @@ # embedded tabs in the sed below -- do not untabify components=`echo "${components}" | sed -e 's/[ ,][ ,]*/,/g' -e 's/,$//'` +# Don't build in source directory, it will clobber things and cleanup is hard. +if [ -d ${BUILD_DIR}/.svn ]; then + echo "Don't build in a source directory, please create an empty directory and build there." + echo "Example :" + echo " mkdir build-mingw32ce" + echo " cd build-mingw32ce" + echo " sh ../build-mingw32ce.sh $@" + exit 1 +fi + +# Report about options. echo The following components will be built: ${components} export TARGET="arm-wince-mingw32ce" Modified: trunk/cegcc/src/gcc/gcc/ChangeLog.ce =================================================================== --- trunk/cegcc/src/gcc/gcc/ChangeLog.ce 2007-11-29 19:50:38 UTC (rev 1081) +++ trunk/cegcc/src/gcc/gcc/ChangeLog.ce 2007-11-29 20:29:11 UTC (rev 1082) @@ -1,3 +1,8 @@ +2007-11-29 Danny Backx <dan...@us...> + + * config/arm/mingw32.h, config/arm/wince-cegcc.h : Define + __CEGCC__VERSION__ whose contents is overwritten in cegcc.h . + 2007-11-18 Pedro Alves <ped...@po...> * config/arm/wince-pe.h (ARM_DOUBLEWORD_ALIGN): Define as 0. Modified: trunk/cegcc/src/gcc/gcc/config/arm/mingw32.h =================================================================== --- trunk/cegcc/src/gcc/gcc/config/arm/mingw32.h 2007-11-29 19:50:38 UTC (rev 1081) +++ trunk/cegcc/src/gcc/gcc/config/arm/mingw32.h 2007-11-29 20:29:11 UTC (rev 1082) @@ -35,7 +35,7 @@ #undef CPP_SPEC #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{mthreads:-D_MT} \ --D__COREDLL__ -D__MINGW32__ -D__MINGW32CE__ \ +-D__COREDLL__ -D__MINGW32__ -D__MINGW32CE__ -D__CEGCC_VERSION__ \ %{!nostdinc: -idirafter ../include/w32api%s -idirafter ../../include/w32api%s }" #undef LIB_SPEC Modified: trunk/cegcc/src/gcc/gcc/config/arm/wince-cegcc.h =================================================================== --- trunk/cegcc/src/gcc/gcc/config/arm/wince-cegcc.h 2007-11-29 19:50:38 UTC (rev 1081) +++ trunk/cegcc/src/gcc/gcc/config/arm/wince-cegcc.h 2007-11-29 20:29:11 UTC (rev 1082) @@ -28,7 +28,8 @@ #undef CPP_SPEC #define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \ - -D__CEGCC32__ -D__CEGCC__ %{!ansi:-Dunix} -D__unix__ -D__unix \ + -D__CEGCC32__ -D__CEGCC__ -D__CEGCC_VERSION__ \ + %{!ansi:-Dunix} -D__unix__ -D__unix \ %{mwin32: -DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ } \ %{!nostdinc:%{!mno-win32: -idirafter ../include/w32api%s -idirafter ../../include/w32api%s }} \ " Modified: trunk/cegcc/src/w32api/ChangeLog.ce =================================================================== --- trunk/cegcc/src/w32api/ChangeLog.ce 2007-11-29 19:50:38 UTC (rev 1081) +++ trunk/cegcc/src/w32api/ChangeLog.ce 2007-11-29 20:29:11 UTC (rev 1082) @@ -1,6 +1,11 @@ -2007-11-25 Pedro Alves, Danny Backx <dan...@us...> +2007-11-29 Danny Backx <dan...@us...> - * w32api/libce/icmplib.def: Remove proxy for icmplib, MSDN says it's + * w32api/include/cegcc.h.in : Add file to provide version tracking + macros. + +2007-11-25 Pedro Alves, Danny Backx <dan...@us...> + + * w32api/libce/icmplib.def : Remove proxy for icmplib, MSDN says it's a static library only. 2007-11-16 Danny Backx <dan...@us...> Added: trunk/cegcc/src/w32api/include/cegcc.h.in =================================================================== --- trunk/cegcc/src/w32api/include/cegcc.h.in (rev 0) +++ trunk/cegcc/src/w32api/include/cegcc.h.in 2007-11-29 20:29:11 UTC (rev 1082) @@ -0,0 +1,35 @@ +/* + * Version information about CeGCC + */ +#ifndef _CEGCC_H_ +#define _CEGCC_H_ + +#ifndef __CEGCC_VERSION__ +#error __CEGCC_VERSION__ isn't defined by the compiler. Huh? +#endif + +#undef __CEGCC_VERSION__ + +/* Automatic changes below */ +#define __CEGCC_VERSION_MAJOR__ 9 +#define __CEGCC_VERSION_MINOR__ 99 +#define __CEGCC_VERSION_PATCHLEVEL__ 9 +#define __CEGCC_BUILD_DATE__ 99999999 +/* Automatic changes above */ + +#define __CEGCC_VERSION__ \ + (((__CEGCC_VERSION_MAJOR__) << 16) + + ((__CEGCC_VERSION_MINOR__) << 8) + + (__CEGCC_PATCHLEVEL__)) + +#ifdef __cplusplus +extern "C" { +#endif + +extern int _CeGCCVersion(void); + +#ifdef __cplusplus +} +#endif + +#endif /* _CEGCC_H_ */ Property changes on: trunk/cegcc/src/w32api/include/cegcc.h.in ___________________________________________________________________ Name: svn:eol-style + native This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |