From c896a9b4743d7ac0177a6a6e19c804db0695b6b2 Mon Sep 17 00:00:00 2001 From: Aleksandar Fabijanic Date: Thu, 19 Jun 2008 01:36:45 +0000 Subject: [PATCH] added listing of available configurations for --help and when non-existing config is specified replaced build_vs71.cmd and build_vs80.cmd with buildwin.cmd --- configure | 14 ++- dist/build_vs71.cmd | 50 ---------- dist/build_vs80.cmd | 50 ---------- dist/buildwin.cmd | 226 ++++++++++++++++++++++++++++++++++++++++++++ dist/configure | 19 ++-- 5 files changed, 248 insertions(+), 111 deletions(-) delete mode 100755 dist/build_vs71.cmd delete mode 100755 dist/build_vs80.cmd create mode 100644 dist/buildwin.cmd diff --git a/configure b/configure index 2c9b2d761..3f05b577c 100755 --- a/configure +++ b/configure @@ -24,7 +24,9 @@ Options: --config= Use the given build configuration. - See $base/build/config for possible configs. + Available configurations are: + +`ls -C $base/build/config/` --prefix= Use the given install directory for make install. @@ -120,9 +122,13 @@ if [ "$config" = "" ] ; then fi if [ ! -f "$base/build/config/$config" ] ; then - echo "Unknown configuration: $config" - echo "Please use the --config option to specify another build configuration" - exit 1 + echo "Unknown configuration: $config" + echo "Please use the --config= option." + echo "The can be one of the following:" + echo "" + echo "`ls -C $base/build/config/`" + echo "" + exit 1 fi if [ "$prefix" = "" ] ; then diff --git a/dist/build_vs71.cmd b/dist/build_vs71.cmd deleted file mode 100755 index 5e17c94ff..000000000 --- a/dist/build_vs71.cmd +++ /dev/null @@ -1,50 +0,0 @@ -@echo off - -rem -rem build.cmd -rem -rem $Id: //poco/1.3/dist/build_vs71.cmd#1 $ -rem -rem command-line build script for VS 7.1 -rem - -cd CppUnit -devenv /useenv /rebuild debug_shared CppUnit_vs71.sln -devenv /useenv /rebuild release_shared CppUnit_vs71.sln -cd .. - -cd Foundation -devenv /useenv /rebuild debug_shared Foundation_vs71.sln -devenv /useenv /rebuild release_shared Foundation_vs71.sln -cd samples -devenv /useenv /rebuild debug_shared samples_vs71.sln -devenv /useenv /rebuild release_shared samples_vs71.sln -cd .. -cd .. - -cd XML -devenv /useenv /rebuild debug_shared XML_vs71.sln -devenv /useenv /rebuild release_shared XML_vs71.sln -cd samples -devenv /useenv /rebuild debug_shared samples_vs71.sln -devenv /useenv /rebuild release_shared samples_vs71.sln -cd .. -cd .. - -cd Util -devenv /useenv /rebuild debug_shared Util_vs71.sln -devenv /useenv /rebuild release_shared Util_vs71.sln -cd samples -devenv /useenv /rebuild debug_shared samples_vs71.sln -devenv /useenv /rebuild release_shared samples_vs71.sln -cd .. -cd .. - -cd Net -devenv /useenv /rebuild debug_shared Net_vs71.sln -devenv /useenv /rebuild release_shared Net_vs71.sln -cd samples -devenv /useenv /rebuild debug_shared samples_vs71.sln -devenv /useenv /rebuild release_shared samples_vs71.sln -cd .. -cd .. diff --git a/dist/build_vs80.cmd b/dist/build_vs80.cmd deleted file mode 100755 index 18d5cd176..000000000 --- a/dist/build_vs80.cmd +++ /dev/null @@ -1,50 +0,0 @@ -@echo off - -rem -rem build.cmd -rem -rem $Id: //poco/1.3/dist/build_vs80.cmd#1 $ -rem -rem command-line build script for VS 8.0 -rem - -cd CppUnit -devenv /useenv /rebuild debug_shared CppUnit_vs80.sln -devenv /useenv /rebuild release_shared CppUnit_vs80.sln -cd .. - -cd Foundation -devenv /useenv /rebuild debug_shared Foundation_vs80.sln -devenv /useenv /rebuild release_shared Foundation_vs80.sln -cd samples -devenv /useenv /rebuild debug_shared samples_vs80.sln -devenv /useenv /rebuild release_shared samples_vs80.sln -cd .. -cd .. - -cd XML -devenv /useenv /rebuild debug_shared XML_vs80.sln -devenv /useenv /rebuild release_shared XML_vs80.sln -cd samples -devenv /useenv /rebuild debug_shared samples_vs80.sln -devenv /useenv /rebuild release_shared samples_vs80.sln -cd .. -cd .. - -cd Util -devenv /useenv /rebuild debug_shared Util_vs80.sln -devenv /useenv /rebuild release_shared Util_vs80.sln -cd samples -devenv /useenv /rebuild debug_shared samples_vs80.sln -devenv /useenv /rebuild release_shared samples_vs80.sln -cd .. -cd .. - -cd Net -devenv /useenv /rebuild debug_shared Net_vs80.sln -devenv /useenv /rebuild release_shared Net_vs80.sln -cd samples -devenv /useenv /rebuild debug_shared samples_vs80.sln -devenv /useenv /rebuild release_shared samples_vs80.sln -cd .. -cd .. diff --git a/dist/buildwin.cmd b/dist/buildwin.cmd new file mode 100644 index 000000000..aa00f1412 --- /dev/null +++ b/dist/buildwin.cmd @@ -0,0 +1,226 @@ +@echo off + +rem +rem buildwin.cmd +rem +rem command-line build script for MS Visual Studio +rem +rem Usage: +rem ------ +rem buildwin VS_VERSION LINKMODE CONFIGURATION SAMPLES +rem buildwin {71|80|90} [static|shared|both] [release|debug|both] [yes|no] +rem +rem VS_VERSION is required argument. Default is build all. + +rem Change OPENSSL_DIR to match your setup +set OPENSSL_DIR=c:\OpenSSL +set OPENSSL_INCLUDE=%OPENSSL_DIR%\include +set OPENSSL_LIB=%OPENSSL_DIR%\lib\VC +set INCLUDE=%INCLUDE%;%OPENSSL_INCLUDE% +set LIB=%LIB%;%OPENSSL_LIB% + +set POCOBASE=%CD% + +rem VS version {71|80|90} +if "%1"=="" goto usage +set VS_VERSION=vs%1 + +rem Action [build|rebuild|clean] +set ACTION=%2 +if not "%ACTION%"=="build" ( +if not "%ACTION%"=="rebuild" ( +if not "%ACTION%"=="clean" goto usage)) + +rem Link mode [static|shared|both] +set LINK_MODE=%3 +if not "%LINK_MODE%"=="static" ( +if not "%LINK_MODE%"=="shared" ( +if not "%LINK_MODE%"=="" ( +if not "%LINK_MODE%"=="both" goto usage))) + +rem Configuration [release|debug|both] +set CONFIGURATION=%4 +if not "%CONFIGURATION%"=="release" ( +if not "%CONFIGURATION%"=="debug" ( +if not "%CONFIGURATION%"=="" ( +if not "%CONFIGURATION%"=="both" goto usage))) + +rem Samples [yes|no] +set SAMPLES=%5 +if "%SAMPLES%"=="" (set SAMPLES=yes) + +set RELEASE_SHARED=0 +set DEBUG_SHARED=0 +set DEBUG_STATIC=0 +set RELEASE_STATIC=0 + +if "%LINK_MODE%"=="shared" ( +if "%CONFIGURATION%"=="release" (set RELEASE_SHARED=1) else ( +if "%CONFIGURATION%"=="both" (set RELEASE_SHARED=1) else ( +if "%CONFIGURATION%"=="" (set RELEASE_SHARED=1)))) + +if "%LINK_MODE%"=="shared" ( +if "%CONFIGURATION%"=="debug" (set DEBUG_SHARED=1) else ( +if "%CONFIGURATION%"=="both" (set DEBUG_SHARED=1) else ( +if "%CONFIGURATION%"=="" (set DEBUG_SHARED=1)))) + +if "%LINK_MODE%"=="static" ( +if "%CONFIGURATION%"=="release" (set RELEASE_STATIC=1) else ( +if "%CONFIGURATION%"=="both" (set RELEASE_STATIC=1) else ( +if "%CONFIGURATION%"=="" (set RELEASE_STATIC=1)))) + +if "%LINK_MODE%"=="static" ( +if "%CONFIGURATION%"=="debug" (set DEBUG_STATIC=1) else ( +if "%CONFIGURATION%"=="both" (set DEBUG_STATIC=1) else ( +if "%CONFIGURATION%"=="" (set DEBUG_STATIC=1)))) + +if "%LINK_MODE%"=="both" ( +if "%CONFIGURATION%"=="debug" ( +set DEBUG_STATIC=1 +set DEBUG_SHARED=1) else ( +if "%CONFIGURATION%"=="release" ( +set RELEASE_STATIC=1 +set RELEASE_SHARED=1) else ( +if "%CONFIGURATION%"=="both" ( +set DEBUG_STATIC=1 +set DEBUG_SHARED=1 +set RELEASE_STATIC=1 +set RELEASE_SHARED=1) else ( +if "%CONFIGURATION%"=="" ( +set DEBUG_STATIC=1 +set DEBUG_SHARED=1 +set RELEASE_STATIC=1 +set RELEASE_SHARED=1))))) + +if "%LINK_MODE%"=="" ( +if "%CONFIGURATION%"=="debug" ( +set DEBUG_STATIC=1 +set DEBUG_SHARED=1) else ( +if "%CONFIGURATION%"=="release" ( +set RELEASE_STATIC=1 +set RELEASE_SHARED=1) else ( +if "%CONFIGURATION%"=="both" ( +set DEBUG_STATIC=1 +set DEBUG_SHARED=1 +set RELEASE_STATIC=1 +set RELEASE_SHARED=1) else ( +if "%CONFIGURATION%"=="" ( +set DEBUG_STATIC=1 +set DEBUG_SHARED=1 +set RELEASE_STATIC=1 +set RELEASE_SHARED=1))))) + +cd CppUnit +if %DEBUG_SHARED%==1 (devenv /useenv /%ACTION% debug_shared CppUnit_%VS_VERSION%.sln) +if %RELEASE_SHARED%==1 (devenv /useenv /%ACTION% release_shared CppUnit_%VS_VERSION%.sln) +if %DEBUG_STATIC%==1 (devenv /useenv /%ACTION% debug_static CppUnit_%VS_VERSION%.sln) +if %RELEASE_STATIC%==1 (devenv /useenv /%ACTION% release_static CppUnit_%VS_VERSION%.sln) +cd %POCOBASE% + +cd Foundation +if %DEBUG_SHARED%==1 devenv /useenv /%ACTION% debug_shared Foundation_%VS_VERSION%.sln +if %RELEASE_SHARED%==1 devenv /useenv /%ACTION% release_shared Foundation_%VS_VERSION%.sln +if %DEBUG_STATIC%==1 devenv /useenv /%ACTION% debug_static Foundation_%VS_VERSION%.sln +if %RELEASE_STATIC%==1 devenv /useenv /%ACTION% release_static Foundation_%VS_VERSION%.sln +cd %POCOBASE% + +cd XML +if %DEBUG_SHARED%==1 devenv /useenv /%ACTION% debug_shared XML_%VS_VERSION%.sln +if %RELEASE_SHARED%==1 devenv /useenv /%ACTION% release_shared XML_%VS_VERSION%.sln +if %DEBUG_STATIC%==1 devenv /useenv /%ACTION% debug_static XML_%VS_VERSION%.sln +if %RELEASE_STATIC%==1 devenv /useenv /%ACTION% release_static XML_%VS_VERSION%.sln +cd %POCOBASE% + +cd Util +if %DEBUG_SHARED%==1 devenv /useenv /%ACTION% debug_shared Util_%VS_VERSION%.sln +if %RELEASE_SHARED%==1 devenv /useenv /%ACTION% release_shared Util_%VS_VERSION%.sln +if %DEBUG_STATIC%==1 devenv /useenv /%ACTION% debug_static Util_%VS_VERSION%.sln +if %RELEASE_STATIC%==1 devenv /useenv /%ACTION% release_static Util_%VS_VERSION%.sln +cd %POCOBASE% + +cd Net +if %DEBUG_SHARED%==1 devenv /useenv /%ACTION% debug_shared Net_%VS_VERSION%.sln +if %RELEASE_SHARED%==1 devenv /useenv /%ACTION% release_shared Net_%VS_VERSION%.sln +if %DEBUG_STATIC%==1 devenv /useenv /%ACTION% debug_static Net_%VS_VERSION%.sln +if %RELEASE_STATIC%==1 devenv /useenv /%ACTION% release_static Net_%VS_VERSION%.sln +cd %POCOBASE% + +cd NetSSL_OpenSSL +if %DEBUG_SHARED%==1 devenv /useenv /%ACTION% debug_shared NetSSL_OpenSSL_%VS_VERSION%.sln +if %RELEASE_SHARED%==1 devenv /useenv /%ACTION% release_shared NetSSL_OpenSSL_%VS_VERSION%.sln +if %DEBUG_STATIC%==1 devenv /useenv /%ACTION% debug_static NetSSL_OpenSSL_%VS_VERSION%.sln +if %RELEASE_STATIC%==1 devenv /useenv /%ACTION% release_static NetSSL_OpenSSL_%VS_VERSION%.sln +cd %POCOBASE% + +cd Data +if %DEBUG_SHARED%==1 devenv /useenv /%ACTION% debug_shared Data_%VS_VERSION%.sln +if %RELEASE_SHARED%==1 devenv /useenv /%ACTION% release_shared Data_%VS_VERSION%.sln +if %DEBUG_STATIC%==1 devenv /useenv /%ACTION% debug_static Data_%VS_VERSION%.sln +if %RELEASE_STATIC%==1 devenv /useenv /%ACTION% release_static Data_%VS_VERSION%.sln +cd %POCOBASE% + +cd Data/SQLite +if %DEBUG_SHARED%==1 devenv /useenv /%ACTION% debug_shared SQLite_%VS_VERSION%.sln +if %RELEASE_SHARED%==1 devenv /useenv /%ACTION% release_shared SQLite_%VS_VERSION%.sln +if %DEBUG_STATIC%==1 devenv /useenv /%ACTION% debug_static SQLite_%VS_VERSION%.sln +if %RELEASE_STATIC%==1 devenv /useenv /%ACTION% release_static SQLite_%VS_VERSION%.sln +cd %POCOBASE% + +cd Data/ODBC +if %DEBUG_SHARED%==1 devenv /useenv /%ACTION% debug_shared ODBC_%VS_VERSION%.sln +if %RELEASE_SHARED%==1 devenv /useenv /%ACTION% release_shared ODBC_%VS_VERSION%.sln +if %DEBUG_STATIC%==1 devenv /useenv /%ACTION% debug_static ODBC_%VS_VERSION%.sln +if %RELEASE_STATIC%==1 devenv /useenv /%ACTION% release_static ODBC_%VS_VERSION%.sln +cd %POCOBASE% + +if "%SAMPLES%"=="no" goto :EOF + +cd Foundation/samples +if %DEBUG_SHARED%==1 devenv /useenv /%ACTION% debug_shared samples_%VS_VERSION%.sln +if %RELEASE_SHARED%==1 devenv /useenv /%ACTION% release_shared samples_%VS_VERSION%.sln +if %DEBUG_STATIC%==1 devenv /useenv /%ACTION% debug_static samples_%VS_VERSION%.sln +if %RELEASE_STATIC%==1 devenv /useenv /%ACTION% release_static samples_%VS_VERSION%.sln +cd %POCOBASE% + +cd XML/samples +if %DEBUG_SHARED%==1 devenv /useenv /%ACTION% debug_shared samples_%VS_VERSION%.sln +if %RELEASE_SHARED%==1 devenv /useenv /%ACTION% release_shared samples_%VS_VERSION%.sln +if %DEBUG_STATIC%==1 devenv /useenv /%ACTION% debug_static samples_%VS_VERSION%.sln +if %RELEASE_STATIC%==1 devenv /useenv /%ACTION% release_static samples_%VS_VERSION%.sln +cd %POCOBASE% + +cd Util/samples +if %DEBUG_SHARED%==1 devenv /useenv /%ACTION% debug_shared samples_%VS_VERSION%.sln +if %RELEASE_SHARED%==1 devenv /useenv /%ACTION% release_shared samples_%VS_VERSION%.sln +if %DEBUG_STATIC%==1 devenv /useenv /%ACTION% debug_static samples_%VS_VERSION%.sln +if %RELEASE_STATIC%==1 devenv /useenv /%ACTION% release_static samples_%VS_VERSION%.sln +cd %POCOBASE% + +cd Net/samples +if %DEBUG_SHARED%==1 devenv /useenv /%ACTION% debug_shared samples_%VS_VERSION%.sln +if %RELEASE_SHARED%==1 devenv /useenv /%ACTION% release_shared samples_%VS_VERSION%.sln +if %DEBUG_STATIC%==1 devenv /useenv /%ACTION% debug_static samples_%VS_VERSION%.sln +if %RELEASE_STATIC%==1 devenv /useenv /%ACTION% release_static samples_%VS_VERSION%.sln +cd %POCOBASE% + +cd NetSSL_OpenSSL/samples +if %DEBUG_SHARED%==1 devenv /useenv /%ACTION% debug_shared samples_%VS_VERSION%.sln +if %RELEASE_SHARED%==1 devenv /useenv /%ACTION% release_shared samples_%VS_VERSION%.sln +if %DEBUG_STATIC%==1 devenv /useenv /%ACTION% debug_static samples_%VS_VERSION%.sln +if %RELEASE_STATIC%==1 devenv /useenv /%ACTION% release_static samples_%VS_VERSION%.sln +cd %POCOBASE% + +cd Data/samples +if %DEBUG_SHARED%==1 devenv /useenv /%ACTION% debug_shared samples_%VS_VERSION%.sln +if %RELEASE_SHARED%==1 devenv /useenv /%ACTION% release_shared samples_%VS_VERSION%.sln +if %DEBUG_STATIC%==1 devenv /useenv /%ACTION% debug_static samples_%VS_VERSION%.sln +if %RELEASE_STATIC%==1 devenv /useenv /%ACTION% release_static samples_%VS_VERSION%.sln +cd %POCOBASE% + +goto :EOF + +:usage +echo Usage: +echo ------ +echo buildwin VS_VERSION ACTION [LINKMODE] [CONFIGURATION] [SAMPLES] +echo "buildwin {71|80|90} [build|rebuild|clean] [static|shared|both] [release|debug|both] [yes|no]" \ No newline at end of file diff --git a/dist/configure b/dist/configure index da80cc3b2..3f05b577c 100755 --- a/dist/configure +++ b/dist/configure @@ -12,9 +12,9 @@ # Specify --help to display supported options. # -showhelp() +showhelp () { -cat << ENDHELP +cat << ENDHELP usage: configure {options} Configure the POCO C++ Libraries. @@ -24,7 +24,9 @@ Options: --config= Use the given build configuration. - See $base/build/config for possible configs. + Available configurations are: + +`ls -C $base/build/config/` --prefix= Use the given install directory for make install. @@ -53,7 +55,6 @@ Options: ENDHELP } - # save cwd build=`pwd` # get directory where we are located @@ -121,9 +122,13 @@ if [ "$config" = "" ] ; then fi if [ ! -f "$base/build/config/$config" ] ; then - echo "Unknown configuration: $config" - echo "Please use the --config option to specify another build configuration" - exit 1 + echo "Unknown configuration: $config" + echo "Please use the --config= option." + echo "The can be one of the following:" + echo "" + echo "`ls -C $base/build/config/`" + echo "" + exit 1 fi if [ "$prefix" = "" ] ; then