alvinalexander.com | career | drupal | java | mac | mysql | perl | scala | uml | unix  

Tomcat example source code file (buildconf)

This example Tomcat source code file (buildconf) is included in the DevDaily.com "Java Source Code Warehouse" project. The intent of this project is to help you "Learn Java by Example" TM.

Java - Tomcat tags/keywords

apache, asf, license, license, of, release, remove, remove, revision, revision, see, version, version, you

The Tomcat buildconf source code

#!/bin/sh
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You 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.
#
#

# Default place to look for apr source.  Can be overridden with 
#   --with-apr=[directory]
apr_src_dir=`pwd`/srclib/apr-1.2.7

while test $# -gt 0 
do
  # Normalize
  case "$1" in
  -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
  *) optarg= ;;
  esac

  case "$1" in
  --with-apr=*)
  apr_src_dir=$optarg
  ;;
  esac

  shift
done

if test -d "$apr_src_dir"
then
  echo ""
  echo "Looking for apr source in $apr_src_dir"
else
  echo ""
  echo "Problem finding apr source in $apr_src_dir."
  echo "Use:"
  echo "  --with-apr=[directory]" 
  exit 1
fi

# Remove some files, then copy them from apr source tree
rm -f build/apr_common.m4 build/find_apr.m4 build/install.sh \
      build/config.guess build/config.sub
cp $apr_src_dir/build/apr_common.m4 $apr_src_dir/build/find_apr.m4 \
   $apr_src_dir/build/install.sh $apr_src_dir/build/config.guess  \
   $apr_src_dir/build/config.sub build

# Remove aclocal.m4 as it'll break some builds...
rm -rf aclocal.m4 autom4te*.cache

echo "Creating configure ..."
### do some work to toss config.cache?
if ${AUTOCONF:-autoconf}; then
  :
else
  echo "autoconf failed"
  exit 1
fi

#
# Generate build-outputs.mk for the build systme
#
echo "Generating 'make' outputs ..."
$apr_src_dir/build/gen-build.py make

# Remove autoconf cache again
rm -rf autom4te*.cache

# Create RPM Spec file
if [ -f `which cut` ]; then
  echo rebuilding rpm spec file
  ( REVISION=`build/get-version.sh all include/tcn_version.h TCN`
    VERSION=`echo $REVISION | cut -d- -s -f1`
    RELEASE=`echo $REVISION | cut -d- -s -f2`
    if [ "x$VERSION" = "x" ]; then
      VERSION=$REVISION
      RELEASE=1
    fi
    cat ./build/rpm/tcnative.spec.in | \
    sed -e "s/TCN_VERSION/$VERSION/" \
        -e "s/TCN_RELEASE/$RELEASE/" \
    > tcnative.spec )
fi

Other Tomcat examples (source code examples)

Here is a short list of links related to this Tomcat buildconf source code file:

... this post is sponsored by my books ...

#1 New Release!

FP Best Seller

 

new blog posts

 

Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.

A percentage of advertising revenue from
pages under the /java/jwarehouse URI on this website is
paid back to open source projects.