From f26f1ff656e815b41a1f18c621f0548ebe9ae625 Mon Sep 17 00:00:00 2001 From: RĂ¼diger Timm Date: Tue, 29 Mar 2005 11:03:14 +0000 Subject: INTEGRATION: CWS sdkbugfix02 (1.3.2); FILE MERGED 2005/03/18 09:29:48 jsc 1.3.2.4: #i39684# adapt path to config.guess to work from everywhere, not only in sdk root dir 2005/03/17 13:57:40 jsc 1.3.2.3: #i41147# adapt platform check 2005/03/17 09:34:31 jsc 1.3.2.2: RESYNC: (1.3-1.4); FILE MERGED 2005/03/16 16:07:20 jsc 1.3.2.1: #120223# insert some checks if cpp compiler is not set --- odk/setsdkenv_unix.csh.in | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) (limited to 'odk/setsdkenv_unix.csh.in') diff --git a/odk/setsdkenv_unix.csh.in b/odk/setsdkenv_unix.csh.in index 16d471ee0092..d4ff4bdee05b 100644 --- a/odk/setsdkenv_unix.csh.in +++ b/odk/setsdkenv_unix.csh.in @@ -3,6 +3,9 @@ # This script sets all enviroment variables, which are necessary for building # the examples of the Office Development Kit. # The Script was developed for the operating systems Solaris and Linux. +set setscript=`history 1 | sed "s/.*source //"` +set sdkdir=`dirname ${bla}` +unset setscript # The SDK name setenv OO_SDK_NAME @OO_SDK_NAME@ @@ -56,9 +59,9 @@ if ( $?OO_SDK_OUTPUT_DIR ) then endif # check platform and set appropriate variables -switch (`./config.guess | cut -d"-" -f3,4`) +switch (`${sdkdir}/config.guess | cut -d"-" -f3,4`) case "solaris*": - if ( `./config.guess | cut -d"-" -f1` == "sparc" ) then + if ( `${sdkdir}/config.guess | cut -d"-" -f1` == "sparc" ) then set directoryname=solsparc set platform=Solaris Sparc else @@ -74,9 +77,12 @@ switch (`./config.guess | cut -d"-" -f3,4`) setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/${directoryname}/lib:${OO_EXAMPLE_OUT}/${exampleout}/lib:${OFFICE_PROGRAM_PATH}:.:${LD_LIBRARY_PATH} endif breaksw + case "linux-gnu": - set sdk_gxx_include_path=`echo "#include " | ${OO_SDK_CPP_HOME}/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` - setenv SDK_GXX_INCLUDE_PATH ${sdk_gxx_include_path} + if ( $?OO_SDK_CPP_HOME == 0) then + set sdk_gxx_include_path=`echo "#include " | ${OO_SDK_CPP_HOME}/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` + setenv SDK_GXX_INCLUDE_PATH ${sdk_gxx_include_path} + endif set directoryname=linux set exampleout=LINUXexample.out @@ -89,9 +95,12 @@ switch (`./config.guess | cut -d"-" -f3,4`) setenv LD_LIBRARY_PATH ${OO_SDK_HOME}/${directoryname}/lib:${OO_EXAMPLE_OUT}/${exampleout}/lib:${OFFICE_PROGRAM_PATH}:.:${LD_LIBRARY_PATH} endif breaksw + case "darwin": - set sdk_gxx_include_path=`echo "#include " | ${OO_SDK_CPP_HOME}/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` - setenv SDK_GXX_INCLUDE_PATH ${sdk_gxx_include_path} + if ( $?OO_SDK_CPP_HOME == 0) then + set sdk_gxx_include_path=`echo "#include " | ${OO_SDK_CPP_HOME}/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` + setenv SDK_GXX_INCLUDE_PATH ${sdk_gxx_include_path} + endif set directoryname=macosx set exampleout=MACOSXexample.out @@ -104,9 +113,12 @@ switch (`./config.guess | cut -d"-" -f3,4`) setenv DYLD_LIBRARY_PATH ${OO_SDK_HOME}/${directoryname}/lib:${OO_EXAMPLE_OUT}/${exampleout}/lib:${OFFICE_PROGRAM_PATH}:.:${DYLD_LIBRARY_PATH} endif breaksw + case "freebsd": - set sdk_gxx_include_path=`echo "#include " | ${OO_SDK_CPP_HOME}/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` - setenv SDK_GXX_INCLUDE_PATH ${sdk_gxx_include_path} + if ( $?OO_SDK_CPP_HOME == 0) then + set sdk_gxx_include_path=`echo "#include " | ${OO_SDK_CPP_HOME}/g++ -E -xc++ - | sed -n '/.*1*"\(.*\)\/cstring".*/s//\1/p' | head -n 1` + setenv SDK_GXX_INCLUDE_PATH ${sdk_gxx_include_path} + endif set directoryname=freebsd set exampleout=FREEBSDexample.out @@ -190,6 +202,7 @@ echo " * Auto deployment = ${SDK_AUTO_DEPLOYMENT}" echo " *" echo " ************************************************************************" +unset sdkdir unset directoryname unset exampleout unset platform -- cgit