diff --git a/jenkins_build.sh b/jenkins_build.sh index 93b4c03a..65524414 100755 --- a/jenkins_build.sh +++ b/jenkins_build.sh @@ -2,9 +2,9 @@ ## # jenkins_build.sh -# called by jenkins to build/test exiv2 +# called by jenkins to build/test exiv2 # - jenkins sets environment variables -# called from terminal +# called from terminal # - script has build-in defaults for some environment variable # # arguments: @@ -31,7 +31,7 @@ run_tests() { fi } -thepath () { +thepath () { if [ -d $1 ]; then ( cd $1; pwd ); @@ -84,7 +84,7 @@ fi echo "1 target = $target platform = $PLATFORM WORKSPACE = $WORKSPACE" if [ $PLATFORM == "macosx" -a -z "$macosx" ]; then export macosx=true ; export target=macosx ; fi if [ $PLATFORM == "linux" -a -z "$linux" ]; then export linux=true ; export target=linux ; fi -if [ -z "$cygwin" -a ! -z "$CYGWIN" ]; then export cygwin=$CYGWIN ; fi +if [ -z "$cygwin" -a ! -z "$CYGWIN" ]; then export cygwin=$CYGWIN ; fi if [ -z "$tests" ]; then export tests=true ; fi if [ -z "$WORKSPACE" ]; then export WORKSPACE="$0/$PLATFORM" ; fi @@ -143,12 +143,12 @@ echo ---- end of path and perl ---- case "$build" in - UNIX) + UNIX) echo ./configure --prefix=$PWD/usr $withcurl $withssh ./configure "--prefix=$PWD/usr" $withcurl $withssh - make -j4 "LDFLAGS=-L${PWD}/usr/lib -L${PWD}/xmpsdk/src/.libs" + make -j "LDFLAGS=-L${PWD}/usr/lib -L${PWD}/xmpsdk/src/.libs" make install - make -j4 samples "CXXFLAGS=-I${PWD}/usr/include -I${PWD}/src" "LDFLAGS=-L${PWD}/usr/lib -L${PWD}/xmpsdk/src/.libs -lexiv2" + make -j samples "CXXFLAGS=-I${PWD}/usr/include -I${PWD}/src" "LDFLAGS=-L${PWD}/usr/lib -L${PWD}/xmpsdk/src/.libs -lexiv2" result=$? run_tests "$PWD/usr/bin/exiv2" -v -V @@ -162,24 +162,24 @@ case "$build" in # 2 trying to get Cygwin to install into a local directory # deal with 32bit and 64bit build requests - # Jenkins invokes the 32 bit cygwin, so recursively build 64 bits. + # Jenkins invokes the 32 bit cygwin, so recursively build 64 bits. make clean rm -rf config.log config.status echo ./configure ${withcurl} ${withssh} --disable-nls - ./configure ${withcurl} ${withssh} --disable-nls - make -j4 + ./configure ${withcurl} ${withssh} --disable-nls + make -j make install - make -j4 samples + make -j samples run_tests /usr/local/bin/exiv2 -v -V result=$? else - if [ "$x64" == true ]; then + if [ "$x64" == true ]; then export RECURSIVE=1 /cygdrive/c/cygwin64/bin/bash.exe -c "cd $PWD ; ./$0" result=$? fi - if [ "$Win32" == true ]; then + if [ "$Win32" == true ]; then export RECURSIVE=1 /cygdrive/c/cygwin/bin/bash.exe -c "cd $PWD ; ./$0" result=$? @@ -187,7 +187,7 @@ case "$build" in fi ;; - MING) + MING) if [ ! -z "$RECURSIVE" ]; then export CC=$(which gcc) export CXX=$(which g++) @@ -215,7 +215,7 @@ case "$build" in fi ./configure $withcurl $withssh - make # DO NOT USE -j4. It seems to hang the build! + make # DO NOT USE -j. It seems to hang the build! make install make samples run_tests @@ -227,11 +227,11 @@ case "$build" in export TEMP=$TMP export RECURSIVE=1 # recursively invoke MinGW/bash with appropriate tool chain - if [ "$x64" == true ]; then + if [ "$x64" == true ]; then /cygdrive/c/MinGW64/msys/1.0/bin/bash.exe -c "export PATH=/c/TDM-GCC-64/bin:/c/MinGW64/bin:/c/MinGW64/msys/1.0/bin:/c/MinGW64/msys/1.0/local/bin; $0" result=$? fi - if [ "$Win32" == true ]; then + if [ "$Win32" == true ]; then /cygdrive/c/MinGW/msys/1.0/bin/bash.exe -c "export PATH=/c/MinGW/bin:/c/MinGW/msys/1.0/bin:/c/MinGW/msys/1.0/local/bin; $0" result=$? fi @@ -239,7 +239,7 @@ case "$build" in ######################################### ## #!/bin/bash ## # mingw32.sh -## # invoke 32bit MinGW bash +## # invoke 32bit MinGW bash ## # ## export "PATH=c:\\MinGW\\bin;c:\\MinGW\\msys\\1.0\\bin;C:\\MinGW\\msys\\1.0\\local\\bin;" ## /cygdrive/c/MinGW/msys/1.0/bin/bash.exe $* @@ -264,7 +264,7 @@ case "$build" in ## see http://clanmills.com/exiv2/mingw.shtml about 64bit build ## Install a fresh (32 bit) mingw/msys into c:\MinGW64 ## install the 64 bit compiler from: http://tdm-gcc.tdragon.net -## I used the "on-demand" installer and "Create" put the tools in c:\TDM-GCC-64. The main change is to add the 64 bit compilers to the path BEFORE the 32 bit compilers. +## I used the "on-demand" installer and "Create" put the tools in c:\TDM-GCC-64. The main change is to add the 64 bit compilers to the path BEFORE the 32 bit compilers. ## set PATH=c:\TDM-GCC-64\bin;c:\MinGW\bin;c:\MinGW\msys\1.0\bin;C:\MinGW\msys\1.0\local\bin; ## ## keep MinGW64 for 64 bit builds and /usr/lib has 64bit libraries @@ -297,7 +297,7 @@ case "$build" in fi ;; - MSVC) + MSVC) rm -rf $PWD/bin mkdir $PWD/bin @@ -306,12 +306,12 @@ case "$build" in result=$? ;; - NONE) + NONE) echo "**************************************" echo "*** no build requested for $target ***" if [ "$target" == "cygwin" ]; then echo try export CYGWIN=true and run $(basename $0) again ; fi echo "**************************************" - ;; + ;; esac echo target "$target" start: "$start" finish: $(date) diff: $(( $(date +%s) - starts )) seconds