Author: astitcher
Date: Fri Jun 27 15:57:47 2014
New Revision: 1606140

URL: http://svn.apache.org/r1606140
Log:
QPID-619: Make config.sh work for all build trees

Added:
    qpid/proton/trunk/config.sh.in
      - copied, changed from r1606012, qpid/proton/trunk/config.sh
Removed:
    qpid/proton/trunk/config.sh
Modified:
    qpid/proton/trunk/CMakeLists.txt
    qpid/proton/trunk/DEVELOPERS
    qpid/proton/trunk/config.bat.in

Modified: qpid/proton/trunk/CMakeLists.txt
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/CMakeLists.txt?rev=1606140&r1=1606139&r2=1606140&view=diff
==============================================================================
--- qpid/proton/trunk/CMakeLists.txt (original)
+++ qpid/proton/trunk/CMakeLists.txt Fri Jun 27 15:57:47 2014
@@ -154,7 +154,7 @@ else (JAVA_FOUND AND MAVEN_EXE)
 endif (JAVA_FOUND AND MAVEN_EXE)
 
 # Generate test environment settings
-if (WIN32)
-    configure_file(${CMAKE_HOME_DIRECTORY}/config.bat.in
-                   ${CMAKE_BINARY_DIR}/config.bat @ONLY)
-endif (WIN32)
\ No newline at end of file
+configure_file(${CMAKE_SOURCE_DIR}/config.sh.in
+               ${CMAKE_BINARY_DIR}/config.sh @ONLY)
+configure_file(${CMAKE_SOURCE_DIR}/config.bat.in
+               ${CMAKE_BINARY_DIR}/config.bat @ONLY)

Modified: qpid/proton/trunk/DEVELOPERS
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/DEVELOPERS?rev=1606140&r1=1606139&r2=1606140&view=diff
==============================================================================
--- qpid/proton/trunk/DEVELOPERS (original)
+++ qpid/proton/trunk/DEVELOPERS Fri Jun 27 15:57:47 2014
@@ -5,32 +5,15 @@ DEVELOPMENT ENVIRONMENT
 =======================
 
 To setup the variables for your development environment, simply source
-the file $REPO/config.sh:
+the file $BLDDIR/config.sh [$BLDDIR points to the proton build directory]:
 
   $ source config.sh
 
 This file sets the needed environment variables for all supported dynamic
-languages (Python, Perl, Ruby, PHP) as well as for Java and for testing. It,
-by default, assumes that you're building Proton in the directory:
-
-  $REPO/build
-
-where $REPO points the location where the Proton Subversion or Git repo has
-been checked out.
-
-If, however, you use a different location for your build files, then you'll 
want
-to set the environment variable CPROTON_BUILD to point to it first. So, for
-example, if you're building in:
-
-  /home/yourname/devel/proton/cmake
-
-then you would have the following environment variable set:
-
-  $ export CPROTON_BUILD=/hojme/yourname/devel/proton/cmake/proton-c
-
-NOTE: You need to point the environment variable to the proton-c directory 
under
-where your build is done.
+languages (Python, Perl, Ruby, PHP) as well as for Java and for testing.
 
+You will need to have set up the build directory first with cmake before the 
file
+will exist (see the instructions in README).
 
 
 MAILING LIST

Modified: qpid/proton/trunk/config.bat.in
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/config.bat.in?rev=1606140&r1=1606139&r2=1606140&view=diff
==============================================================================
--- qpid/proton/trunk/config.bat.in (original)
+++ qpid/proton/trunk/config.bat.in Fri Jun 27 15:57:47 2014
@@ -27,7 +27,7 @@ SET PROTON_BUILD_CONFIGURATION=relwithde
 REM PROTON_HOME  is the root of the proton checkout
 REM PROTON_BUILD is where cmake was run
 
-set PROTON_HOME=@CMAKE_HOME_DIRECTORY@
+set PROTON_HOME=@CMAKE_SOURCE_DIR@
 set PROTON_BUILD=@CMAKE_BINARY_DIR@
 
 set PROTON_HOME=%PROTON_HOME:/=\%

