[asterisk-scf-commits] asterisk-scf/release/cmake.git branch "master" updated.

Commits to the Asterisk SCF project code repositories asterisk-scf-commits at lists.digium.com
Tue Jan 11 15:09:39 CST 2011


branch "master" has been updated
       via  419edd281ed4e2cf7fec527d6950edc1d7d512fa (commit)
      from  e5b3aebd2f8feb16bfcf4a8984cf7dea543e8496 (commit)

Summary of changes:
 init-cmake.sh |   22 ++++++++++++++++++----
 1 files changed, 18 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit 419edd281ed4e2cf7fec527d6950edc1d7d512fa
Author: David M. Lee <dlee at digium.com>
Date:   Mon Jan 10 17:43:44 2011 -0600

    Added --dirname; simplified --subdir option.

diff --git a/init-cmake.sh b/init-cmake.sh
index 73c4735..9af97cf 100755
--- a/init-cmake.sh
+++ b/init-cmake.sh
@@ -18,7 +18,8 @@ Script Options
   --vs10-64   = Shorthand for -G "Visual Studio 10 Win64"
   --make      = Shorthand for -G "Unix Makefiles"
   --nmake     = Shorthand for -G "NMake Makefiles"
-  --subdir    = Build in ./build/${platform}/\${type} instead of ./build
+  --dirname   = Build in ./build/\${name} instead of ./build
+  --subdir    = Same as --dirname \${type}
   --type      = Specify build type.  Valid options are debug, release, profile.
   --help      = Show this help text and exit
 
@@ -31,8 +32,10 @@ EOF
 builddir=./build
 # build type.  valid options are debug, release, profile
 build_type=debug
-# if true, build in ./build/${platform}/${build_type}
+# if true, build in ./build/${build_type}
 subdir=false
+# build in ./build/${dirname}
+dirname=
 # extra arguments for cmake
 cmake_args=()
 # source directory
@@ -86,6 +89,10 @@ while test $# -gt 0; do
          cmake_output="NMake Makefiles"
          shift
          ;;
+      --dirname)
+         dirname=$2
+         shift 2
+         ;;
       --subdir)
          subdir=true
          shift
@@ -102,6 +109,9 @@ while test $# -gt 0; do
          shift
          break
          ;;
+      -C*|-D*|-U*|-G*|-W*|-E|-i|-L*|-N|-P*) # recognized args
+         break
+         ;;
       *)  # unrecognized arg; pass this and rest on to cmake
          echo "Unrecognized option $1.  Passing on to cmake." >&2
          break
@@ -119,8 +129,12 @@ if ! test -f CMakeLists.txt; then
 fi
 
 if ${subdir}; then
-   builddir=./build/${platform}/${build_type}
-   srcdir=../../..
+   dirname=${build_type}
+fi
+
+if test ${dirname}; then
+   builddir=./build/${dirname}
+   srcdir=../..
 fi
 
 mkdir -p ${builddir}

-----------------------------------------------------------------------


-- 
asterisk-scf/release/cmake.git



More information about the asterisk-scf-commits mailing list