Some improvements on installation from source.

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@785 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
meep-eep
2003-02-19 21:17:10 +00:00
parent ceb1cc1e56
commit 03b6d952b5
12 changed files with 35 additions and 18 deletions
+5
View File
@@ -0,0 +1,5 @@
This directory contains files used for building and installing
on unix-like environments.
There's no need to use any of those directly; type './build.sh' from
the top dir to get started.
@@ -1,9 +1,9 @@
#!/bin/sh
# Include build functions used here
. build/config_functions
. build/menu_functions
. build/ansi
. build/unix/config_functions
. build/unix/menu_functions
. build/unix/ansi
# Some requirements:
@@ -185,3 +185,8 @@ SUBSTITUTE_VARS="CFLAGS LDFLAGS MAKE DEBUG SOUNDMODULE HAVE_OPENGL \
SUBSTITUTE_FILES="build.vars"
substitute_vars SUBSTITUTE_VARS SUBSTITUTE_FILES
# Make 'uqm' shell script from build.vars.in, substituting variables.
SUBSTITUTE_VARS="INSTALL_LIBDIR INSTALL_BINDIR uqm_NAME"
SUBSTITUTE_FILES="build/unix/uqm"
substitute_vars SUBSTITUTE_VARS SUBSTITUTE_FILES
@@ -20,7 +20,7 @@
# You shouldn't need to change this file if your project changes.
# Read in the functions we need
. build/build_functions
. build/unix/build_functions
# Read in the config settings that affect the build, if present.
# Don't reread for every dir when recursing.
@@ -115,7 +115,7 @@ build_rec_collect_o_files() {
# Start the configure program.
build_config() {
$SH build/build.config
$SH build/unix/build.config
}
# Compile the lot.
@@ -192,16 +192,17 @@ build_check_compile() {
# Install the program
build_install() {
local BINS LIBS SRC DEST BINDIR LIBDIR
local BINS LIBS SRC DEST DESTDIR BINDIR LIBDIR
echo "Installing libraries..." 2>&1
eval LIBS="\${${BUILD_PROJECT}_INSTALL_LIBS}"
eval LIBDIR="\${${BUILD_PROJECT}_INSTALL_LIBDIR%/}/"
for LIB in $LIBS; do
eval SRC="\${${BUILD_PROJECT}_INSTALL_LIB_${LIB}_SRC%/}"
eval DEST="\$LIBDIR\${${BUILD_PROJECT}_INSTALL_LIB_${LIB}_DEST%/}"
if [ ! -d "$DEST" ]; then
mkdir -p -- "$DEST"
eval DEST="\$LIBDIR\${${BUILD_PROJECT}_INSTALL_LIB_${LIB}_DEST}"
DESTDIR="${DEST%/*}"
if [ ! -d "$DESTDIR" ]; then
mkdir -p -- "$DESTDIR"
fi
cp -r -- "$SRC" "$DEST"
done
@@ -211,9 +212,10 @@ build_install() {
eval BINDIR="\${${BUILD_PROJECT}_INSTALL_BINDIR%/}/"
for BIN in $BINS; do
eval SRC="\${${BUILD_PROJECT}_INSTALL_BIN_${BIN}_SRC%/}"
eval DEST="\$BINDIR\${${BUILD_PROJECT}_INSTALL_BIN_${BIN}_DEST%/}"
if [ ! -d "$DEST" ]; then
mkdir -p -- "$DEST"
eval DEST="\$BINDIR\${${BUILD_PROJECT}_INSTALL_BIN_${BIN}_DEST}"
DESTDIR="${DEST%/*}"
if [ ! -d "$DESTDIR" ]; then
mkdir -p -- "$DESTDIR"
fi
cp -r -- "$SRC" "$DEST"
done
@@ -373,7 +373,7 @@ EOF
# Include information about programs we can detect
. build/config_proginfo
. build/unix/config_proginfo
# Some initialisations
HAVE_SYMBOLS=""
+3
View File
@@ -0,0 +1,3 @@
#!/bin/sh
# Wrapper script for starting The Ur-Quan Masters
"@INSTALL_LIBDIR@uqm/uqm" "--contentdir=@INSTALL_LIBDIR@uqm/content" "$@"