[commit] r2112 - generate VM_VERSION from VMM version and SVN revision; remove refs to SQ_VERSION

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[commit] r2112 - generate VM_VERSION from VMM version and SVN revision; remove refs to SQ_VERSION

commits-3
 
Author: piumarta
Date: 2009-08-27 20:01:54 -0700 (Thu, 27 Aug 2009)
New Revision: 2112

Modified:
   trunk/platforms/unix/CMakeLists.txt
   trunk/platforms/unix/ChangeLog
   trunk/platforms/unix/cmake/configure
   trunk/platforms/unix/vm/config.cmake
Log:
generate VM_VERSION from VMM version and SVN revision; remove refs to SQ_VERSION

Modified: trunk/platforms/unix/CMakeLists.txt
===================================================================
--- trunk/platforms/unix/CMakeLists.txt 2009-08-28 02:49:56 UTC (rev 2111)
+++ trunk/platforms/unix/CMakeLists.txt 2009-08-28 03:01:54 UTC (rev 2112)
@@ -1,17 +1,17 @@
 # Yes, it's true: you can write makefiles in COBOL.
 #
-# Last edited: 2009-08-26 22:47:15 by piumarta on emilia-2.local
+# Last edited: 2009-08-27 19:30:47 by piumarta on emilia-2.local
 
 PROJECT (squeak)
 
 CMAKE_MINIMUM_REQUIRED (VERSION 2.6.2)
 
-IF (NOT DEFINED VM_HOST OR NOT DEFINED VM_VERSION OR NOT DEFINED SQ_VERSION)
+IF (NOT DEFINED VM_HOST OR NOT DEFINED VM_VERSION)
   MESSAGE (FATAL_ERROR "
     You MUST NOT run CMake directly the first time you configure a build.
     Run 'platforms/unix/cmake/configure' from within your build directory."
   )
-ENDIF (NOT DEFINED VM_HOST OR NOT DEFINED VM_VERSION OR NOT DEFINED SQ_VERSION)
+ENDIF (NOT DEFINED VM_HOST OR NOT DEFINED VM_VERSION)
 
 SET (prefix  ${CMAKE_INSTALL_PREFIX})
 

Modified: trunk/platforms/unix/ChangeLog
===================================================================
--- trunk/platforms/unix/ChangeLog 2009-08-28 02:49:56 UTC (rev 2111)
+++ trunk/platforms/unix/ChangeLog 2009-08-28 03:01:54 UTC (rev 2112)
@@ -1,3 +1,13 @@
+2009-08-27  Ian Piumarta  <com -dot- gmail -at- piumarta (backwards)>
+
+ * cmake/configure (VM_VERSION): Generate automatically from
+ VMMaker version and SVN revision.  Remove SQ_VERSION.
+
+ * vm/config.cmake: Extract major.minor.patch-release from
+ version.
+
+ * CMakeLists.txt: Remove references to SQ_VERSION.
+
 2009-08-27    <[hidden email]>
 
  * vm/build.cmake: Install squeak.sh.

Modified: trunk/platforms/unix/cmake/configure
===================================================================
--- trunk/platforms/unix/cmake/configure 2009-08-28 02:49:56 UTC (rev 2111)
+++ trunk/platforms/unix/cmake/configure 2009-08-28 03:01:54 UTC (rev 2112)
@@ -1,10 +1,7 @@
 #!/bin/sh
 
-# Last edited: 2009-08-17 03:28:34 by piumarta on emilia-2.local
+# Last edited: 2009-08-27 19:57:45 by piumarta on emilia-2.local
 
-VM_VERSION=3.10-7
-SQ_VERSION=3.10-7159
-
 help() {
     cat <<EOF
 Usage: $0 [options...]
@@ -33,11 +30,16 @@
     stop=true
 }
 
-config=`dirname $0`
-unix=`dirname ${config}`
-guess=`${config}/config.guess`
-host=`${config}/config.sub ${guess}`
+config="`dirname \"$0\"`"
+unix="`dirname \"${config}\"`"
+guess=`"${config}"/config.guess`
+host=`"${config}"/config.sub ${guess}`
 
+vmmversion="`tr '\015 ' '\012\012' < \"${unix}/src/vm/interp.h\" | sed '1,/VMMaker/d;q'`"
+svnversion=`svn info "${unix}/ChangeLog" | fgrep Revision: | awk '{print $2}'`
+
+VM_VERSION="${vmmversion}-${svnversion}"alpha
+
 stop=false
 debug_configure=false
 
@@ -47,7 +49,6 @@
 
 dump () {
     echo "VM_VERSION = ${VM_VERSION}"
-    echo "SQ_VERSION = ${SQ_VERSION}"
     echo "unix       = ${unix}"
     echo "config     = ${config}"
     echo "host       = ${host}"
@@ -71,10 +72,9 @@
     exit 1
 fi
 
-echo "-- Configuring squeak $VM_VERSION ($SQ_VERSION) for $host"
+echo "-- Configuring squeak ${VM_VERSION} for ${host}"
 
 cmake ${unix} \
-  -DVM_HOST="$host" \
+  -DVM_HOST="${host}" \
   -DVM_VERSION="${VM_VERSION}" \
-  -DSQ_VERSION="${SQ_VERSION}" \
   $args "$@"

Modified: trunk/platforms/unix/vm/config.cmake
===================================================================
--- trunk/platforms/unix/vm/config.cmake 2009-08-28 02:49:56 UTC (rev 2111)
+++ trunk/platforms/unix/vm/config.cmake 2009-08-28 03:01:54 UTC (rev 2112)
@@ -2,9 +2,10 @@
 
 CONFIG_DEFINE (OS_TYPE)
 
-STRING (REGEX REPLACE "(.*)\\.(.*)-(.*)" "\\1" major ${version})
-STRING (REGEX REPLACE "(.*)\\.(.*)-(.*)" "\\2" minor ${version})
-STRING (REGEX REPLACE "(.*)\\.(.*)-(.*)" "\\3" patch ${version})
+STRING (REGEX REPLACE "(.*)\\.(.*)\\.(.*)-(.*)" "\\1" major   ${version})
+STRING (REGEX REPLACE "(.*)\\.(.*)\\.(.*)-(.*)" "\\2" minor   ${version})
+STRING (REGEX REPLACE "(.*)\\.(.*)\\.(.*)-(.*)" "\\3" patch   ${version})
+STRING (REGEX REPLACE "(.*)\\.(.*)\\.(.*)-(.*)" "\\4" release ${version})
 
 IF (APPLE)
   SET (DARWIN 1)
@@ -188,7 +189,6 @@
 CONFIG_DEFINE (VM_HOST_OS)
 
 SET (VM_VERSION \"${VM_VERSION}\")
-SET (SQ_VERSION \"${SQ_VERSION}\")
 
 CONFIG_DEFINE (VM_VERSION)
 CONFIG_DEFINE (SQ_VERSION)

Reply | Threaded
Open this post in threaded view
|

Re: [commit] r2112 - generate VM_VERSION from VMM version and SVN revision; remove refs to SQ_VERSION

David T. Lewis
 
On Thu, Aug 27, 2009 at 08:01:54PM -0700, [hidden email] wrote:
>  
> Author: piumarta
>  
> +vmmversion="`tr '\015 ' '\012\012' < \"${unix}/src/vm/interp.h\" | sed '1,/VMMaker/d;q'`"
> +svnversion=`svn info "${unix}/ChangeLog" | fgrep Revision: | awk '{print $2}'`
> +
> +VM_VERSION="${vmmversion}-${svnversion}"alpha

Nice. And I thought this couldn't easily be automated.

:)