diff --git a/Makefile b/Makefile index 7c3879f2fe..a8172e8510 100644 --- a/Makefile +++ b/Makefile @@ -11,17 +11,16 @@ ifndef POCO_BASE $(warning WARNING: POCO_BASE is not defined. Assuming current directory.) export POCO_BASE=$(shell pwd) endif -#$(info POCO_BASE = $(POCO_BASE)) - -ifndef POCO_PREFIX -export POCO_PREFIX=/usr/local +ifdef POCO_VERBOSE +$(info POCO_BASE = $(POCO_BASE)) endif -#$(info POCO_PREFIX= $(POCO_PREFIX)) ifndef POCO_BUILD export POCO_BUILD=$(POCO_BASE) endif -#$(info POCO_BUILD = $(POCO_BUILD)) +ifdef POCO_VERBOSE +$(info POCO_BUILD = $(POCO_BUILD)) +endif # # Determine OS @@ -42,7 +41,9 @@ POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _)) ifndef POCO_CONFIG POCO_CONFIG = $(POCO_HOST_OSNAME) endif -#$(info POCO_CONFIG = $(POCO_CONFIG)) +ifdef POCO_VERBOSE +$(info POCO_CONFIG = $(POCO_CONFIG)) +endif # # Include System Specific Settings @@ -57,14 +58,18 @@ OSNAME := $(POCO_HOST_OSNAME) else OSNAME := $(POCO_TARGET_OSNAME) endif -#$(info OSNAME = $(OSNAME)) +ifdef POCO_VERBOSE +$(info OSNAME = $(OSNAME)) +endif ifndef POCO_TARGET_OSARCH OSARCH := $(POCO_HOST_OSARCH) else OSARCH := $(POCO_TARGET_OSARCH) endif -#$(info OSARCH = $(OSARCH)) +ifdef POCO_VERBOSE +$(info OSARCH = $(OSARCH)) +endif .PHONY: poco all libexecs cppunit tests samples cleans clean distclean install diff --git a/build/rules/global b/build/rules/global index 2d4d5c3d27..ed88d2434b 100644 --- a/build/rules/global +++ b/build/rules/global @@ -35,7 +35,7 @@ PROJECT_BASE = $(POCO_BASE) endif export PROJECT_BASE ifdef POCO_VERBOSE -$(info PROJECT_BASE = $(PROJECT_BASE)) +$(info PROJECT_BASE = $(PROJECT_BASE)) endif # @@ -46,7 +46,7 @@ POCO_BUILD = $(PROJECT_BASE) endif export POCO_BUILD ifdef POCO_VERBOSE -$(info POCO_BUILD = $(POCO_BUILD)) +$(info POCO_BUILD = $(POCO_BUILD)) endif # @@ -81,12 +81,12 @@ ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW) POCO_HOST_OSNAME = MinGW endif ifdef POCO_VERBOSE -$(info POCO_HOST_OSNAME= $(POCO_HOST_OSNAME)) +$(info POCO_HOST_OSNAME = $(POCO_HOST_OSNAME)) endif POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _)) ifdef POCO_VERBOSE -$(info POCO_HOST_OSARCH= $(POCO_HOST_OSARCH)) +$(info POCO_HOST_OSARCH = $(POCO_HOST_OSARCH)) endif # @@ -124,7 +124,7 @@ ifndef POCO_CONFIG POCO_CONFIG = $(POCO_HOST_OSNAME) endif ifdef POCO_VERBOSE -$(info POCO_CONFIG = $(POCO_CONFIG)) +$(info POCO_CONFIG = $(POCO_CONFIG)) endif # @@ -141,7 +141,7 @@ else OSNAME := $(POCO_TARGET_OSNAME) endif ifdef POCO_VERBOSE -$(info OSNAME = $(OSNAME)) +$(info OSNAME = $(OSNAME)) endif ifndef POCO_TARGET_OSARCH @@ -150,7 +150,7 @@ else OSARCH := $(POCO_TARGET_OSARCH) endif ifdef POCO_VERBOSE -$(info OSARCH = $(OSARCH)) +$(info OSARCH = $(OSARCH)) endif HOSTNAME := $(shell hostname) @@ -221,6 +221,9 @@ POCO_LIB_INSTALLDIR = $(POCO_PREFIX)/lib else POCO_LIB_INSTALLDIR = $(LIBPATH) endif +ifdef POCO_VERBOSE +$(info POCO_LIB_INSTALLDIR = $(POCO_LIB_INSTALLDIR)) +endif ifeq ($(POCO_BASE),$(PROJECT_BASE)) POCO_LIBRARY = diff --git a/configure b/configure index 262425c32c..4c791501e6 100755 --- a/configure +++ b/configure @@ -28,6 +28,10 @@ Options: --prefix= Use the given install directory for make install. Default is /usr/local. + + --no-prefix + Do not use /usr/local as default install directory and do not + define POCO_PREFIX. --stdcxx-base= If (and only if) the $base/build/config selected with --config @@ -134,6 +138,7 @@ cd $build tests=1 samples=1 +noprefix=0 flags="" includepath="" librarypath="" @@ -153,6 +158,9 @@ while [ $# -ge 1 ]; do --prefix=*) prefix="`echo ${1} | awk '{print substr($0,10)}'`" ;; + + --no-prefix) + noprefix=1 ;; --stdcxx-base=*) stdcxx_base="`echo ${1} | awk '{print substr($0,15)}'`" ;; @@ -259,7 +267,9 @@ if [ ! -f "$base/build/config/$config" ] ; then fi if [ -z "$prefix" ] ; then - prefix=/usr/local + if [ $noprefix -eq 0 ] ; then + prefix=/usr/local + fi fi # check for patches @@ -287,8 +297,10 @@ echo '# config.make generated by configure script' >$build/config.make echo "POCO_CONFIG = $config" >>$build/config.make echo "POCO_BASE = $base" >>$build/config.make echo "POCO_BUILD = $build" >>$build/config.make -echo "POCO_PREFIX = $prefix" >>$build/config.make echo "POCO_FLAGS = $flags" >>$build/config.make +if [ -n "$prefix" ] ; then + echo "POCO_PREFIX = $prefix" >>$build/config.make +fi echo "OMIT = $omit" >>$build/config.make if [ -n "$stdcxx_base" ] ; then echo "STDCXX_BASE = $stdcxx_base" >>$build/config.make @@ -316,10 +328,12 @@ cat <<__EOF__ >>$build/config.make export POCO_CONFIG export POCO_BASE export POCO_BUILD -export POCO_PREFIX export POCO_FLAGS __EOF__ +if [ -n "$prefix" ] ; then + echo "export POCO_PREFIX" >>$build/config.make +fi if [ -n "$stdcxx_base" ] ; then echo "export STDCXX_BASE" >>$build/config.make fi diff --git a/release/script/mkdoc b/release/script/mkdoc index cb8a95e8f6..4e7d8d5e3e 100755 --- a/release/script/mkdoc +++ b/release/script/mkdoc @@ -86,8 +86,8 @@ mkdir -p $tools mkrelease -o $tools $version CppParser PocoDoc cd $tools -./configure --no-tests --no-samples -make -s -j8 +./configure --no-tests --no-samples --no-prefix +make -s -j8 if [ $osname = "CYGWIN" ] ; then find $tools -type f -name "*.$libversion.dll" > $TMP/dlls diff --git a/release/script/mkrelease b/release/script/mkrelease index 232f9f9dca..72eb378f0e 100755 --- a/release/script/mkrelease +++ b/release/script/mkrelease @@ -210,21 +210,14 @@ $(warning WARNING: POCO_BASE is not defined. Assuming current directory.) export POCO_BASE=$(shell pwd) endif ifdef POCO_VERBOSE -$(info POCO_BASE = $(POCO_BASE)) -endif - -ifndef POCO_PREFIX -export POCO_PREFIX=/usr/local -endif -ifdef POCO_VERBOSE -$(info POCO_PREFIX=$(POCO_PREFIX)) +$(info POCO_BASE = $(POCO_BASE)) endif ifndef POCO_BUILD export POCO_BUILD=$(POCO_BASE) endif ifdef POCO_VERBOSE -$(info POCO_BUILD = $(POCO_BUILD)) +$(info POCO_BUILD = $(POCO_BUILD)) endif # @@ -239,12 +232,12 @@ ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW) POCO_HOST_OSNAME = MinGW endif ifdef POCO_VERBOSE -$(info POCO_HOST_OSNAME= $(POCO_HOST_OSNAME)) +$(info POCO_HOST_OSNAME = $(POCO_HOST_OSNAME)) endif POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _)) ifdef POCO_VERBOSE -$(info POCO_HOST_OSARCH= $(POCO_HOST_OSARCH)) +$(info POCO_HOST_OSARCH = $(POCO_HOST_OSARCH)) endif # @@ -254,7 +247,7 @@ ifndef POCO_CONFIG POCO_CONFIG = $(POCO_HOST_OSNAME) endif ifdef POCO_VERBOSE -$(info POCO_CONFIG = $(POCO_CONFIG)) +$(info POCO_CONFIG = $(POCO_CONFIG)) endif # @@ -271,7 +264,7 @@ else OSNAME := $(POCO_TARGET_OSNAME) endif ifdef POCO_VERBOSE -$(info OSNAME = $(OSNAME)) +$(info OSNAME = $(OSNAME)) endif ifndef POCO_TARGET_OSARCH @@ -280,7 +273,7 @@ else OSARCH := $(POCO_TARGET_OSARCH) endif ifdef POCO_VERBOSE -$(info OSARCH = $(OSARCH)) +$(info OSARCH = $(OSARCH)) endif .PHONY: poco all libexecs cppunit tests samples cleans clean distclean install