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
+6 -4
View File
@@ -13,13 +13,15 @@ uqm_CFLAGS="$uqm_CFLAGS -I src -I src/sc2code -I src/sc2code/libs"
# Stuff to install under the directory for libraries, as specified during # Stuff to install under the directory for libraries, as specified during
# config. # config.
uqm_INSTALL_LIBS=content uqm_INSTALL_LIBS="content executable"
uqm_INSTALL_LIB_content_SRC=content uqm_INSTALL_LIB_content_SRC=content
uqm_INSTALL_LIB_content_DEST=uqm/ uqm_INSTALL_LIB_content_DEST=uqm/
uqm_INSTALL_LIB_executable_SRC="$uqm_NAME"
uqm_INSTALL_LIB_executable_DEST=uqm/uqm
# Stuff to install under the directory for binaries, as specified during # Stuff to install under the directory for binaries, as specified during
# config. # config.
uqm_INSTALL_BINS=uqm uqm_INSTALL_BINS=wrapper
uqm_INSTALL_BIN_uqm_SRC="$uqm_NAME" uqm_INSTALL_BIN_wrapper_SRC="build/unix/uqm"
uqm_INSTALL_BIN_uqm_dest="" uqm_INSTALL_BIN_wrapper_DEST="uqm"
+1 -1
View File
@@ -22,5 +22,5 @@
SH="${SH:-/bin/sh}" SH="${SH:-/bin/sh}"
export SH export SH
$SH build/build.sh "$@" $SH build/unix/build.sh "$@"
+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 #!/bin/sh
# Include build functions used here # Include build functions used here
. build/config_functions . build/unix/config_functions
. build/menu_functions . build/unix/menu_functions
. build/ansi . build/unix/ansi
# Some requirements: # Some requirements:
@@ -185,3 +185,8 @@ SUBSTITUTE_VARS="CFLAGS LDFLAGS MAKE DEBUG SOUNDMODULE HAVE_OPENGL \
SUBSTITUTE_FILES="build.vars" SUBSTITUTE_FILES="build.vars"
substitute_vars SUBSTITUTE_VARS SUBSTITUTE_FILES 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. # You shouldn't need to change this file if your project changes.
# Read in the functions we need # Read in the functions we need
. build/build_functions . build/unix/build_functions
# Read in the config settings that affect the build, if present. # Read in the config settings that affect the build, if present.
# Don't reread for every dir when recursing. # Don't reread for every dir when recursing.
@@ -115,7 +115,7 @@ build_rec_collect_o_files() {
# Start the configure program. # Start the configure program.
build_config() { build_config() {
$SH build/build.config $SH build/unix/build.config
} }
# Compile the lot. # Compile the lot.
@@ -192,16 +192,17 @@ build_check_compile() {
# Install the program # Install the program
build_install() { build_install() {
local BINS LIBS SRC DEST BINDIR LIBDIR local BINS LIBS SRC DEST DESTDIR BINDIR LIBDIR
echo "Installing libraries..." 2>&1 echo "Installing libraries..." 2>&1
eval LIBS="\${${BUILD_PROJECT}_INSTALL_LIBS}" eval LIBS="\${${BUILD_PROJECT}_INSTALL_LIBS}"
eval LIBDIR="\${${BUILD_PROJECT}_INSTALL_LIBDIR%/}/" eval LIBDIR="\${${BUILD_PROJECT}_INSTALL_LIBDIR%/}/"
for LIB in $LIBS; do for LIB in $LIBS; do
eval SRC="\${${BUILD_PROJECT}_INSTALL_LIB_${LIB}_SRC%/}" eval SRC="\${${BUILD_PROJECT}_INSTALL_LIB_${LIB}_SRC%/}"
eval DEST="\$LIBDIR\${${BUILD_PROJECT}_INSTALL_LIB_${LIB}_DEST%/}" eval DEST="\$LIBDIR\${${BUILD_PROJECT}_INSTALL_LIB_${LIB}_DEST}"
if [ ! -d "$DEST" ]; then DESTDIR="${DEST%/*}"
mkdir -p -- "$DEST" if [ ! -d "$DESTDIR" ]; then
mkdir -p -- "$DESTDIR"
fi fi
cp -r -- "$SRC" "$DEST" cp -r -- "$SRC" "$DEST"
done done
@@ -211,9 +212,10 @@ build_install() {
eval BINDIR="\${${BUILD_PROJECT}_INSTALL_BINDIR%/}/" eval BINDIR="\${${BUILD_PROJECT}_INSTALL_BINDIR%/}/"
for BIN in $BINS; do for BIN in $BINS; do
eval SRC="\${${BUILD_PROJECT}_INSTALL_BIN_${BIN}_SRC%/}" eval SRC="\${${BUILD_PROJECT}_INSTALL_BIN_${BIN}_SRC%/}"
eval DEST="\$BINDIR\${${BUILD_PROJECT}_INSTALL_BIN_${BIN}_DEST%/}" eval DEST="\$BINDIR\${${BUILD_PROJECT}_INSTALL_BIN_${BIN}_DEST}"
if [ ! -d "$DEST" ]; then DESTDIR="${DEST%/*}"
mkdir -p -- "$DEST" if [ ! -d "$DESTDIR" ]; then
mkdir -p -- "$DESTDIR"
fi fi
cp -r -- "$SRC" "$DEST" cp -r -- "$SRC" "$DEST"
done done
@@ -373,7 +373,7 @@ EOF
# Include information about programs we can detect # Include information about programs we can detect
. build/config_proginfo . build/unix/config_proginfo
# Some initialisations # Some initialisations
HAVE_SYMBOLS="" 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" "$@"