aboutsummaryrefslogtreecommitdiff
path: root/cvs/cvsweb.cgi/code/tool/build/build?rev=1.5&content-type=text
diff options
context:
space:
mode:
authorneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
committerneodarz <neodarz@neodarz.net>2018-08-11 20:21:34 +0200
commit0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch)
tree2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /cvs/cvsweb.cgi/code/tool/build/build?rev=1.5&content-type=text
downloadnevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz
nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip
Initial commit
Diffstat (limited to 'cvs/cvsweb.cgi/code/tool/build/build?rev=1.5&content-type=text')
-rw-r--r--cvs/cvsweb.cgi/code/tool/build/build?rev=1.5&content-type=text/x-cvsweb-markup/index.html454
1 files changed, 454 insertions, 0 deletions
diff --git a/cvs/cvsweb.cgi/code/tool/build/build?rev=1.5&content-type=text/x-cvsweb-markup/index.html b/cvs/cvsweb.cgi/code/tool/build/build?rev=1.5&content-type=text/x-cvsweb-markup/index.html
new file mode 100644
index 00000000..ac25fe17
--- /dev/null
+++ b/cvs/cvsweb.cgi/code/tool/build/build?rev=1.5&content-type=text/x-cvsweb-markup/index.html
@@ -0,0 +1,454 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><HTML>
+<HEAD><style> A { color:black }</style>
+<!-- hennerik CVSweb $Revision: 1.93 $ -->
+<TITLE>code/tool/build/build - view - 1.5</TITLE></HEAD>
+<BODY BGCOLOR="#eeeeee">
+<table width="100%" border=0 cellspacing=0 cellpadding=1 bgcolor="#aaaaaa"><tr valign=bottom><td><a href="build"><IMG SRC="http://www.nevrax.org/inc/img/picto-up.gif" ALT="[BACK]" BORDER="0" WIDTH="14" HEIGHT="13"></a> <b>Return to <A HREF="build">build</A>
+ CVS log</b> <IMG SRC="http://www.nevrax.org/inc/img/picto-news.gif" ALT="[TXT]" BORDER="0" WIDTH="13" HEIGHT="15"></td><td align=right><IMG SRC="http://www.nevrax.org/inc/img/picto-dir.gif" ALT="[DIR]" BORDER="0" WIDTH="15" HEIGHT="13"> <b>Up to <a href="/cvs/cvsweb.cgi/">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/">code</a> / <a href="/cvs/cvsweb.cgi/code/tool/">tool</a> / <a href="/cvs/cvsweb.cgi/code/tool/build/">build</a></b></td></tr></table><HR noshade><table width="100%"><tr><td bgcolor="#ffffff">File: <a href="/cvs/cvsweb.cgi/">Nevrax</a> / <a href="/cvs/cvsweb.cgi/code/">code</a> / <a href="/cvs/cvsweb.cgi/code/tool/">tool</a> / <a href="/cvs/cvsweb.cgi/code/tool/build/">build</a> / <a href="/cvs/cvsweb.cgi/code/tool/build/build">build</a>&nbsp;(<A HREF="/cvs/cvsweb.cgi/~checkout~/code/tool/build/build?rev=1.5" target="cvs_checkout" onClick="window.open('/cvs/cvsweb.cgi/~checkout~/code/tool/build/build?rev=1.5','cvs_checkout','resizeable,scrollbars');"><b>download</b></A>)<BR>
+Revision <B>1.5</B>, <i>Tue May 21 15:44:16 2002 UTC</i> (6 weeks ago) by <i>valignat</i>
+<BR>Branch: <b>MAIN</b>
+<BR>CVS Tags: <b>HEAD</b><BR>Changes since <b>1.4: +3 -3
+ lines</b><PRE>
+#small cleanups
+</PRE>
+</td></tr></table><HR noshade><PRE>#!/bin/sh
+
+###########################################################################
+# $Id: build,v 1.5 2002/05/21 15:44:16 valignat Exp $
+###########################################################################
+###########################################################################
+###########################################################################
+# BUILD:
+#
+# &nbsp; &nbsp; This tool is aimed to help Nevrax programmers to manage the
+# &nbsp; &nbsp; compilation of a &quot;debug&quot; and a &quot;release&quot; version of NeL, NeLNS,
+# &nbsp; &nbsp; and Snowballs2 (<A HREF="http://www.nevrax.org">http://www.nevrax.org</A>) based on the same source
+# &nbsp; &nbsp; code and with the possibility to not having to re-compile everything
+# &nbsp; &nbsp; each time the compilation mode (debug/release) change.
+#
+# &nbsp; &nbsp; This script is a simple wrapper around the 'bootstrap'/'configure'
+# &nbsp; &nbsp; commands ('build init nel/nelns/snowballs ...'), and the 'make'
+# &nbsp; &nbsp; command ('build nel/nelns/snowballs ...').
+#
+# &nbsp; &nbsp; Example of use:
+#
+# &nbsp; &nbsp; &nbsp; &nbsp; $ build mode debug dynamic quiet
+# &nbsp; &nbsp; &nbsp; &nbsp; $ build init nel --enable-sound --enable-georges --enable-ai
+# &nbsp; &nbsp; &nbsp; &nbsp; $ build nel all install
+# &nbsp; &nbsp; &nbsp; &nbsp; $ build init nelns
+# &nbsp; &nbsp; &nbsp; &nbsp; $ build nelns all install
+# &nbsp; &nbsp; &nbsp; &nbsp; $ build init snowballs
+# &nbsp; &nbsp; &nbsp; &nbsp; $ build snowballs all install
+#
+# &nbsp; &nbsp; As you can see there is no need to specify the installed directory
+# &nbsp; &nbsp; of NeL, etc ... These informations are automaticly provided to the
+# &nbsp; &nbsp; configure script.
+#
+# &nbsp; &nbsp; Check the following variables to get an idea of the place of the
+# &nbsp; &nbsp; source code, object, and installed files.
+#
+# &nbsp; &nbsp; In quiet mode it use a perl script named 'buildquiet' which
+# &nbsp; &nbsp; &quot;cleanup&quot; the 'make' command output to only print the compiled
+# &nbsp; &nbsp; file name instead of the compilation command line.
+#
+###########################################################################
+
+
+###########################################################################
+###########################################################################
+###########################################################################
+# VARIABLES
+
+# Set the source directory. Use the environment SRC_DIR variable, if it's
+# not set, use $HOME/cvs as a default value
+SRC_DIR=&quot;$HOME/cvs&quot;
+
+# Build diretories
+BUILD_DEBUG=&quot;$HOME/build/debug&quot;
+BUILD_RELEASE=&quot;$HOME/build/release&quot;
+
+# Install directories
+INSTALL_DEBUG=&quot;$HOME/install/debug&quot;
+INSTALL_RELEASE=&quot;$HOME/install/release&quot;
+
+# PKG config
+STLPORT_DIR='/home/installs/STLport-4.5.3'
+PYTHON_VERSION=2
+
+# Compiler options
+BUILD_CFLAGS=&quot;$CFLAGS -pipe&quot;
+BUILD_CXXFLAGS=&quot;$CXXFLAGS -pipe&quot;
+
+# Configure options
+CONFIGURE_OPT=&quot;--disable-xmltest --enable-maintainer-mode&quot;
+
+###########################################################################
+
+# Flag files associated to each mode
+DEBUG_FILE=&quot;$HOME/.mode_debug&quot;
+STATIC_FILE=&quot;$HOME/.mode_static&quot;
+DYNAMIC_FILE=&quot;$HOME/.mode_dynamic&quot;
+SILENT_FILE=&quot;$HOME/.mode_silent&quot;
+
+# Specify the source code directory of each projects
+NEL_SRC=&quot;$SRC_DIR/code/nel&quot;
+SNOWBALLS_SRC=&quot;$SRC_DIR/code/snowballs2&quot;
+NELNS_SRC=&quot;$SRC_DIR/code/nelns&quot;
+
+
+###########################################################################
+###########################################################################
+###########################################################################
+# FUNCTIONS
+
+
+###########################################################################
+# Print command usage
+printUsage()
+{
+ &nbsp; &nbsp;echo &quot;&quot;
+ &nbsp; &nbsp;echo &quot;Usage: $BUILD_CMD mode [debug] [static] [dynamic] [quiet]&quot;
+ &nbsp; &nbsp;echo &quot; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; debug &nbsp; -&gt; turn ON/OFF debug compilation&quot;
+ &nbsp; &nbsp;echo &quot; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; static &nbsp;-&gt; turn ON/OFF static linking&quot;
+ &nbsp; &nbsp;echo &quot; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dynamic -&gt; turn ON/OFF dynamic linking&quot;
+ &nbsp; &nbsp;echo &quot; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; quiet &nbsp; -&gt; turn ON/OFF quiet &nbsp;compilation&quot;
+ &nbsp; &nbsp;echo &quot;&quot;
+ &nbsp; &nbsp;echo &quot;Usage: $BUILD_CMD [init] [nel | nelns | snowballs] [ARGS]&quot;
+ &nbsp; &nbsp;echo &quot; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; init &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;-&gt; init. the build system&quot;
+ &nbsp; &nbsp;echo &quot; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nel, nelns, snowballs -&gt; module to init./compile&quot;
+ &nbsp; &nbsp;echo &quot;&quot;
+ &nbsp; &nbsp;echo &quot; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ARGS with init are passed to the 'configure' script&quot;
+ &nbsp; &nbsp;echo &quot; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;otherwise they are passed to 'make'&quot;
+ &nbsp; &nbsp;echo &quot;&quot;
+}
+
+
+###########################################################################
+# Print status
+printMode()
+{
+ &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;Compilation modes :&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;echo &quot; &nbsp; Debug mode &nbsp; &nbsp; &nbsp;: $DEBUG_MODE&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;echo &quot; &nbsp; Static linking &nbsp;: $STATIC_MODE&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;echo &quot; &nbsp; Dynamic linking : $DYNAMIC_MODE&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;echo &quot; &nbsp; Quiet compilation &nbsp;: $SILENT_MODE&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;&quot;
+}
+
+
+###########################################################################
+# Print a message error (given in argument) and exit.
+printError()
+{
+ &nbsp; &nbsp;local MSG=$1
+
+ &nbsp; &nbsp;echo &quot;*** ERROR: $MSG ***&quot; &gt;&amp;2
+
+ &nbsp; &nbsp;exit 1
+}
+
+
+###########################################################################
+# Get the specific mode value and set the corresponding variable
+getMode()
+{
+ &nbsp; &nbsp;local VAR=$1
+ &nbsp; &nbsp;local FILE=$2
+
+ &nbsp; &nbsp;if test -f &quot;$FILE&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;eval $VAR=ON
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;eval $VAR=OFF
+ &nbsp; &nbsp;fi
+}
+
+
+###########################################################################
+# Set a specific mode to ON if it's OFF, and to OFF if its ON
+setMode()
+{
+ &nbsp; &nbsp;local VAR=$1
+ &nbsp; &nbsp;local FILE=$2
+ &nbsp; &nbsp;local OLD_VALUE NEW_VALUE
+
+ &nbsp; &nbsp;# Get the current mode value
+ &nbsp; &nbsp;OLD_VALUE=$(eval echo \$$VAR)
+
+ &nbsp; &nbsp;if test X&quot;$OLD_VALUE&quot; = &quot;XOFF&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;# Set the MODE to ON in case it's OFF
+ &nbsp; &nbsp; &nbsp; &nbsp;NEW_VALUE=ON
+ &nbsp; &nbsp; &nbsp; &nbsp;touch -f $FILE || printError &quot;cannot create mode file: $FILE&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;# Set the MODE to OFF in case it's ON
+ &nbsp; &nbsp; &nbsp; &nbsp;NEW_VALUE=OFF
+ &nbsp; &nbsp; &nbsp; &nbsp;rm -f $FILE || printError &quot;cannot delete mode file: $FILE&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;eval $VAR=$NEW_VALUE
+}
+
+
+###########################################################################
+###########################################################################
+###########################################################################
+
+BUILD_CMD=`basename $0`
+
+###########################################################################
+# Get current the mode settings
+getMode DEBUG_MODE &nbsp; $DEBUG_FILE
+getMode STATIC_MODE &nbsp;$STATIC_FILE
+getMode DYNAMIC_MODE $DYNAMIC_FILE
+getMode SILENT_MODE &nbsp;$SILENT_FILE
+
+
+###########################################################################
+###########################################################################
+###########################################################################
+# BUILDMODE / BUILD MODE call
+
+if test &quot;$BUILD_CMD&quot; = 'buildmode' -o &quot;$1&quot; = 'mode'
+then
+
+ &nbsp; &nbsp;if test &quot;$1&quot; = 'mode'
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;shift
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;# Print the mode values and exit if there is no argument
+ &nbsp; &nbsp;if test $# -eq 0
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;printMode
+ &nbsp; &nbsp; &nbsp; &nbsp;exit 0
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;while test $# -gt 0
+ &nbsp; &nbsp;do
+ &nbsp; &nbsp; &nbsp; &nbsp;case $1 in
+
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; debug)
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setMode DEBUG_MODE &nbsp; $DEBUG_FILE
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;;
+
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; static)
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setMode STATIC_MODE &nbsp;$STATIC_FILE
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;;
+
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; dynamic)
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setMode DYNAMIC_MODE $DYNAMIC_FILE
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;;
+
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; quiet|silent)
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setMode SILENT_MODE $SILENT_FILE
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;;
+
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; *) &nbsp;echo &quot;*** ERROR : $1 : Unknown building mode ***&quot; &gt;&amp;2
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; printUsage
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; exit 1
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ;;
+
+ &nbsp; &nbsp; &nbsp; &nbsp;esac
+
+ &nbsp; &nbsp; &nbsp; &nbsp;shift
+
+ &nbsp; &nbsp;done
+
+ &nbsp; &nbsp;printMode
+
+ &nbsp; &nbsp;exit 0
+
+fi
+
+
+###########################################################################
+###########################################################################
+# Default call: BUILD
+
+
+###########################################################################
+# Set the LD_LIBRARY_PATH variable to use the STLPORT
+if test -n &quot;$STLPORT_DIR&quot;
+then
+ &nbsp; &nbsp;CONFIGURE_OPT=&quot;$CONFIGURE_OPT --with-stlport=$STLPORT_DIR&quot;
+
+ &nbsp; &nbsp;if test -z &quot;$LD_LIBRARY_PATH&quot;
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;LD_LIBRARY_PATH=&quot;$STLPORT_DIR/lib&quot;
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;LD_LIBRARY_PATH=&quot;$STLPORT_DIR/lib:$LD_LIBRARY_PATH&quot;
+ &nbsp; &nbsp;fi
+fi
+
+# Set the configure option to use the rigth python version
+if test -n &quot;$PYTHON_VERSION&quot;
+then
+ &nbsp; &nbsp;CONFIGURE_OPT=&quot;$CONFIGURE_OPT --with-python-version=$PYTHON_VERSION&quot;
+fi
+
+
+###########################################################################
+
+echo &quot;&quot;
+echo &quot;Using source directory : $SRC_DIR&quot;
+
+# If we are in debug mode we use the debug build and install directories
+# Otherwise we use the release build and install directories
+if test &quot;$DEBUG_MODE&quot; = 'ON'
+then
+ &nbsp; &nbsp;BUILD_DIR=$BUILD_DEBUG
+ &nbsp; &nbsp;INSTALL_DIR=$INSTALL_DEBUG
+ &nbsp; &nbsp;CONFIGURE_OPT=&quot;$CONFIGURE_OPT --with-debug&quot;
+ &nbsp; &nbsp;PATH=&quot;$INSTALL_DEBUG/bin:$PATH&quot;
+ &nbsp; &nbsp;LD_LIBRARY_PATH=&quot;$INSTALL_DEBUG/lib:LD_LIBRARY_PATH&quot;
+else
+ &nbsp; &nbsp;BUILD_DIR=$BUILD_RELEASE
+ &nbsp; &nbsp;INSTALL_DIR=$INSTALL_RELEASE
+ &nbsp; &nbsp;BUILD_CFLAGS=&quot;$BUILD_CFLAGS -march=pentium&quot;
+ &nbsp; &nbsp;BUILD_CXXFLAGS=&quot;$BUILD_CXXFLAGS -march=pentium&quot;
+ &nbsp; &nbsp;PATH=&quot;$INSTALL_RELEASE/bin:$PATH&quot;
+ &nbsp; &nbsp;LD_LIBRARY_PATH=&quot;$INSTALL_RELEASE/lib:$LD_LIBRARY_PATH&quot;
+fi
+export PATH
+export LD_LIBRARY_PATH
+
+# Set where to install and where find NeL library files
+CONFIGURE_OPT=&quot;$CONFIGURE_OPT --prefix=$INSTALL_DIR --with-nel=$INSTALL_DIR&quot;
+
+# Get if it's a static and/or a dynamic compilation
+if test &quot;$STATIC_MODE&quot; != &quot;$DYNAMIC_MODE&quot;
+then
+ &nbsp; &nbsp;if test &quot;$STATIC_MODE&quot; = 'ON'
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;CONFIGURE_OPT=&quot;--enable-static=yes --enable-shared=no $CONFIGURE_OPT&quot;
+ &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp;if test &quot;$DYNAMIC_MODE&quot; = 'ON'
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;CONFIGURE_OPT=&quot;--enable-static=no --enable-shared=yes $CONFIGURE_OPT&quot;
+ &nbsp; &nbsp;fi
+else
+ &nbsp; &nbsp;if test &quot;$DYNAMIC_MODE&quot; = 'OFF' -a &quot;$STATIC_MODE&quot; = 'OFF'
+ &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;*** ERROR: You must set building of static and/or dynamic libraries ***&quot; &gt;&amp;2
+ &nbsp; &nbsp; &nbsp; &nbsp;printUsage
+ &nbsp; &nbsp; &nbsp; &nbsp;exit 1
+ &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp;echo &quot;*** WARNING: Building both static and dynamic libraries ***&quot; &gt;&amp;2
+ &nbsp; &nbsp;fi
+fi
+
+if test $# -eq 0
+then
+ &nbsp; &nbsp;echo &quot;*** ERROR: You have to decide what to do !... ***&quot; &gt;&amp;2
+ &nbsp; &nbsp;printUsage
+ &nbsp; &nbsp;exit 1
+fi
+
+
+case $1 in
+
+ &nbsp; &nbsp;# Modules initialisation
+ &nbsp; &nbsp;init)
+ &nbsp; &nbsp; &nbsp; &nbsp;BUILD_ARG=$2
+
+ &nbsp; &nbsp; &nbsp; &nbsp;buildmode
+
+ &nbsp; &nbsp; &nbsp; &nbsp;case &quot;$BUILD_ARG&quot; in
+
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nel|nelns|snowballs)
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Create the build directories
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if test ! -d $BUILD_DIR/$BUILD_ARG
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo -n &quot;Creating $BUILD_DIR/$ARG ...&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mkdir -p $BUILD_DIR/$BUILD_ARG \
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|| printError &quot;cannot create the $BUILD_DIR/$BUILD_ARG directory&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;echo &quot; done&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Erase the already existing configuration cache
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;rm -f $BUILD_DIR/$BUILD_ARG/config.cache \
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$BUILD_DIR/$BUILD_ARG/config.h
+
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;shift
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;shift
+
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Run the bootstrap script
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cd &nbsp;$SRC_DIR/code/$BUILD_ARG \
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;|| printError &quot;You must get the source files first !...&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;./bootstrap
+
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Run the configure script
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cd $BUILD_DIR/$BUILD_ARG
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFLAGS=&quot;$BUILD_CFLAGS&quot; CXXFLAGS=&quot;$BUILD_CXXFLAGS&quot; \
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;$SRC_DIR/code/$BUILD_ARG/configure $CONFIGURE_OPT $* || exit 1
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;
+
+ &nbsp; &nbsp; &nbsp; &nbsp;*) &nbsp;echo &quot;*** ERROR: $BUILD_ARG : Unknown module ***&quot; &gt;&amp;2
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printUsage
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;exit 1
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;;;
+
+ &nbsp; &nbsp; &nbsp; &nbsp;esac
+ &nbsp; &nbsp; &nbsp; &nbsp;;;
+
+ &nbsp; &nbsp;# Modules compilation
+ &nbsp; &nbsp;nel|nelns|snowballs)
+ &nbsp; &nbsp; &nbsp; &nbsp;BUILD_MODULE=$1
+ &nbsp; &nbsp; &nbsp; &nbsp;shift
+
+ &nbsp; &nbsp; &nbsp; &nbsp;# VPATH compilation and NeL include's Makefile.am command
+ &nbsp; &nbsp; &nbsp; &nbsp;# '$(wildcard *.h)' doesn't like each other very much. So the
+ &nbsp; &nbsp; &nbsp; &nbsp;# include files must be copied in NeL's compilation directory
+ &nbsp; &nbsp; &nbsp; &nbsp;# before each build (in case one or several header files changed).
+ &nbsp; &nbsp; &nbsp; &nbsp;if test &quot;$BUILD_MODULE&quot; = &quot;nel&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Delete any existing include file in the compilation
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# directory to avoid any kind of conflict
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if test -d $BUILD_DIR/nel/include/nel
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cd $BUILD_DIR/nel/include/nel
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;find . -type f -name \*.h -exec rm -rf \{\} \;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;printError &quot;You must get the source files first !...&quot;
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Copy the headers
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mkdir -p $BUILD_DIR/nel \
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&amp;&amp; cp -Rfdp $NEL_SRC/include $BUILD_DIR/nel
+
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# Remove from the compilation directory the useless CVS
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;# informations
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;cd $BUILD_DIR/nel/include \
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&amp;&amp; find . -prune -type d -name CVS -exec rm -rf \{\} \;
+
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+
+ &nbsp; &nbsp; &nbsp; &nbsp;cd $BUILD_DIR/$BUILD_MODULE || exit 1
+
+ &nbsp; &nbsp; &nbsp; &nbsp;# Launch make in silent mode or not, depending of the config.
+ &nbsp; &nbsp; &nbsp; &nbsp;if test $SILENT_MODE = 'ON'
+ &nbsp; &nbsp; &nbsp; &nbsp;then
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;make $* | buildquiet
+ &nbsp; &nbsp; &nbsp; &nbsp;else
+ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;make $*
+ &nbsp; &nbsp; &nbsp; &nbsp;fi
+ &nbsp; &nbsp; &nbsp; &nbsp;;;
+
+ &nbsp; &nbsp;*) &nbsp;echo &quot;*** ERROR: $1 : Unknown argument ***&quot; &gt;&amp;2
+ &nbsp; &nbsp; &nbsp; &nbsp;printUsage
+ &nbsp; &nbsp; &nbsp; &nbsp;exit 1
+ &nbsp; &nbsp; &nbsp; &nbsp;;;
+
+esac
+
+exit 0
+
+# End of file
+
+</PRE> \ No newline at end of file