blob: d9fa6ca5c83c805f06c58db81a5afc58644eba62 [file] [log] [blame]
#
# The Apache Software License, Version 1.1
#
# Copyright (c) 1999 The Apache Software Foundation. All rights
# reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in
# the documentation and/or other materials provided with the
# distribution.
#
# 3. The end-user documentation included with the redistribution,
# if any, must include the following acknowledgment:
# "This product includes software developed by the
# Apache Software Foundation (http://www.apache.org/)."
# Alternately, this acknowledgment may appear in the software itself,
# if and wherever such third-party acknowledgments normally appear.
#
# 4. The names "Xerces" and "Apache Software Foundation" must
# not be used to endorse or promote products derived from this
# software without prior written permission. For written
# permission, please contact apache\@apache.org.
#
# 5. Products derived from this software may not be called "Apache",
# nor may "Apache" appear in their name, without prior written
# permission of the Apache Software Foundation.
#
# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
# ====================================================================
#
# This software consists of voluntary contributions made by many
# individuals on behalf of the Apache Software Foundation, and was
# originally based on software copyright (c) 1999, International
# Business Machines, Inc., http://www.ibm.com . For more information
# on the Apache Software Foundation, please see
# <http://www.apache.org/>.
#
#
# $Log$
# Revision 1.7 1999/12/14 23:53:18 rahulj
# Removed the offending Ctrl-M's from the commit message
# logs which was giving packaging problems.
#
# PR:
# Obtained from:
# Submitted by:
# Reviewed by:
#
# Revision 1.6 1999/11/24 23:21:42 rahulj
# Now works under HPUX 10.20 with CC and aCC, with ICU and native
# distclean target now remove and remaining Makefile(s)
# clean target now removes the template repository directory
#
# Revision 1.5 1999/11/23 01:59:25 rahulj
# Code now works under HPUX 11. Tested inmemory message loader.
# Revamped makefiles. Builds with both DCE threads as well as pthread libraries.
#
# Revision 1.4 1999/11/12 21:14:32 rahulj
# fixed ver number.
#
# Revision 1.3 1999/11/12 20:38:48 rahulj
# Replaced XML4CROOT with XERCESCROOT.
#
# Revision 1.1.1.1 1999/11/09 01:02:54 twl
# Initial checkin
#
# Revision 1.4 1999/11/08 22:36:39 anupam
# Removed the overrided definition of XML4CROOT
#
# Revision 1.3 1999/11/08 20:44:09 rahul
# Swat for adding in Product name and CVS comment log variable.
#
#
###################################################################
# IMPORTANT NOTE #
###################################################################
# Before you try to run the Makefile, make sure you have two #
# environment variables set. #
# #
# export XERCESCROOT=<the directory where you installed XERCES-C> #
# export ICUROOT=<the directory where you installed ICU> #
# #
###################################################################
#MACROS defining commands
MKDIR=mkdir
CP=cp
CD=cd
RM=rm
CHMODE=chmod
UTIL_DIR = util
SAX_DIR = sax
INTERNAL_DIR = internal
FRAMEWORK_DIR = framework
DOM_DIR = dom
PARSERS_DIR = parsers
VALIDATORS_DTD_DIR = validators/DTD
ALL_OBJECTS_DIR = ${XERCESCROOT}/obj
LIB_DIR = ${XERCESCROOT}/lib
LIB = ${XERCESCROOT}/lib
LIBNAME = libxerces-c
THISLIB = ${LIB}/${LIBNAME}
VER = 1_0
ALL_OBJECTS = $(wildcard ${ALL_OBJECTS_DIR}/*.o)
#all these setting come from the arguments passed in to runConfigure.
PLATFORM = @platform@
CC = @cc@
CXX = @cxx@
PREFIX = @prefix@
MESSAGELOADER=@messageloader@
TRANSCODER=@transcoder@
PRODUCTNAME=xerces
PRODUCTVERSION=${VER}
BINTARGETDIR=${HOME}/${PRODUCTNAME}-c-${PLATFORM}-${CXX}-${PRODUCTVERSION}
all: Prepare Util Sax Internal Framework Parsers Dom Validators ${THISLIB}${VER}${SHLIBSUFFIX}
compile: Prepare Util Sax Internal Framework Parsers Dom Validators
lib: compile ${THISLIB}${VER}${SHLIBSUFFIX}
Prepare:
@echo Preparing the directory structure for a build ...
-${MKDIR} -p ${ALL_OBJECTS_DIR}
-${MKDIR} -p ${LIB_DIR}
${CD} $(UTIL_DIR) ; $(MAKE) includes ; ${CD} ..
${CD} $(SAX_DIR) ; $(MAKE) includes ; ${CD} ..
${CD} $(INTERNAL_DIR) ; $(MAKE) includes ; ${CD} ..
${CD} $(FRAMEWORK_DIR) ; $(MAKE) includes ; ${CD} ..
${CD} $(PARSERS_DIR) ; $(MAKE) includes ; ${CD} ..
${CD} $(VALIDATORS_DTD_DIR) ; $(MAKE) includes ; ${CD} ../..
${CD} $(DOM_DIR) ; $(MAKE) includes ; ${CD} ..
Util:
@echo Building "util"
${CD} $(UTIL_DIR) ; $(MAKE) $(MAKE_FLAGS) ; ${CD} ..
Sax:
@echo Building "sax"
${CD} $(SAX_DIR) ; $(MAKE) $(MAKE_FLAGS) ; ${CD} ..
Internal:
@echo Building "internal"
${CD} $(INTERNAL_DIR) ; $(MAKE) $(MAKE_FLAGS) ; ${CD} ..
Framework:
@echo Building "framework"
${CD} $(FRAMEWORK_DIR) ; $(MAKE) $(MAKE_FLAGS) ; ${CD} ..
Parsers:
@echo Building "parsers"
${CD} $(PARSERS_DIR) ; $(MAKE) $(MAKE_FLAGS) ; ${CD} ..
Dom:
@echo Building "dom"
${CD} $(DOM_DIR) ; $(MAKE) $(MAKE_FLAGS) ; ${CD} ..
Validators:
@echo Building "validators"
${CD} $(VALIDATORS_DTD_DIR) ; $(MAKE) $(MAKE_FLAGS) ; ${CD} ../..
${THISLIB}${VER}${SHLIBSUFFIX}:
@echo Building ${THISLIB}${VER}${SHLIBSUFFIX}
${CD} $(ALL_OBJECTS_DIR) ; $(MAKE) -k $(MAKE_FLAGS) ; ${CD} ..
install:
${CD} $(UTIL_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(SAX_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(INTERNAL_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(FRAMEWORK_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(PARSERS_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(DOM_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(VALIDATORS_DTD_DIR) && $(MAKE) $@ && ${CD} ../..
${CD} $(ALL_OBJECTS_DIR) && $(MAKE) $@ && ${CD} ..
clean:
${CD} $(UTIL_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(SAX_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(INTERNAL_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(FRAMEWORK_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(PARSERS_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(DOM_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(VALIDATORS_DTD_DIR) && $(MAKE) $@ && ${CD} ../..
${CD} $(ALL_OBJECTS_DIR) && $(MAKE) $@ && ${CD} ..
distclean:
${CD} $(UTIL_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(SAX_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(INTERNAL_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(FRAMEWORK_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(PARSERS_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(DOM_DIR) && $(MAKE) $@ && ${CD} ..
${CD} $(VALIDATORS_DTD_DIR) && $(MAKE) $@ && ${CD} ../..
${CD} $(ALL_OBJECTS_DIR) && $(MAKE) $@ && ${CD} ..
rm -f Makefile config.cache config.log config.status
find . -name Makefile -print -exec rm -f {} \;
rm -f *~ core
#docs:
samples:
${CD} ../samples; ${MAKE}; ${CD} ../src
copy: lib samples
@echo Make the target directory and its main subdirectories
-${MKDIR} ${BINTARGETDIR}
-${MKDIR} ${BINTARGETDIR}/bin
-${MKDIR} ${BINTARGETDIR}/lib
ifeq (${TRANSCODER},ICU)
echo -${MKDIR} ${BINTARGETDIR}/lib/icu
echo -${MKDIR} ${BINTARGETDIR}/lib/icu/data
echo -${MKDIR} ${BINTARGETDIR}/include/icu
endif
ifeq (${MESSAGELOADER},ICU)
echo -${MKDIR} ${BINTARGETDIR}/include/icu
endif
-${MKDIR} ${BINTARGETDIR}/include
-${MKDIR} ${BINTARGETDIR}/include/sax
-${MKDIR} ${BINTARGETDIR}/include/framework
-${MKDIR} ${BINTARGETDIR}/include/internal
-${MKDIR} ${BINTARGETDIR}/include/parsers
-${MKDIR} ${BINTARGETDIR}/include/util
-${MKDIR} ${BINTARGETDIR}/include/dom
-${MKDIR} ${BINTARGETDIR}/samples
-${MKDIR} ${BINTARGETDIR}/samples/data
-${MKDIR} ${BINTARGETDIR}/samples/SAXCount
-${MKDIR} ${BINTARGETDIR}/samples/SAXPrint
-${MKDIR} ${BINTARGETDIR}/samples/DOMCount
-${MKDIR} ${BINTARGETDIR}/samples/DOMPrint
-${MKDIR} ${BINTARGETDIR}/samples/Redirect
-${MKDIR} ${BINTARGETDIR}/samples/MemParse
-${MKDIR} ${BINTARGETDIR}/doc
-${MKDIR} ${BINTARGETDIR}/doc/apiDocs
@echo Populate the include output directory
@echo Copying headers files ...
-${CP} -Rf ${XERCESCROOT}/src/sax/*.hpp ${BINTARGETDIR}/include/sax
-${CP} -Rf ${XERCESCROOT}/src/framework/*.hpp ${BINTARGETDIR}/include/framework
-${CP} -Rf ${XERCESCROOT}/src/dom/DOM*.hpp ${BINTARGETDIR}/include/dom
-${CP} -Rf ${XERCESCROOT}/src/internal/*.hpp ${BINTARGETDIR}/include/internal
-${CP} -Rf ${XERCESCROOT}/src/internal/*.c ${BINTARGETDIR}/include/internal
-${CP} -Rf ${XERCESCROOT}/src/parsers/*.hpp ${BINTARGETDIR}/include/parsers
-${CP} -Rf ${XERCESCROOT}/src/util/*.hpp ${BINTARGETDIR}/include/util
-${CP} -Rf ${XERCESCROOT}/src/util/*.c ${BINTARGETDIR}/include/util
-${CP} -Rf ${ICUROOT}/include/* ${BINTARGETDIR}/include/icu
@echo Populate the binary output directory
@echo Copying binary outputs ...
-${CP} -Rf ${XERCESCROOT}/bin/* ${BINTARGETDIR}/bin
-${CP} -f ${ICUROOT}/source/tools/makeconv/makeconv ${BINTARGETDIR}/bin
-${CP} -f ${ICUROOT}/lib/libicu-uc.* ${BINTARGETDIR}/lib
-${CP} -f ${XERCESCROOT}/lib/*.a ${BINTARGETDIR}/lib
-${CP} -f ${XERCESCROOT}/lib/*.so ${BINTARGETDIR}/lib
-${CP} -f ${XERCESCROOT}/lib/*.sl ${BINTARGETDIR}/lib
-{RM} -rf ${BINTARGETDIR}/bin/obj
@echo Copy the locale files
-${CP} -f ${ICUROOT}/data/*.cnv ${BINTARGETDIR}/lib/icu/data/
-${CP} -f ${ICUROOT}/data/convrtrs.txt ${BINTARGETDIR}/lib/icu/data/
@echo Populate the samples directory
@echo Copying sample files ...
-${CP} -f ${XERCESCROOT}/samples/config.guess ${BINTARGETDIR}/samples
-${CP} -f ${XERCESCROOT}/samples/config.h.in ${BINTARGETDIR}/samples
-${CP} -f ${XERCESCROOT}/samples/config.sub ${BINTARGETDIR}/samples
-${CP} -f ${XERCESCROOT}/samples/configure ${BINTARGETDIR}/samples
-${CP} -f ${XERCESCROOT}/samples/configure.in ${BINTARGETDIR}/samples
-${CP} -f ${XERCESCROOT}/samples/install-sh ${BINTARGETDIR}/samples
-${CP} -f ${XERCESCROOT}/samples/runConfigure ${BINTARGETDIR}/samples
-${CP} -f ${XERCESCROOT}/samples/Makefile.in ${BINTARGETDIR}/samples
-${CP} -f ${XERCESCROOT}/samples/Makefile.incl ${BINTARGETDIR}/samples
-${CP} -f ${XERCESCROOT}/samples/Maefile ${BINTARGETDIR}/samples
-${CP} -Rf ${XERCESCROOT}/samples/data/* ${BINTARGETDIR}/samples/data
-${CP} -Rf ${XERCESCROOT}/samples/SAXCount/* ${BINTARGETDIR}/samples/SAXCount
-${CP} -Rf ${XERCESCROOT}/samples/SAXPrint/* ${BINTARGETDIR}/samples/SAXPrint
-${CP} -Rf ${XERCESCROOT}/samples/DOMCount/* ${BINTARGETDIR}/samples/DOMCount
-${CP} -Rf ${XERCESCROOT}/samples/DOMPrint/* ${BINTARGETDIR}/samples/DOMPrint
-${CP} -Rf ${XERCESCROOT}/samples/Redirect/* ${BINTARGETDIR}/samples/Redirect
-${CP} -Rf ${XERCESCROOT}/samples/MemParse/* ${BINTARGETDIR}/samples/MemParse
@echo Populate the docs directory
@echo Copying documentation ..
-${CP} -Rf ${XERCESCROOT}/doc/* ${BINTARGETDIR}/doc
-${CP} -Rf ${XERCESCROOT}/doc/apiDocs/* ${BINTARGETDIR}/doc/apiDocs
-${CP} ${XERCESCROOT}/Readme.html ${BINTARGETDIR}
-${CP} ${XERCESCROOT}/doc/license.html ${BINTARGETDIR}
@echo Change the directory permissions
-{CHMODE} 644 `find ${BINTARGETDIR} -type f`
-{CHMODE} 755 ${BINTARGETDIR}/bin/* ${BINTARGETDIR}/lib/*.sl ${BINTARGETDIR}/lib/*.so ${BINTARGETDIR}/lib/*.a
-{CHMODE} +x ${BINTARGETDIR}/samples/runConfigure ${BINTARGETDIR}/samples/configure ${BINTARGETDIR}/samples/install-sh
-{CHMODE} +x ${BINTARGETDIR}/samples/config.sub ${BINTARGETDIR}/samples/config.guess ${BINTARGETDIR}/samples/config.status
-{CHMODE} 755 `find ${BINTARGETDIR} -type d`
tarball: copy
@echo Now package it all up using tar
@echo TARing up all files ...
${CD} ${BINTARGETDIR}/..
tar -cvf ${BINTARGETDIR}.tar ${BINTARGETDIR}
@echo Finally compress the files
@echo Compressing ${BINTARGETDIR}.tar ...
gzip ${BINTARGETDIR}.tar
zip: copy
${CD} ${BINTARGETDIR}/..
@echo ZIPping up all files ...
zip -r ${BINTARGETDIR}.zip ${BINTARGETDIR}
package_bin: zip tarball