Copied: qpid/proton/trunk/config.sh.in (from r1606012, 
qpid/proton/trunk/config.sh)
URL: 
http://svn.apache.org/viewvc/qpid/proton/trunk/config.sh.in?p2=qpid/proton/trunk/config.sh.in&p1=qpid/proton/trunk/config.sh&r1=1606012&r2=1606140&rev=1606140&view=diff
==============================================================================
--- qpid/proton/trunk/config.sh (original)
+++ qpid/proton/trunk/config.sh.in Fri Jun 27 15:57:47 2014
@@ -18,34 +18,24 @@
 # under the License.
 #
 
-cd $(dirname ${BASH_SOURCE[0]}) > /dev/null
-export PROTON_HOME=$(pwd)
-cd - > /dev/null
-
-if [ -z "$CPROTON_BUILD" ]; then
-    if [ -d $PROTON_HOME/build/proton-c ]; then
-        PROTON_BINDINGS=$PROTON_HOME/build/proton-c/bindings
-    else
-        PROTON_BINDINGS=$PROTON_HOME/proton-c/bindings
-    fi
-    if [ -d $PROTON_HOME/build/proton-j ]; then
-        PROTON_JARS=$PROTON_HOME/build/proton-j/proton-j.jar
-    else
-        PROTON_JARS=$PROTON_HOME/proton-j/proton-j.jar
-    fi
-else
-    PROTON_BINDINGS=$CPROTON_BUILD/bindings
-fi
+PROTON_HOME=@CMAKE_SOURCE_DIR@
+PROTON_BUILD=@CMAKE_BINARY_DIR@
+
+PROTON_BINDINGS=$PROTON_BUILD/proton-c/bindings
+PROTON_JARS=$PROTON_BUILD/proton-j/proton-j.jar
+
+PYTHON_BINDINGS=$PROTON_BINDINGS/python
+PHP_BINDINGS=$PROTON_BINDINGS/php
+RUBY_BINDINGS=$PROTON_BINDINGS/ruby
+PERL_BINDINGS=$PROTON_BINDINGS/perl
 
 # Python & Jython
-export PYTHON_BINDINGS=$PROTON_BINDINGS/python
-export 
COMMON_PYPATH=$PROTON_HOME/tests/python:$PROTON_HOME/proton-c/bindings/python
+COMMON_PYPATH=$PROTON_HOME/tests/python:$PROTON_HOME/proton-c/bindings/python
 export PYTHONPATH=$COMMON_PYPATH:$PYTHON_BINDINGS
 export 
JYTHONPATH=$COMMON_PYPATH:$PROTON_HOME/proton-j/src/main/resources:$PROTON_JARS
 export CLASSPATH=$PROTON_JARS
 
 # PHP
-export PHP_BINDINGS=$PROTON_BINDINGS/php
 if [ -d $PHP_BINDINGS ]; then
     cat <<EOF > $PHP_BINDINGS/php.ini
 include_path="$PHP_BINDINGS:$PROTON_HOME/proton-c/bindings/php"
@@ -55,22 +45,14 @@ EOF
 fi
 
 # Ruby
-export RUBY_BINDINGS=$PROTON_BINDINGS/ruby
 export 
RUBYLIB=$RUBY_BINDINGS:$PROTON_HOME/proton-c/bindings/ruby/lib:$PROTON_HOME/tests/ruby
 
 # Perl
-export PERL_BINDINGS=$PROTON_BINDINGS/perl
 export 
PERL5LIB=$PERL5LIB:$PERL_BINDINGS:$PROTON_HOME/proton-c/bindings/perl/lib
 
 # test applications
-if [ -d $PROTON_HOME/build/tests/tools/apps/c ]; then
-    export PATH="$PATH:$PROTON_HOME/build/tests/tools/apps/c"
-fi
-if [ -d $PROTON_HOME/tests/tools/apps/python ]; then
-    export PATH="$PATH:$PROTON_HOME/tests/tools/apps/python"
-fi
-
-# test applications
+export PATH="$PATH:$PROTON_BUILD/tests/tools/apps/c"
+export PATH="$PATH:$PROTON_HOME/tests/tools/apps/python"
 export PATH="$PATH:$PROTON_HOME/tests/python"
 
 # can the test harness use valgrind?



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to