From ac6b6e1bf81458ff7f3d01d9cede9fe0abda20df Mon Sep 17 00:00:00 2001 From: Guenter Obiltschnig Date: Fri, 19 Sep 2008 04:43:05 +0000 Subject: [PATCH] updated build/release scripts --- build/rules/dylib | 6 ++- build/rules/exec | 7 +++- build/rules/lib | 6 ++- release/script/mkrelease | 84 ++++++++++++++++++++++++++++++++++++++-- 4 files changed, 97 insertions(+), 6 deletions(-) diff --git a/build/rules/dylib b/build/rules/dylib index d00d8cbb2..60b6eeca6 100644 --- a/build/rules/dylib +++ b/build/rules/dylib @@ -1,5 +1,5 @@ # -# $Id: //poco/Main/build/rules/dylib#10 $ +# $Id: //poco/1.3/build/rules/dylib#3 $ # # dylib # @@ -41,6 +41,10 @@ clean: $(RM) $(OBJPATH) $(RM) $(DYLIB_DEBUG) $(DYLIB_RELEASE) $(DYLIB_S_DEBUG) $(DYLIB_S_RELEASE) +distclean: clean + $(RM) obj + $(RM) .dep + ifeq ($(LINKMODE),BOTH) static_debug: bindirs $(DYLIB_S_DEBUG) static_release: bindirs $(DYLIB_S_RELEASE) diff --git a/build/rules/exec b/build/rules/exec index 5b8c42bfb..833aeef45 100644 --- a/build/rules/exec +++ b/build/rules/exec @@ -1,5 +1,5 @@ # -# $Id: //poco/Main/build/rules/exec#10 $ +# $Id: //poco/1.3/build/rules/exec#4 $ # # exec # @@ -29,6 +29,11 @@ clean: $(RM) $(OBJPATH) $(RM) $(EXEC_RELEASE_STATIC) $(EXEC_DEBUG_STATIC) $(EXEC_RELEASE_SHARED) $(EXEC_DEBUG_SHARED) +distclean: clean + $(RM) bin + $(RM) obj + $(RM) .dep + static_debug: bindirs $(EXEC_DEBUG_STATIC) static_release: bindirs $(EXEC_RELEASE_STATIC) shared_debug: bindirs $(EXEC_DEBUG_SHARED) diff --git a/build/rules/lib b/build/rules/lib index 1ccab9a6b..6fd7729c8 100644 --- a/build/rules/lib +++ b/build/rules/lib @@ -1,5 +1,5 @@ # -# $Id: //poco/Main/build/rules/lib#11 $ +# $Id: //poco/1.3/build/rules/lib#3 $ # # lib # @@ -41,6 +41,10 @@ clean: $(RM) $(OBJPATH) $(RM) $(LIB_RELEASE_STATIC) $(LIB_DEBUG_STATIC) $(LIB_RELEASE_SHARED) $(LIB_DEBUG_SHARED) +distclean: clean + $(RM) obj + $(RM) .dep + static_debug: libdirs $(LIB_DEBUG_STATIC) static_release: libdirs $(LIB_RELEASE_STATIC) shared_debug: libdirs $(LIB_DEBUG_SHARED) diff --git a/release/script/mkrelease b/release/script/mkrelease index b9da84225..37a398fcc 100755 --- a/release/script/mkrelease +++ b/release/script/mkrelease @@ -1,6 +1,6 @@ #! /bin/sh # -# $Id: //poco/1.3/release/script/mkrelease#1 $ +# $Id: //poco/1.3/release/script/mkrelease#2 $ # # mkrelease # @@ -11,7 +11,7 @@ if [ "$1" = "" ] ; then echo "usage: $0 [-i] [...]" - echo " -i - include intenal tools" + echo " -i - include internal tools" echo " -f specfile - read component list from specfile" echo " -o dir - specify output directory" echo " -l - include licensing" @@ -188,7 +188,11 @@ ifndef POCO_PREFIX export POCO_PREFIX=/usr/local endif -.PHONY: all libexecs cppunit tests samples install +ifndef POCO_BUILD +export POCO_BUILD=$(POCO_BASE) +endif + +.PHONY: all libexecs cppunit tests samples clean distclean install all: libexecs tests samples @@ -283,6 +287,26 @@ ENDOFSCRIPT fi done +echo "" >>${target}/Makefile +echo "clean:" >>${target}/Makefile +for comp in $comps ; +do + echo '\t$(MAKE) -C $(POCO_BASE)'/${comp} clean >>${target}/Makefile + if [ -f ${POCO_BASE}/${comp}/testsuite/Makefile ] ; then + echo '\t$(MAKE) -C $(POCO_BASE)'/${comp}/testsuite clean >>${target}/Makefile + fi + if [ -f ${POCO_BASE}/${comp}/samples/Makefile ] ; then + echo '\t$(MAKE) -C $(POCO_BASE)'/${comp}/samples clean >>${target}/Makefile + fi +done + +echo "" >>${target}/Makefile +echo "distclean:" >>${target}/Makefile +echo '\trm -rf $(POCO_BUILD)/lib' >>${target}/Makefile +echo '\tfind $(POCO_BUILD) -name obj -type d -print0 | xargs -0 rm -rf' >>${target}/Makefile +echo '\tfind $(POCO_BUILD) -name .dep -type d -print0 | xargs -0 rm -rf' >>${target}/Makefile +echo '\tfind $(POCO_BUILD) -name bin -type d -print0 | xargs -0 rm -rf' >>${target}/Makefile + # # Create Visual Studio 7.1 buils script @@ -390,12 +414,66 @@ ENDOFSCRIPT done +# +# Create Visual Studio 9 buils script +# +cat >${target}/build_vs90.cmd <<'ENDOFSCRIPT' +@echo off + +rem +rem build_vs90.cmd +rem +rem command-line build script for VS 9 [generated by mkrelease] +rem + +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% +set PATH=%POCOBASE%\bin;%PATH% + +cd CppUnit +devenv /useenv /rebuild debug_shared CppUnit_vs90.sln +devenv /useenv /rebuild release_shared CppUnit_vs90.sln +cd %POCOBASE% +ENDOFSCRIPT + +for comp in $comps ; +do + cat >>${target}/build_vs90.cmd <>${target}/build_vs90.cmd <