mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-25 16:13:42 +01:00
don't be too eager setting POCO_PREFIX to /usr/local; add --no-prefix option to configure to NOT set POCO_PREFIX; output POCO_LIB_INSTALLDIR if POCO_VERBOSE
This commit is contained in:
parent
0eaaa42d97
commit
d3f12000d4
23
Makefile
23
Makefile
@ -11,17 +11,16 @@ ifndef POCO_BASE
|
|||||||
$(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
|
$(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
|
||||||
export POCO_BASE=$(shell pwd)
|
export POCO_BASE=$(shell pwd)
|
||||||
endif
|
endif
|
||||||
#$(info POCO_BASE = $(POCO_BASE))
|
ifdef POCO_VERBOSE
|
||||||
|
$(info POCO_BASE = $(POCO_BASE))
|
||||||
ifndef POCO_PREFIX
|
|
||||||
export POCO_PREFIX=/usr/local
|
|
||||||
endif
|
endif
|
||||||
#$(info POCO_PREFIX= $(POCO_PREFIX))
|
|
||||||
|
|
||||||
ifndef POCO_BUILD
|
ifndef POCO_BUILD
|
||||||
export POCO_BUILD=$(POCO_BASE)
|
export POCO_BUILD=$(POCO_BASE)
|
||||||
endif
|
endif
|
||||||
#$(info POCO_BUILD = $(POCO_BUILD))
|
ifdef POCO_VERBOSE
|
||||||
|
$(info POCO_BUILD = $(POCO_BUILD))
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Determine OS
|
# Determine OS
|
||||||
@ -42,7 +41,9 @@ POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _))
|
|||||||
ifndef POCO_CONFIG
|
ifndef POCO_CONFIG
|
||||||
POCO_CONFIG = $(POCO_HOST_OSNAME)
|
POCO_CONFIG = $(POCO_HOST_OSNAME)
|
||||||
endif
|
endif
|
||||||
#$(info POCO_CONFIG = $(POCO_CONFIG))
|
ifdef POCO_VERBOSE
|
||||||
|
$(info POCO_CONFIG = $(POCO_CONFIG))
|
||||||
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
# Include System Specific Settings
|
# Include System Specific Settings
|
||||||
@ -57,14 +58,18 @@ OSNAME := $(POCO_HOST_OSNAME)
|
|||||||
else
|
else
|
||||||
OSNAME := $(POCO_TARGET_OSNAME)
|
OSNAME := $(POCO_TARGET_OSNAME)
|
||||||
endif
|
endif
|
||||||
#$(info OSNAME = $(OSNAME))
|
ifdef POCO_VERBOSE
|
||||||
|
$(info OSNAME = $(OSNAME))
|
||||||
|
endif
|
||||||
|
|
||||||
ifndef POCO_TARGET_OSARCH
|
ifndef POCO_TARGET_OSARCH
|
||||||
OSARCH := $(POCO_HOST_OSARCH)
|
OSARCH := $(POCO_HOST_OSARCH)
|
||||||
else
|
else
|
||||||
OSARCH := $(POCO_TARGET_OSARCH)
|
OSARCH := $(POCO_TARGET_OSARCH)
|
||||||
endif
|
endif
|
||||||
#$(info OSARCH = $(OSARCH))
|
ifdef POCO_VERBOSE
|
||||||
|
$(info OSARCH = $(OSARCH))
|
||||||
|
endif
|
||||||
|
|
||||||
.PHONY: poco all libexecs cppunit tests samples cleans clean distclean install
|
.PHONY: poco all libexecs cppunit tests samples cleans clean distclean install
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ PROJECT_BASE = $(POCO_BASE)
|
|||||||
endif
|
endif
|
||||||
export PROJECT_BASE
|
export PROJECT_BASE
|
||||||
ifdef POCO_VERBOSE
|
ifdef POCO_VERBOSE
|
||||||
$(info PROJECT_BASE = $(PROJECT_BASE))
|
$(info PROJECT_BASE = $(PROJECT_BASE))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -46,7 +46,7 @@ POCO_BUILD = $(PROJECT_BASE)
|
|||||||
endif
|
endif
|
||||||
export POCO_BUILD
|
export POCO_BUILD
|
||||||
ifdef POCO_VERBOSE
|
ifdef POCO_VERBOSE
|
||||||
$(info POCO_BUILD = $(POCO_BUILD))
|
$(info POCO_BUILD = $(POCO_BUILD))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -81,12 +81,12 @@ ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW)
|
|||||||
POCO_HOST_OSNAME = MinGW
|
POCO_HOST_OSNAME = MinGW
|
||||||
endif
|
endif
|
||||||
ifdef POCO_VERBOSE
|
ifdef POCO_VERBOSE
|
||||||
$(info POCO_HOST_OSNAME= $(POCO_HOST_OSNAME))
|
$(info POCO_HOST_OSNAME = $(POCO_HOST_OSNAME))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _))
|
POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _))
|
||||||
ifdef POCO_VERBOSE
|
ifdef POCO_VERBOSE
|
||||||
$(info POCO_HOST_OSARCH= $(POCO_HOST_OSARCH))
|
$(info POCO_HOST_OSARCH = $(POCO_HOST_OSARCH))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -124,7 +124,7 @@ ifndef POCO_CONFIG
|
|||||||
POCO_CONFIG = $(POCO_HOST_OSNAME)
|
POCO_CONFIG = $(POCO_HOST_OSNAME)
|
||||||
endif
|
endif
|
||||||
ifdef POCO_VERBOSE
|
ifdef POCO_VERBOSE
|
||||||
$(info POCO_CONFIG = $(POCO_CONFIG))
|
$(info POCO_CONFIG = $(POCO_CONFIG))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -141,7 +141,7 @@ else
|
|||||||
OSNAME := $(POCO_TARGET_OSNAME)
|
OSNAME := $(POCO_TARGET_OSNAME)
|
||||||
endif
|
endif
|
||||||
ifdef POCO_VERBOSE
|
ifdef POCO_VERBOSE
|
||||||
$(info OSNAME = $(OSNAME))
|
$(info OSNAME = $(OSNAME))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef POCO_TARGET_OSARCH
|
ifndef POCO_TARGET_OSARCH
|
||||||
@ -150,7 +150,7 @@ else
|
|||||||
OSARCH := $(POCO_TARGET_OSARCH)
|
OSARCH := $(POCO_TARGET_OSARCH)
|
||||||
endif
|
endif
|
||||||
ifdef POCO_VERBOSE
|
ifdef POCO_VERBOSE
|
||||||
$(info OSARCH = $(OSARCH))
|
$(info OSARCH = $(OSARCH))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
HOSTNAME := $(shell hostname)
|
HOSTNAME := $(shell hostname)
|
||||||
@ -221,6 +221,9 @@ POCO_LIB_INSTALLDIR = $(POCO_PREFIX)/lib
|
|||||||
else
|
else
|
||||||
POCO_LIB_INSTALLDIR = $(LIBPATH)
|
POCO_LIB_INSTALLDIR = $(LIBPATH)
|
||||||
endif
|
endif
|
||||||
|
ifdef POCO_VERBOSE
|
||||||
|
$(info POCO_LIB_INSTALLDIR = $(POCO_LIB_INSTALLDIR))
|
||||||
|
endif
|
||||||
|
|
||||||
ifeq ($(POCO_BASE),$(PROJECT_BASE))
|
ifeq ($(POCO_BASE),$(PROJECT_BASE))
|
||||||
POCO_LIBRARY =
|
POCO_LIBRARY =
|
||||||
|
20
configure
vendored
20
configure
vendored
@ -28,6 +28,10 @@ Options:
|
|||||||
--prefix=<install_prefix>
|
--prefix=<install_prefix>
|
||||||
Use the given install directory for make install.
|
Use the given install directory for make install.
|
||||||
Default is /usr/local.
|
Default is /usr/local.
|
||||||
|
|
||||||
|
--no-prefix
|
||||||
|
Do not use /usr/local as default install directory and do not
|
||||||
|
define POCO_PREFIX.
|
||||||
|
|
||||||
--stdcxx-base=<apache_stdcxx_install_prefix>
|
--stdcxx-base=<apache_stdcxx_install_prefix>
|
||||||
If (and only if) the $base/build/config selected with --config
|
If (and only if) the $base/build/config selected with --config
|
||||||
@ -134,6 +138,7 @@ cd $build
|
|||||||
|
|
||||||
tests=1
|
tests=1
|
||||||
samples=1
|
samples=1
|
||||||
|
noprefix=0
|
||||||
flags=""
|
flags=""
|
||||||
includepath=""
|
includepath=""
|
||||||
librarypath=""
|
librarypath=""
|
||||||
@ -153,6 +158,9 @@ while [ $# -ge 1 ]; do
|
|||||||
|
|
||||||
--prefix=*)
|
--prefix=*)
|
||||||
prefix="`echo ${1} | awk '{print substr($0,10)}'`" ;;
|
prefix="`echo ${1} | awk '{print substr($0,10)}'`" ;;
|
||||||
|
|
||||||
|
--no-prefix)
|
||||||
|
noprefix=1 ;;
|
||||||
|
|
||||||
--stdcxx-base=*)
|
--stdcxx-base=*)
|
||||||
stdcxx_base="`echo ${1} | awk '{print substr($0,15)}'`" ;;
|
stdcxx_base="`echo ${1} | awk '{print substr($0,15)}'`" ;;
|
||||||
@ -259,7 +267,9 @@ if [ ! -f "$base/build/config/$config" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$prefix" ] ; then
|
if [ -z "$prefix" ] ; then
|
||||||
prefix=/usr/local
|
if [ $noprefix -eq 0 ] ; then
|
||||||
|
prefix=/usr/local
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# check for patches
|
# 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_CONFIG = $config" >>$build/config.make
|
||||||
echo "POCO_BASE = $base" >>$build/config.make
|
echo "POCO_BASE = $base" >>$build/config.make
|
||||||
echo "POCO_BUILD = $build" >>$build/config.make
|
echo "POCO_BUILD = $build" >>$build/config.make
|
||||||
echo "POCO_PREFIX = $prefix" >>$build/config.make
|
|
||||||
echo "POCO_FLAGS = $flags" >>$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
|
echo "OMIT = $omit" >>$build/config.make
|
||||||
if [ -n "$stdcxx_base" ] ; then
|
if [ -n "$stdcxx_base" ] ; then
|
||||||
echo "STDCXX_BASE = $stdcxx_base" >>$build/config.make
|
echo "STDCXX_BASE = $stdcxx_base" >>$build/config.make
|
||||||
@ -316,10 +328,12 @@ cat <<__EOF__ >>$build/config.make
|
|||||||
export POCO_CONFIG
|
export POCO_CONFIG
|
||||||
export POCO_BASE
|
export POCO_BASE
|
||||||
export POCO_BUILD
|
export POCO_BUILD
|
||||||
export POCO_PREFIX
|
|
||||||
export POCO_FLAGS
|
export POCO_FLAGS
|
||||||
__EOF__
|
__EOF__
|
||||||
|
|
||||||
|
if [ -n "$prefix" ] ; then
|
||||||
|
echo "export POCO_PREFIX" >>$build/config.make
|
||||||
|
fi
|
||||||
if [ -n "$stdcxx_base" ] ; then
|
if [ -n "$stdcxx_base" ] ; then
|
||||||
echo "export STDCXX_BASE" >>$build/config.make
|
echo "export STDCXX_BASE" >>$build/config.make
|
||||||
fi
|
fi
|
||||||
|
@ -86,8 +86,8 @@ mkdir -p $tools
|
|||||||
mkrelease -o $tools $version CppParser PocoDoc
|
mkrelease -o $tools $version CppParser PocoDoc
|
||||||
|
|
||||||
cd $tools
|
cd $tools
|
||||||
./configure --no-tests --no-samples
|
./configure --no-tests --no-samples --no-prefix
|
||||||
make -s -j8
|
make -s -j8
|
||||||
|
|
||||||
if [ $osname = "CYGWIN" ] ; then
|
if [ $osname = "CYGWIN" ] ; then
|
||||||
find $tools -type f -name "*.$libversion.dll" > $TMP/dlls
|
find $tools -type f -name "*.$libversion.dll" > $TMP/dlls
|
||||||
|
@ -210,21 +210,14 @@ $(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
|
|||||||
export POCO_BASE=$(shell pwd)
|
export POCO_BASE=$(shell pwd)
|
||||||
endif
|
endif
|
||||||
ifdef POCO_VERBOSE
|
ifdef POCO_VERBOSE
|
||||||
$(info POCO_BASE = $(POCO_BASE))
|
$(info POCO_BASE = $(POCO_BASE))
|
||||||
endif
|
|
||||||
|
|
||||||
ifndef POCO_PREFIX
|
|
||||||
export POCO_PREFIX=/usr/local
|
|
||||||
endif
|
|
||||||
ifdef POCO_VERBOSE
|
|
||||||
$(info POCO_PREFIX=$(POCO_PREFIX))
|
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef POCO_BUILD
|
ifndef POCO_BUILD
|
||||||
export POCO_BUILD=$(POCO_BASE)
|
export POCO_BUILD=$(POCO_BASE)
|
||||||
endif
|
endif
|
||||||
ifdef POCO_VERBOSE
|
ifdef POCO_VERBOSE
|
||||||
$(info POCO_BUILD = $(POCO_BUILD))
|
$(info POCO_BUILD = $(POCO_BUILD))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -239,12 +232,12 @@ ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW)
|
|||||||
POCO_HOST_OSNAME = MinGW
|
POCO_HOST_OSNAME = MinGW
|
||||||
endif
|
endif
|
||||||
ifdef POCO_VERBOSE
|
ifdef POCO_VERBOSE
|
||||||
$(info POCO_HOST_OSNAME= $(POCO_HOST_OSNAME))
|
$(info POCO_HOST_OSNAME = $(POCO_HOST_OSNAME))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _))
|
POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _))
|
||||||
ifdef POCO_VERBOSE
|
ifdef POCO_VERBOSE
|
||||||
$(info POCO_HOST_OSARCH= $(POCO_HOST_OSARCH))
|
$(info POCO_HOST_OSARCH = $(POCO_HOST_OSARCH))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -254,7 +247,7 @@ ifndef POCO_CONFIG
|
|||||||
POCO_CONFIG = $(POCO_HOST_OSNAME)
|
POCO_CONFIG = $(POCO_HOST_OSNAME)
|
||||||
endif
|
endif
|
||||||
ifdef POCO_VERBOSE
|
ifdef POCO_VERBOSE
|
||||||
$(info POCO_CONFIG = $(POCO_CONFIG))
|
$(info POCO_CONFIG = $(POCO_CONFIG))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -271,7 +264,7 @@ else
|
|||||||
OSNAME := $(POCO_TARGET_OSNAME)
|
OSNAME := $(POCO_TARGET_OSNAME)
|
||||||
endif
|
endif
|
||||||
ifdef POCO_VERBOSE
|
ifdef POCO_VERBOSE
|
||||||
$(info OSNAME = $(OSNAME))
|
$(info OSNAME = $(OSNAME))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifndef POCO_TARGET_OSARCH
|
ifndef POCO_TARGET_OSARCH
|
||||||
@ -280,7 +273,7 @@ else
|
|||||||
OSARCH := $(POCO_TARGET_OSARCH)
|
OSARCH := $(POCO_TARGET_OSARCH)
|
||||||
endif
|
endif
|
||||||
ifdef POCO_VERBOSE
|
ifdef POCO_VERBOSE
|
||||||
$(info OSARCH = $(OSARCH))
|
$(info OSARCH = $(OSARCH))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: poco all libexecs cppunit tests samples cleans clean distclean install
|
.PHONY: poco all libexecs cppunit tests samples cleans clean distclean install
|
||||||
|
Loading…
x
Reference in New Issue
Block a user