JBoss Native SVN: r2560 - in trunk: build/unix/util and 2 other directories.
by jbossnative-commits@lists.jboss.org
Author: jfrederic.clere(a)jboss.com
Date: 2009-09-23 07:24:03 -0400 (Wed, 23 Sep 2009)
New Revision: 2560
Added:
trunk/build/unix/util/overridecp.sh
trunk/srclib/tomcat-native/tomcat-native-1.1/
trunk/srclib/tomcat-native/tomcat-native-1.1/NMAKEmakefile
Modified:
trunk/build/unix/build.sh
trunk/build/unix/buildsrc.jboss-native.sh
Log:
Allow several version of NMAKEmakefile to exit for jboss-native.
Modified: trunk/build/unix/build.sh
===================================================================
--- trunk/build/unix/build.sh 2009-09-17 09:29:28 UTC (rev 2559)
+++ trunk/build/unix/build.sh 2009-09-23 11:24:03 UTC (rev 2560)
@@ -458,42 +458,6 @@
package_output_dir=${build_working_dir}/${package_src_name}/output/${BUILD_TAG}
fi
-# Copy files according a rule like Override.
-# $1: source dir
-# $2: source file
-# $3: dest dir
-# $4: version (something like 1.2.3)
-# overridecp $build_top/../../srclib/ ${name_prod} ${version_prod} NMAKEmakefile $src_dir
-overridecp()
-{
- basedir=$1
- prod=$2
- versionstring=$3
- file=$4
- destdir=$5
- verpart=`echo $versionstring | sed 's:\.: :g'`
- verpart1=`echo $verpart | awk '{ print $1 }'`
- verpart2=`echo $verpart | awk '{ print $2 }'`
-
- srcfile=""
- if [ -f ${basedir}/${prod}/${file} ]; then
- srcfile=${basedir}/${prod}/${file}
- fi
- if [ -f ${basedir}/${prod}/${prod}-${verpart1}/${file} ]; then
- srcfile=${basedir}/${prod}/${prod}-${verpart1}/${file}
- fi
- if [ -f ${basedir}/${prod}/${prod}-${verpart1}.${verpart2}/${file} ]; then
- srcfile=${basedir}/${prod}/${prod}-${verpart1}.${verpart2}/${file}
- fi
- if [ -f ${basedir}/${prod}/${prod}-${versionstring}/${file} ]; then
- srcfile=${basedir}/${prod}/${prod}-${versionstring}/${file}
- fi
- if [ "${srcfile}x" != "x" ]; then
- echo "copying $srcfile $destdir"
- cp $srcfile $destdir
- fi
-}
-
# Override a shell command
# # $1=script $2..n
override()
@@ -1102,7 +1066,7 @@
cd $build_cache_dir
if [ ! -d ${src_dir} ]; then
downloadtaredsrc $src_url $src_url_back
- overridecp $build_top/../../srclib/ ${name_prod} ${version_prod} NMAKEmakefile $src_dir
+ util/overridecp.sh $build_top/../../srclib/ ${name_prod} ${version_prod} NMAKEmakefile $src_dir
applypatch $src_dir false
fi
cp -rp ${src_dir} ${package_src_dir}/srclib
Modified: trunk/build/unix/buildsrc.jboss-native.sh
===================================================================
--- trunk/build/unix/buildsrc.jboss-native.sh 2009-09-17 09:29:28 UTC (rev 2559)
+++ trunk/build/unix/buildsrc.jboss-native.sh 2009-09-23 11:24:03 UTC (rev 2560)
@@ -82,8 +82,8 @@
)
fi
-# Copy other files.
-cp ../../srclib/tomcat-native/NMAKEmakefile ${native_dist}/srclib/tomcat-native-${native_ext}
+# Copy other files. (Well one for the moment :-))
+build/overridecp.sh $build_top/../../srclib/ tomcat-native ${native_ext} NMAKEmakefile ${native_dist}/srclib/tomcat-native-${native_ext}
if $BUILD_WIN ; then
svn export --force ../../utils/windows/native/service ${native_dist}/service
Added: trunk/build/unix/util/overridecp.sh
===================================================================
--- trunk/build/unix/util/overridecp.sh (rev 0)
+++ trunk/build/unix/util/overridecp.sh 2009-09-23 11:24:03 UTC (rev 2560)
@@ -0,0 +1,59 @@
+#!/bin/sh
+# Copyright(c) 2009 Red Hat Middleware, LLC,
+# and individual contributors as indicated by the @authors tag.
+# See the copyright.txt in the distribution for a
+# full listing of individual contributors.
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library in the file COPYING.LIB;
+# if not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
+#
+# @author Jean-Frederic Clere
+
+# Copy files according a rule like Override.
+# $1: source dir
+# $2: product (apr, tomcat-native etc)
+# $3: version
+# $4: source file (file name)
+# $5: dest dir
+#
+# example:
+# overridecp $build_top/../../srclib/ ${name_prod} ${version_prod} NMAKEmakefile $src_dir
+#
+basedir=$1
+prod=$2
+versionstring=$3
+file=$4
+destdir=$5
+verpart=`echo $versionstring | sed 's:\.: :g'`
+verpart1=`echo $verpart | awk '{ print $1 }'`
+verpart2=`echo $verpart | awk '{ print $2 }'`
+
+srcfile=""
+if [ -f ${basedir}/${prod}/${file} ]; then
+ srcfile=${basedir}/${prod}/${file}
+fi
+if [ -f ${basedir}/${prod}/${prod}-${verpart1}/${file} ]; then
+ srcfile=${basedir}/${prod}/${prod}-${verpart1}/${file}
+fi
+if [ -f ${basedir}/${prod}/${prod}-${verpart1}.${verpart2}/${file} ]; then
+ srcfile=${basedir}/${prod}/${prod}-${verpart1}.${verpart2}/${file}
+fi
+if [ -f ${basedir}/${prod}/${prod}-${versionstring}/${file} ]; then
+ srcfile=${basedir}/${prod}/${prod}-${versionstring}/${file}
+fi
+if [ "${srcfile}x" != "x" ]; then
+ echo "copying $srcfile $destdir"
+ cp $srcfile $destdir
+fi
Property changes on: trunk/build/unix/util/overridecp.sh
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/srclib/tomcat-native/tomcat-native-1.1/NMAKEmakefile
===================================================================
--- trunk/srclib/tomcat-native/tomcat-native-1.1/NMAKEmakefile (rev 0)
+++ trunk/srclib/tomcat-native/tomcat-native-1.1/NMAKEmakefile 2009-09-23 11:24:03 UTC (rev 2560)
@@ -0,0 +1,141 @@
+# Copyright 2001-2006 The Apache Software Foundation or its licensors, as
+# applicable.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# ====================================================================
+#
+# NMAKEmakefile Master Tomcat Native makefile.
+# Usage:
+# STATIC=1 Use static version of the APR
+# DEBUG=1 Build DEBUG version of TCN
+#
+# Originally contributed by Mladen Turk <mturk jboss.com>
+#
+# ====================================================================
+#
+
+!IF !DEFINED(APR_DECLARE_STATIC) || "$(APR_DECLARE_STATIC)" == ""
+PROJECT = libtcnative-1
+APR_LIB = libapr-1.lib
+APU_LIB = libaprutil-1.lib
+!ELSE
+CFLAGS = -DAPR_DECLARE_STATIC -DAPU_DECLARE_STATIC $(CFLAGS)
+PROJECT = tcnative-1
+APR_LIB = apr-1.lib
+APU_LIB = aprutil-1.lib
+!ENDIF
+TARGET = DLL
+
+!include <..\..\NMAKEcommon.inc>
+
+!IF DEFINED(WITH_OPENSSL) && "$(WITH_OPENSSL)" != "no"
+CFLAGS = $(CFLAGS) -DZLIB_WINAPI -DNO_IDEA -DNO_RC5 -DNO_MDC2 -DOPENSSL_NO_IDEA \
+ -DOPENSSL_NO_RC5 -DOPENSSL_NO_MDC2 -DHAVE_OPENSSL -DHAVE_SSL_SET_STATE=1 \
+ -DTCN_DECLARE_EXPORT
+!ELSE
+CFLAGS = $(CFLAGS) -DZLIB_WINAPI -DTCN_DECLARE_EXPORT
+!ENDIF
+
+!IF !DEFINED(SRCDIR) || "$(SRCDIR)" == ""
+SRCDIR = .
+!ENDIF
+
+INCLUDES = -I$(SRCDIR)\include $(JAVA_INCLUDES)
+
+!IFNDEF WITH_APR
+!ERROR WITH_APR Not defined
+!ENDIF
+
+INCLUDES = $(INCLUDES) -I$(WITH_APR)\include\apr-1 -I$(WITH_APR)\include\apr-1\arch\win32
+!IF DEFINED(WITH_OPENSSL) && "$(WITH_OPENSSL)" != "no"
+INCLUDES = $(INCLUDES) -I$(WITH_OPENSSL)\include
+!ENDIF
+
+LDIRS = /libpath:"$(WITH_APR)\lib"
+
+LFLAGS = $(LFLAGS) /version:1.1
+LFLAGS = $(LFLAGS) user32.lib psapi.lib gdi32.lib shlwapi.lib wldap32.lib ole32.lib
+LFLAGS = $(LFLAGS) $(APR_LIB) $(APU_LIB)
+!IF DEFINED(WITH_OPENSSL) && "$(WITH_OPENSSL)" != "no"
+LFLAGS = $(LFLAGS) libeay32.lib ssleay32.lib
+LDIRS = $(LDIRS) /libpath:"$(WITH_OPENSSL)\lib"
+!ENDIF
+
+PDBFLAGS = -Fo$(WORKDIR)\ -Fd$(WORKDIR)\$(PROJECT)-src
+OBJECTS = \
+ $(WORKDIR)\address.obj \
+ $(WORKDIR)\bb.obj \
+ $(WORKDIR)\dir.obj \
+ $(WORKDIR)\error.obj \
+ $(WORKDIR)\file.obj \
+ $(WORKDIR)\info.obj \
+ $(WORKDIR)\jnilib.obj \
+ $(WORKDIR)\lock.obj \
+ $(WORKDIR)\misc.obj \
+ $(WORKDIR)\mmap.obj \
+ $(WORKDIR)\multicast.obj \
+ $(WORKDIR)\network.obj \
+ $(WORKDIR)\os.obj \
+ $(WORKDIR)\poll.obj \
+ $(WORKDIR)\pool.obj \
+ $(WORKDIR)\proc.obj \
+ $(WORKDIR)\shm.obj \
+ $(WORKDIR)\ssl.obj \
+ $(WORKDIR)\sslcontext.obj \
+ $(WORKDIR)\sslinfo.obj \
+ $(WORKDIR)\sslnetwork.obj \
+ $(WORKDIR)\sslutils.obj \
+ $(WORKDIR)\stdlib.obj \
+ $(WORKDIR)\user.obj \
+ $(WORKDIR)\thread.obj \
+ $(WORKDIR)\ntpipe.obj \
+ $(WORKDIR)\registry.obj \
+ $(WORKDIR)\system.obj
+
+BUILDLIB = $(PREFIX)\lib
+BUILDBIN = $(WORKDIR)\$(PROJECT).dll
+BUILDPDB = $(WORKDIR)\$(PROJECT).pdb
+BUILDRES = $(WORKDIR)\$(PROJECT).res
+BUILDMAN = $(BUILDBIN).manifest
+
+all : $(WORKDIR) $(BUILDBIN)
+
+$(BUILDLIB) :
+ @if not exist "$(BUILDLIB)\$(NULL)" mkdir "$(BUILDLIB)"
+
+$(WORKDIR) :
+ @$(MAKEWORKDIR)
+
+{$(SRCDIR)\src}.c{$(WORKDIR)}.obj:
+ $(CC) $(CFLAGS) $(INCLUDES) $(PDBFLAGS) $<
+
+{$(SRCDIR)\os\win32}.c{$(WORKDIR)}.obj:
+ $(CC) $(CFLAGS) $(INCLUDES) $(PDBFLAGS) $<
+
+$(OBJECTS): $(SRCDIR)\include\*.h
+
+$(BUILDRES): $(SRCDIR)\os\win32\libtcnative.rc $(SRCDIR)\include\*.h
+ $(RC) $(RCFLAGS) /i "$(SRCDIR)\include" /fo $(BUILDRES) $(SRCDIR)\os\win32\libtcnative.rc
+
+$(BUILDBIN): $(WORKDIR) $(OBJECTS) $(BUILDRES)
+ $(LINK) $(LFLAGS) $(OBJECTS) $(BUILDRES) $(LIBS) $(LDIRS) /pdb:$(BUILDPDB) /out:$(BUILDBIN)
+ IF EXIST $(BUILDMAN) \
+ mt -nologo -manifest $(BUILDMAN) -outputresource:$(BUILDBIN);2
+
+clean:
+ @$(CLEANTARGET)
+
+install: $(BUILDLIB) $(WORKDIR) $(BUILDBIN)
+ @xcopy "$(WORKDIR)\*.lib" "$(BUILDLIB)" /Y /Q
+ @xcopy "$(WORKDIR)\*.dll" "$(BUILDLIB)" /Y /Q