2012-09-25 04:24:56 +02:00
|
|
|
#! /bin/bash
|
2012-04-23 03:14:34 +02:00
|
|
|
#
|
2012-09-25 04:24:56 +02:00
|
|
|
# $Id: //poco/1.4/release/script/mkrelease#8 $
|
2012-04-23 03:14:34 +02:00
|
|
|
#
|
|
|
|
# mkrelease
|
|
|
|
#
|
|
|
|
# Create a release for distribution.
|
|
|
|
#
|
|
|
|
# usage: mkrelease [-i] [-f specfile] <version> [<component>...]
|
|
|
|
#
|
|
|
|
|
|
|
|
if [ "$1" = "" ] ; then
|
|
|
|
echo "usage: $0 [-i] <version> [<component>...]"
|
|
|
|
echo " -i - include internal tools"
|
|
|
|
echo " -f specfile - read component list from specfile"
|
|
|
|
echo " -o dir - specify output directory"
|
2012-12-26 05:43:02 +01:00
|
|
|
echo " -c location - specify line-ending conversion utility (enables conversion)"
|
2012-04-23 03:14:34 +02:00
|
|
|
echo " -l - include licensing"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2012-09-25 04:24:56 +02:00
|
|
|
comps="Foundation XML JSON Util Net"
|
2012-04-23 03:14:34 +02:00
|
|
|
internal=0
|
|
|
|
specfile=""
|
|
|
|
version=""
|
|
|
|
output=""
|
2012-12-26 05:43:02 +01:00
|
|
|
lineEndConv=""
|
2012-04-23 03:14:34 +02:00
|
|
|
licensingDep=""
|
|
|
|
|
|
|
|
while [ "$1" != "" ] ;
|
|
|
|
do
|
|
|
|
if [ "$1" = "-i" ] ; then
|
|
|
|
shift
|
|
|
|
internal=1
|
|
|
|
elif [ "$1" = "-f" ] ; then
|
|
|
|
shift
|
|
|
|
specfile=$1
|
|
|
|
shift
|
|
|
|
elif [ "$1" = "-o" ] ; then
|
|
|
|
shift
|
|
|
|
output=$1
|
|
|
|
shift
|
2012-12-26 05:43:02 +01:00
|
|
|
elif [ "$1" = "-c" ] ; then
|
|
|
|
shift
|
|
|
|
lineEndConv=$1
|
|
|
|
shift
|
2012-04-23 03:14:34 +02:00
|
|
|
elif [ "$1" = "-l" ] ; then
|
|
|
|
shift
|
|
|
|
licensingDep="Licensing-libexec"
|
|
|
|
comps="$comps Licensing"
|
|
|
|
elif [ "$version" = "" ] ; then
|
|
|
|
version=$1
|
|
|
|
shift
|
|
|
|
else
|
|
|
|
comps="$comps $1"
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ "$specfile" != "" ] ; then
|
2012-09-25 04:24:56 +02:00
|
|
|
while read c
|
2012-04-23 03:14:34 +02:00
|
|
|
do
|
|
|
|
comps="$comps $c"
|
|
|
|
done <$specfile
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$version" = "" ] ; then
|
|
|
|
echo "Error: no version specified."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$output" != "" ] ; then
|
|
|
|
target=$output
|
|
|
|
else
|
|
|
|
target=$POCO_BASE/releases/poco-${version}
|
|
|
|
fi
|
|
|
|
|
|
|
|
mkdir -p ${target}
|
|
|
|
mkdir -p ${target}/doc
|
|
|
|
mkdir -p ${target}/contrib
|
2012-09-25 04:24:56 +02:00
|
|
|
mkdir -p ${target}/patches
|
2014-12-22 00:06:53 +01:00
|
|
|
mkdir -p ${target}/cmake
|
2012-04-23 03:14:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# readme files, etc.
|
|
|
|
#
|
|
|
|
echo ${version} "(`date +%Y-%m-%d`)" >${target}/VERSION
|
2012-09-25 04:24:56 +02:00
|
|
|
cp ${POCO_BASE}/LICENSE ${target}
|
|
|
|
cp ${POCO_BASE}/NEWS ${target}
|
|
|
|
cp ${POCO_BASE}/README ${target}
|
|
|
|
cp ${POCO_BASE}/CHANGELOG ${target}
|
|
|
|
cp ${POCO_BASE}/CONTRIBUTORS ${target}
|
|
|
|
cp ${POCO_BASE}/DLLVersion.rc ${target}
|
2012-04-23 03:14:34 +02:00
|
|
|
|
|
|
|
cp ${POCO_BASE}/doc/Acknowledgements.html ${target}/doc
|
2012-09-25 04:24:56 +02:00
|
|
|
cp ${POCO_BASE}/doc/*.page ${target}/doc
|
2012-04-23 03:14:34 +02:00
|
|
|
|
|
|
|
cp -R ${POCO_BASE}/contrib/* ${target}/contrib
|
2012-09-25 04:24:56 +02:00
|
|
|
cp -R ${POCO_BASE}/patches/* ${target}/patches
|
|
|
|
|
2014-12-22 00:06:53 +01:00
|
|
|
cp -R ${POCO_BASE}/cmake/* ${target}/cmake
|
|
|
|
cp ${POCO_BASE}/CMakeLists.txt ${target}
|
|
|
|
|
2012-04-23 03:14:34 +02:00
|
|
|
|
|
|
|
#
|
|
|
|
# build system
|
|
|
|
#
|
|
|
|
mkdir -p ${target}/build/config
|
|
|
|
mkdir -p ${target}/build/rules
|
|
|
|
mkdir -p ${target}/build/script
|
|
|
|
mkdir -p ${target}/build/vms
|
2012-09-25 04:24:56 +02:00
|
|
|
mkdir -p ${target}/build/vxconfig
|
2012-04-23 03:14:34 +02:00
|
|
|
|
|
|
|
cp ${POCO_BASE}/build/config/* ${target}/build/config
|
|
|
|
cp ${POCO_BASE}/build/rules/* ${target}/build/rules
|
2012-09-25 04:24:56 +02:00
|
|
|
cp ${POCO_BASE}/build/vxconfig/* ${target}/build/vxconfig
|
2012-04-23 03:14:34 +02:00
|
|
|
cp ${POCO_BASE}/build/script/makedepend.* ${target}/build/script
|
|
|
|
cp ${POCO_BASE}/build/script/makeldpath ${target}/build/script
|
|
|
|
cp ${POCO_BASE}/build/script/shlibln ${target}/build/script
|
|
|
|
cp ${POCO_BASE}/build/script/projname ${target}/build/script
|
2012-09-25 04:24:56 +02:00
|
|
|
cp ${POCO_BASE}/build/script/vxprogen ${target}/build/script
|
|
|
|
cp ${POCO_BASE}/buildwin.cmd ${target}
|
|
|
|
cp ${POCO_BASE}/configure ${target}
|
2012-04-23 03:14:34 +02:00
|
|
|
cp ${POCO_BASE}/libversion ${target}
|
|
|
|
|
|
|
|
if [ $internal = 1 ] ; then
|
|
|
|
cp ${POCO_BASE}/build/script/testall ${target}/build/script
|
|
|
|
cp ${POCO_BASE}/build/script/waitfortest ${target}/build/script
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# CppUnit
|
|
|
|
#
|
|
|
|
mkdir -p ${target}/CppUnit
|
|
|
|
mkdir -p ${target}/CppUnit/doc
|
|
|
|
mkdir -p ${target}/CppUnit/include/CppUnit
|
|
|
|
mkdir -p ${target}/CppUnit/src
|
|
|
|
mkdir -p ${target}/CppUnit/WinTestRunner
|
|
|
|
mkdir -p ${target}/CppUnit/WinTestRunner/include/WinTestRunner
|
|
|
|
mkdir -p ${target}/CppUnit/WinTestRunner/src
|
|
|
|
mkdir -p ${target}/CppUnit/WinTestRunner/res
|
|
|
|
|
2014-12-22 00:06:53 +01:00
|
|
|
cp ${POCO_BASE}/CppUnit/doc/* ${target}/CppUnit/doc >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/include/CppUnit/* ${target}/CppUnit/include/CppUnit >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/src/* ${target}/CppUnit/src >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/*.sln ${target}/CppUnit >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/*.vcproj ${target}/CppUnit >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/*.vcxproj ${target}/CppUnit >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/*.vcxproj.filters ${target}/CppUnit >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/*.vcxproj.user ${target}/CppUnit >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/Makefile ${target}/CppUnit >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/*.vmsbuild ${target}/CppUnit >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/*.vxbuild ${target}/CppUnit >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/*.progen ${target}/CppUnit >/dev/null 2>&1
|
|
|
|
|
|
|
|
cp ${POCO_BASE}/CppUnit/WinTestRunner/include/WinTestRunner/* ${target}/CppUnit/WinTestRunner/include/WinTestRunner >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/WinTestRunner/src/* ${target}/CppUnit/WinTestRunner/src >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/WinTestRunner/res/WinTestRunner.rc ${target}/CppUnit/WinTestRunner/res >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/WinTestRunner/res/Resource.h ${target}/CppUnit/WinTestRunner/res >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/WinTestRunner/*.vcproj ${target}/CppUnit/WinTestRunner >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/WinTestRunner/*.vcxproj ${target}/CppUnit/WinTestRunner >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/WinTestRunner/*.vcxproj.filters ${target}/CppUnit/WinTestRunner >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/WinTestRunner/*.vcxproj.user ${target}/CppUnit/WinTestRunner >/dev/null 2>&1
|
|
|
|
cp ${POCO_BASE}/CppUnit/WinTestRunner/*.progen ${target}/CppUnit/WinTestRunner >/dev/null 2>&1
|
2012-04-23 03:14:34 +02:00
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Copy components
|
|
|
|
#
|
|
|
|
for comp in $comps ;
|
|
|
|
do
|
|
|
|
cpproj ${POCO_BASE}/$comp ${target}/$comp
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Create components file
|
|
|
|
#
|
|
|
|
echo "CppUnit" >${target}/components
|
2013-09-18 20:12:27 +02:00
|
|
|
echo "CppUnit/WinTestRunner" >>${target}/components
|
2012-04-23 03:14:34 +02:00
|
|
|
for comp in $comps ;
|
|
|
|
do
|
|
|
|
echo $comp >>${target}/components
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Make all files writeable
|
|
|
|
#
|
|
|
|
chmod -R +w ${target}
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Generate Makefile
|
|
|
|
#
|
|
|
|
cat >${target}/Makefile <<'ENDOFSCRIPT'
|
|
|
|
#
|
|
|
|
# Makefile
|
|
|
|
#
|
|
|
|
# The global Makefile for POCO [generated by mkrelease]
|
|
|
|
#
|
|
|
|
|
|
|
|
sinclude config.make
|
2012-09-25 06:09:05 +02:00
|
|
|
sinclude config.build
|
2012-04-23 03:14:34 +02:00
|
|
|
|
|
|
|
ifndef POCO_BASE
|
|
|
|
$(warning WARNING: POCO_BASE is not defined. Assuming current directory.)
|
|
|
|
export POCO_BASE=$(shell pwd)
|
|
|
|
endif
|
2015-12-01 20:16:02 +01:00
|
|
|
#$(info POCO_BASE = $(POCO_BASE))
|
2012-04-23 03:14:34 +02:00
|
|
|
|
|
|
|
ifndef POCO_PREFIX
|
|
|
|
export POCO_PREFIX=/usr/local
|
|
|
|
endif
|
2015-12-01 20:16:02 +01:00
|
|
|
#$(info POCO_PREFIX=$(POCO_PREFIX))
|
2012-04-23 03:14:34 +02:00
|
|
|
|
|
|
|
ifndef POCO_BUILD
|
|
|
|
export POCO_BUILD=$(POCO_BASE)
|
|
|
|
endif
|
2015-12-01 20:16:02 +01:00
|
|
|
#$(info POCO_BUILD = $(POCO_BUILD))
|
|
|
|
|
|
|
|
#
|
|
|
|
# Determine OS
|
|
|
|
#
|
|
|
|
POCO_HOST_OSNAME = $(shell uname)
|
|
|
|
ifeq ($(findstring CYGWIN,$(POCO_HOST_OSNAME)),CYGWIN)
|
|
|
|
POCO_HOST_OSNAME = Cygwin
|
|
|
|
endif
|
|
|
|
|
|
|
|
ifeq ($(findstring MINGW,$(POCO_HOST_OSNAME)),MINGW)
|
|
|
|
POCO_HOST_OSNAME = MinGW
|
|
|
|
endif
|
|
|
|
#$(info POCO_HOST_OSNAME= $(POCO_HOST_OSNAME))
|
|
|
|
|
|
|
|
POCO_HOST_OSARCH ?= $(subst /,-,$(shell uname -m | tr ' ' _))
|
|
|
|
#$(info POCO_HOST_OSARCH= $(POCO_HOST_OSARCH))
|
|
|
|
|
|
|
|
#
|
|
|
|
# If POCO_CONFIG is not set, use the OS name as configuration name
|
|
|
|
#
|
|
|
|
ifndef POCO_CONFIG
|
|
|
|
POCO_CONFIG = $(POCO_HOST_OSNAME)
|
|
|
|
endif
|
|
|
|
#$(info POCO_CONFIG = $(POCO_CONFIG))
|
|
|
|
|
|
|
|
#
|
|
|
|
# Include System Specific Settings
|
|
|
|
#
|
|
|
|
include $(POCO_BASE)/build/config/$(POCO_CONFIG)
|
|
|
|
|
|
|
|
#
|
|
|
|
# Determine operating system
|
|
|
|
#
|
|
|
|
ifndef POCO_TARGET_OSNAME
|
|
|
|
OSNAME := $(POCO_HOST_OSNAME)
|
|
|
|
else
|
|
|
|
OSNAME := $(POCO_TARGET_OSNAME)
|
|
|
|
endif
|
|
|
|
#$(info OSNAME = $(OSNAME))
|
|
|
|
|
|
|
|
ifndef POCO_TARGET_OSARCH
|
|
|
|
OSARCH := $(POCO_HOST_OSARCH)
|
|
|
|
else
|
|
|
|
OSARCH := $(POCO_TARGET_OSARCH)
|
|
|
|
endif
|
|
|
|
#$(info OSARCH = $(OSARCH))
|
2012-04-23 03:14:34 +02:00
|
|
|
|
2013-07-23 15:04:48 +02:00
|
|
|
.PHONY: poco all libexecs cppunit tests samples cleans clean distclean install
|
2012-04-23 03:14:34 +02:00
|
|
|
|
2012-09-25 04:24:56 +02:00
|
|
|
# TESTS and SAMPLES are set in config.make
|
|
|
|
poco: libexecs $(if $(TESTS),tests) $(if $(SAMPLES),samples)
|
2012-04-23 03:14:34 +02:00
|
|
|
all: libexecs tests samples
|
|
|
|
|
|
|
|
INSTALLDIR = $(DESTDIR)$(POCO_PREFIX)
|
|
|
|
ENDOFSCRIPT
|
|
|
|
|
|
|
|
echo "COMPONENTS = $comps" >>${target}/Makefile
|
|
|
|
|
|
|
|
cat >>${target}/Makefile <<'ENDOFSCRIPT'
|
|
|
|
|
|
|
|
cppunit:
|
|
|
|
$(MAKE) -C $(POCO_BASE)/CppUnit
|
|
|
|
|
2013-07-23 15:04:48 +02:00
|
|
|
CppUnit-clean:
|
|
|
|
\$(MAKE) -C \$(POCO_BASE)/CppUnit clean
|
|
|
|
|
2012-04-23 03:14:34 +02:00
|
|
|
install: libexecs
|
|
|
|
mkdir -p $(INSTALLDIR)/include/Poco
|
|
|
|
mkdir -p $(INSTALLDIR)/lib
|
|
|
|
mkdir -p $(INSTALLDIR)/bin
|
2015-10-06 15:41:53 +02:00
|
|
|
for comp in $(filter-out $(foreach f,$(OMIT),$f%),$(COMPONENTS)) ; do \
|
2012-04-23 03:14:34 +02:00
|
|
|
if [ -d "$(POCO_BASE)/$$comp/include" ] ; then \
|
|
|
|
cp -Rf $(POCO_BASE)/$$comp/include/* $(INSTALLDIR)/include/ ; \
|
|
|
|
fi ; \
|
|
|
|
if [ -d "$(POCO_BUILD)/$$comp/bin" ] ; then \
|
|
|
|
find $(POCO_BUILD)/$$comp/bin -perm -700 -type f -exec cp -f {} $(INSTALLDIR)/bin \; ; \
|
|
|
|
fi ; \
|
|
|
|
done
|
2015-12-01 20:16:02 +01:00
|
|
|
ifeq ($(OSNAME), Cygwin)
|
|
|
|
find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "cygPoco*" -type f -exec cp -f {} $(INSTALLDIR)/bin \;
|
|
|
|
find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "cygPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/bin \;
|
|
|
|
endif
|
|
|
|
find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "libPoco*" -type f -exec cp -f {} $(INSTALLDIR)/lib \;
|
|
|
|
find $(POCO_BUILD)/lib/$(OSNAME)/$(OSARCH) -name "libPoco*" -type l -exec cp -Rf {} $(INSTALLDIR)/lib \;
|
2012-04-23 03:14:34 +02:00
|
|
|
|
|
|
|
ENDOFSCRIPT
|
|
|
|
|
|
|
|
libexecs=""
|
|
|
|
tests=""
|
|
|
|
samples=""
|
2013-07-23 15:04:48 +02:00
|
|
|
cleans=""
|
2012-04-23 03:14:34 +02:00
|
|
|
for comp in $comps ;
|
|
|
|
do
|
|
|
|
libexecs="$libexecs ${comp}-libexec"
|
2013-07-23 15:04:48 +02:00
|
|
|
cleans="$cleans ${comp}-clean"
|
2012-04-23 03:14:34 +02:00
|
|
|
if [ -d "${POCO_BASE}/${comp}/testsuite" ] ; then
|
|
|
|
tests="$tests ${comp}-tests"
|
|
|
|
fi
|
|
|
|
if [ -d "${POCO_BASE}/${comp}/samples" ] ; then
|
|
|
|
samples="$samples ${comp}-samples"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
echo "libexecs = $libexecs" >>${target}/Makefile
|
|
|
|
echo "tests = $tests" >> ${target}/Makefile
|
|
|
|
echo "samples = $samples" >> ${target}/Makefile
|
2013-07-23 15:04:48 +02:00
|
|
|
echo "cleans = $cleans" >> ${target}/Makefile
|
2012-04-23 03:14:34 +02:00
|
|
|
echo "" >>${target}/Makefile
|
|
|
|
echo '.PHONY: $(libexecs)' >>${target}/Makefile
|
|
|
|
echo '.PHONY: $(tests)' >>${target}/Makefile
|
|
|
|
echo '.PHONY: $(samples)' >>${target}/Makefile
|
2013-07-23 15:04:48 +02:00
|
|
|
echo '.PHONY: $(cleans)' >>${target}/Makefile
|
2012-04-23 03:14:34 +02:00
|
|
|
echo "" >>${target}/Makefile
|
|
|
|
echo 'libexecs: $(filter-out $(foreach f,$(OMIT),$f%),$(libexecs))' >>${target}/Makefile
|
|
|
|
echo 'tests: $(filter-out $(foreach f,$(OMIT),$f%),$(tests))' >>${target}/Makefile
|
|
|
|
echo 'samples: $(filter-out $(foreach f,$(OMIT),$f%),$(samples))' >>${target}/Makefile
|
2013-07-23 15:04:48 +02:00
|
|
|
echo 'cleans: $(filter-out $(foreach f,$(OMIT),$f%),$(cleans))' >>${target}/Makefile
|
2012-04-23 03:14:34 +02:00
|
|
|
|
|
|
|
for comp in $comps ;
|
|
|
|
do
|
2012-09-25 04:24:56 +02:00
|
|
|
if [ "`grep -c POCO_LICENSING "${POCO_BASE}/${comp}/Makefile"`" != 0 ] ; then
|
2012-04-23 03:14:34 +02:00
|
|
|
dependencies=$licensingDep
|
|
|
|
else
|
|
|
|
dependencies=""
|
|
|
|
fi
|
|
|
|
if [ -f "${POCO_BASE}/${comp}/dependencies" ] ; then
|
|
|
|
for dep in `cat "${POCO_BASE}/${comp}/dependencies"` ;
|
|
|
|
do
|
2012-09-25 04:24:56 +02:00
|
|
|
# get rid of surrounding whitespace (trailing \r on Cygwin)
|
|
|
|
read dep <<< "$dep"
|
2012-04-23 03:14:34 +02:00
|
|
|
dependencies="$dependencies ${dep}-libexec"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
cat >>${target}/Makefile <<ENDOFSCRIPT
|
|
|
|
|
|
|
|
${comp}-libexec: $dependencies
|
|
|
|
\$(MAKE) -C \$(POCO_BASE)/${comp}
|
|
|
|
ENDOFSCRIPT
|
|
|
|
|
|
|
|
if [ -d "${POCO_BASE}/${comp}/testsuite" ] ; then
|
|
|
|
cat >>${target}/Makefile <<ENDOFSCRIPT
|
|
|
|
|
|
|
|
${comp}-tests: ${comp}-libexec cppunit
|
|
|
|
\$(MAKE) -C \$(POCO_BASE)/${comp}/testsuite
|
|
|
|
ENDOFSCRIPT
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ -d "${POCO_BASE}/${comp}/samples" ] ; then
|
|
|
|
sdependencies=""
|
|
|
|
if [ -f "${POCO_BASE}/${comp}/samples/dependencies" ] ; then
|
|
|
|
for dep in `cat "${POCO_BASE}/${comp}/samples/dependencies"` ;
|
|
|
|
do
|
2012-09-25 04:24:56 +02:00
|
|
|
# get rid of surrounding whitespace (trailing \r on Cygwin)
|
|
|
|
read dep <<< ${dep}
|
2012-04-23 03:14:34 +02:00
|
|
|
sdependencies="$sdependencies ${dep}-libexec"
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
cat >>${target}/Makefile <<ENDOFSCRIPT
|
|
|
|
|
|
|
|
${comp}-samples: ${comp}-libexec $sdependencies
|
|
|
|
\$(MAKE) -C \$(POCO_BASE)/${comp}/samples
|
|
|
|
ENDOFSCRIPT
|
|
|
|
fi
|
|
|
|
|
|
|
|
cat >>${target}/Makefile <<ENDOFSCRIPT
|
2013-07-23 15:04:48 +02:00
|
|
|
|
|
|
|
${comp}-clean:
|
2012-04-23 03:14:34 +02:00
|
|
|
\$(MAKE) -C \$(POCO_BASE)/${comp} clean
|
|
|
|
ENDOFSCRIPT
|
2013-07-23 15:04:48 +02:00
|
|
|
|
|
|
|
if [ -f "${POCO_BASE}/${comp}/testsuite/Makefile" ] ; then
|
|
|
|
cat >>${target}/Makefile <<ENDOFSCRIPT
|
2012-04-23 03:14:34 +02:00
|
|
|
\$(MAKE) -C \$(POCO_BASE)/${comp}/testsuite clean
|
|
|
|
ENDOFSCRIPT
|
|
|
|
fi
|
2013-07-23 15:04:48 +02:00
|
|
|
|
|
|
|
if [ -f "${POCO_BASE}/${comp}/samples/Makefile" ] ; then
|
|
|
|
cat >>${target}/Makefile <<ENDOFSCRIPT
|
2012-04-23 03:14:34 +02:00
|
|
|
\$(MAKE) -C \$(POCO_BASE)/${comp}/samples clean
|
|
|
|
ENDOFSCRIPT
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
cat >>${target}/Makefile <<ENDOFSCRIPT
|
2013-07-23 15:04:48 +02:00
|
|
|
|
|
|
|
clean: cleans CppUnit-clean
|
2012-04-23 03:14:34 +02:00
|
|
|
|
|
|
|
distclean:
|
|
|
|
rm -rf \$(POCO_BUILD)/lib
|
|
|
|
find \$(POCO_BUILD) -name obj -type d -print0 | xargs -0 rm -rf
|
|
|
|
find \$(POCO_BUILD) -name .dep -type d -print0 | xargs -0 rm -rf
|
|
|
|
find \$(POCO_BUILD) -name bin -type d -print0 | xargs -0 rm -rf
|
|
|
|
ENDOFSCRIPT
|
|
|
|
|
|
|
|
|
|
|
|
#
|
2014-12-22 00:06:53 +01:00
|
|
|
# Create Visual Studio 9 build script
|
2012-04-23 03:14:34 +02:00
|
|
|
#
|
2014-12-22 00:06:53 +01:00
|
|
|
cat >${target}/build_vs90.cmd <<'ENDOFSCRIPT'
|
2012-04-23 03:14:34 +02:00
|
|
|
@echo off
|
2014-12-22 00:06:53 +01:00
|
|
|
if defined VS90COMNTOOLS (
|
|
|
|
call "%VS90COMNTOOLS%\vsvars32.bat")
|
|
|
|
buildwin 90 build shared both Win32 samples
|
2012-04-23 03:14:34 +02:00
|
|
|
ENDOFSCRIPT
|
|
|
|
|
|
|
|
|
|
|
|
#
|
2014-12-22 00:06:53 +01:00
|
|
|
# Create Visual Studio 10 build script
|
2012-04-23 03:14:34 +02:00
|
|
|
#
|
2014-12-22 00:06:53 +01:00
|
|
|
cat >${target}/build_vs100.cmd <<'ENDOFSCRIPT'
|
2012-04-23 03:14:34 +02:00
|
|
|
@echo off
|
2014-12-22 00:06:53 +01:00
|
|
|
if defined VS100COMNTOOLS (
|
|
|
|
call "%VS100COMNTOOLS%\vsvars32.bat")
|
2015-12-01 20:16:02 +01:00
|
|
|
buildwin 100 build shared both Win32 samples devenv
|
2012-04-23 03:14:34 +02:00
|
|
|
ENDOFSCRIPT
|
|
|
|
|
|
|
|
|
|
|
|
#
|
2014-12-22 00:06:53 +01:00
|
|
|
# Create Visual Studio 11 build script
|
2012-04-23 03:14:34 +02:00
|
|
|
#
|
2014-12-22 00:06:53 +01:00
|
|
|
cat >${target}/build_vs110.cmd <<'ENDOFSCRIPT'
|
2012-04-23 03:14:34 +02:00
|
|
|
@echo off
|
2014-12-22 00:06:53 +01:00
|
|
|
if defined VS110COMNTOOLS (
|
|
|
|
call "%VS110COMNTOOLS%\vsvars32.bat")
|
2015-12-01 20:16:02 +01:00
|
|
|
buildwin 110 build shared both Win32 samples devenv
|
2012-09-25 04:24:56 +02:00
|
|
|
ENDOFSCRIPT
|
|
|
|
|
|
|
|
|
|
|
|
#
|
2014-12-22 00:06:53 +01:00
|
|
|
# Create Visual Studio 12 build script
|
2012-09-25 04:24:56 +02:00
|
|
|
#
|
2014-12-22 00:06:53 +01:00
|
|
|
cat >${target}/build_vs120.cmd <<'ENDOFSCRIPT'
|
2012-09-25 04:24:56 +02:00
|
|
|
@echo off
|
2014-12-22 00:06:53 +01:00
|
|
|
if defined VS120COMNTOOLS (
|
|
|
|
call "%VS120COMNTOOLS%\vsvars32.bat")
|
2015-12-01 20:16:02 +01:00
|
|
|
buildwin 120 build shared both Win32 samples devenv
|
|
|
|
ENDOFSCRIPT
|
|
|
|
|
|
|
|
#
|
|
|
|
# Create Visual Studio 14 build script
|
|
|
|
#
|
|
|
|
cat >${target}/build_vs140.cmd <<'ENDOFSCRIPT'
|
|
|
|
@echo off
|
|
|
|
if defined VS140COMNTOOLS (
|
|
|
|
call "%VS140COMNTOOLS%\vsvars32.bat")
|
|
|
|
buildwin 140 build shared both Win32 samples devenv
|
2012-09-25 04:24:56 +02:00
|
|
|
ENDOFSCRIPT
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Create Visual Studio 9 WinCE build script
|
|
|
|
#
|
|
|
|
cat >${target}/build_CE_vs90.cmd <<'ENDOFSCRIPT'
|
|
|
|
@echo off
|
|
|
|
buildwin 90 build static_mt both WinCE samples
|
|
|
|
ENDOFSCRIPT
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Create Visual C++ Express 2008 build script
|
|
|
|
#
|
|
|
|
cat >${target}/build_vcexpress2008.cmd <<'ENDOFSCRIPT'
|
|
|
|
@echo off
|
|
|
|
buildwin 90 build shared both Win32 samples vcexpress
|
|
|
|
ENDOFSCRIPT
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Create Visual C++ Express 2010 build script
|
|
|
|
#
|
|
|
|
cat >${target}/build_vcexpress2010.cmd <<'ENDOFSCRIPT'
|
|
|
|
@echo off
|
|
|
|
buildwin 100 build shared both Win32 samples vcexpress
|
2012-04-23 03:14:34 +02:00
|
|
|
ENDOFSCRIPT
|
|
|
|
|
|
|
|
|
2015-08-16 19:47:50 +02:00
|
|
|
#
|
|
|
|
# Create Visual C++ Express 2012 build script
|
|
|
|
#
|
|
|
|
cat >${target}/build_vdexpress2012.cmd <<'ENDOFSCRIPT'
|
|
|
|
@echo off
|
|
|
|
buildwin 110 build shared both Win32 samples tests vdexpress
|
|
|
|
ENDOFSCRIPT
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Create Visual C++ Express 2013 build script
|
|
|
|
#
|
|
|
|
cat >${target}/build_vdexpress2013.cmd <<'ENDOFSCRIPT'
|
|
|
|
@echo off
|
|
|
|
buildwin 120 build shared both Win32 samples tests vdexpress
|
|
|
|
ENDOFSCRIPT
|
|
|
|
|
|
|
|
|
2012-04-23 03:14:34 +02:00
|
|
|
#
|
|
|
|
# Fix line endings
|
|
|
|
#
|
2012-12-26 05:43:02 +01:00
|
|
|
if [ "$lineEndConv" != "" ] ; then
|
|
|
|
$lineEndConv ${target}/build_vs90.cmd
|
|
|
|
$lineEndConv ${target}/build_vs100.cmd
|
2015-12-01 20:16:02 +01:00
|
|
|
$lineEndConv ${target}/build_vs110.cmd
|
|
|
|
$lineEndConv ${target}/build_vs120.cmd
|
|
|
|
$lineEndConv ${target}/build_vs140.cmd
|
2012-12-26 05:43:02 +01:00
|
|
|
$lineEndConv ${target}/build_CE_vs90.cmd
|
|
|
|
$lineEndConv ${target}/build_vcexpress2008.cmd
|
|
|
|
$lineEndConv ${target}/build_vcexpress2010.cmd
|
2015-08-16 19:47:50 +02:00
|
|
|
$lineEndConv ${target}/build_vdexpress2012.cmd
|
|
|
|
$lineEndConv ${target}/build_vdexpress2013.cmd
|
2012-12-26 05:43:02 +01:00
|
|
|
$lineEndConv ${target}/Makefile
|
|
|
|
$lineEndConv ${target}/components
|
2012-04-23 03:14:34 +02:00
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
|
|
# Create .tar and .zip archives
|
|
|
|
#
|
|
|
|
if [ "$output" = "" ] ; then
|
|
|
|
cd releases
|
|
|
|
find ${target}/ -print | sed "s:^${target}/*::" >${target}/MANIFEST
|
|
|
|
|
|
|
|
tar cf poco-${version}.tar poco-${version}
|
|
|
|
gzip poco-${version}.tar
|
|
|
|
|
|
|
|
tar cf poco-${version}.tar poco-${version}
|
|
|
|
bzip2 poco-${version}.tar
|
|
|
|
|
|
|
|
if [ -x /usr/bin/zip ] ; then
|
|
|
|
/usr/bin/zip -r -q poco-${version}.zip poco-${version}
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|
|
|
|
exit 0
|