[PATCH 3/6] More commenting

Michael Jansen kde at michael-jansen.biz
Mon Mar 14 19:59:18 CET 2011


---
 cmake/FindRuby.cmake |   22 +++++++++++++++++++---
 1 files changed, 19 insertions(+), 3 deletions(-)

diff --git a/cmake/FindRuby.cmake b/cmake/FindRuby.cmake
index b2756fe..6e9ef4c 100644
--- a/cmake/FindRuby.cmake
+++ b/cmake/FindRuby.cmake
@@ -135,7 +135,9 @@ IF(RUBY_EXECUTABLE  AND NOT  RUBY_MAJOR_VERSION)
      )
 ENDIF(RUBY_EXECUTABLE  AND NOT  RUBY_MAJOR_VERSION)
 
-# In case RUBY_EXECUTABLE could not be executed (e.g. cross compiling) 
+#
+### IF RUBY_EXECUTABLE IS NOT EXECUTABLE (E.G. CROSS COMPILING)
+#
 # try to detect which version we found. This is not too good.
 IF(NOT RUBY_VERSION_MAJOR)
    # by default assume 1.8.0
@@ -155,7 +157,9 @@ SET(_RUBY_VERSION_SHORT "${RUBY_VERSION_MAJOR}.${RUBY_VERSION_MINOR}")
 SET(_RUBY_VERSION_SHORT_NODOT "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}")
 SET(_RUBY_NODOT_VERSION "${RUBY_VERSION_MAJOR}${RUBY_VERSION_MINOR}${RUBY_VERSION_PATCH}")
 
-# Now we know which version we found
+#
+### CHECK IF THE FOUND VERSION SATISFIES THE REQUIRED VERSION
+#
 IF(Ruby_FIND_VERSION)
    IF(${RUBY_VERSION}  VERSION_LESS  ${Ruby_FIND_VERSION})
       # force running ruby the next time again
@@ -171,6 +175,10 @@ IF(Ruby_FIND_VERSION)
    ENDIF(${RUBY_VERSION}  VERSION_LESS  ${Ruby_FIND_VERSION})
 ENDIF(Ruby_FIND_VERSION)
 
+#
+### FIND THE RUBY INCLUDE DIRECTORY
+#
+# We need this because rubyhdrdir is not always set (ruby 1.8)
 FIND_PATH(RUBY_INCLUDE_DIR
    NAMES ruby.h
    HINTS
@@ -180,7 +188,9 @@ FIND_PATH(RUBY_INCLUDE_DIR
 
 SET(RUBY_INCLUDE_DIRS ${RUBY_INCLUDE_DIR} )
 
-# if ruby > 1.8 is required or if ruby > 1.8 was found, search for the config.h dir
+#
+### FIND THE CONFIG.H FILE (IF > RUBY 1.8)
+#
 IF( ${Ruby_FIND_VERSION_SHORT_NODOT} GREATER 18  OR  ${_RUBY_VERSION_SHORT_NODOT} GREATER 18  OR  RUBY_HDR_DIR)
    FIND_PATH(RUBY_CONFIG_INCLUDE_DIR
      NAMES ruby/config.h  config.h
@@ -193,6 +203,9 @@ IF( ${Ruby_FIND_VERSION_SHORT_NODOT} GREATER 18  OR  ${_RUBY_VERSION_SHORT_NODOT
 ENDIF( ${Ruby_FIND_VERSION_SHORT_NODOT} GREATER 18  OR  ${_RUBY_VERSION_SHORT_NODOT} GREATER 18  OR  RUBY_HDR_DIR)
 
 
+#
+### FIND THE RUBY LIBRARY
+#
 # Determine the list of possible names for the ruby library
 SET(_RUBY_POSSIBLE_LIB_NAMES ruby ruby-static ruby${_RUBY_VERSION_SHORT})
 
@@ -223,6 +236,9 @@ ENDIF(WIN32)
 
 FIND_LIBRARY(RUBY_LIBRARY NAMES ${_RUBY_POSSIBLE_LIB_NAMES} HINTS ${RUBY_POSSIBLE_LIB_DIR} )
 
+#
+### CALL FindPackageHandleStandardArgs
+#
 INCLUDE(FindPackageHandleStandardArgs)
 SET(_RUBY_REQUIRED_VARS RUBY_EXECUTABLE RUBY_INCLUDE_DIR RUBY_LIBRARY)
 IF(_RUBY_VERSION_SHORT_NODOT GREATER 18)
-- 
1.7.1


--nextPart3101659.7u16iE8AI0
Content-Disposition: attachment; filename="0004-1st-Step-Construct-the-custom-installation-area.patch"
Content-Transfer-Encoding: 7Bit
Content-Type: text/x-patch; charset="UTF-8"; name="0004-1st-Step-Construct-the-custom-installation-area.patch"



More information about the Kde-buildsystem mailing list