Win32: Factor out make_install step, add make_install.sh.

Make_install.sh can be called in any build directory and will execute
`make install` and all the necessary extra steps after that.

Also, make prepare and finish ordinary steps that can be blocked and
inserted at will.  Add reset_steps.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16928 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Andreas Köhler
2008-02-06 22:50:56 +00:00
parent 4e87d41e05
commit 9ea5112f6c
4 changed files with 26 additions and 3 deletions

View File

@@ -267,6 +267,7 @@ set_default DOCS_DIR $GLOBAL_DIR\\gnucash-docs
# There is no reason to ever need to comment these out!
# * commented out glade, as it is not needed to run gnucash
add_step prepare
if [ "$CROSS_COMPILE" != "yes" ]; then
add_step inst_wget
add_step inst_dtk
@@ -309,6 +310,7 @@ if [ "$UPDATE_SOURCES" = "yes" ]; then
fi
add_step inst_gnucash
add_step inst_docs
add_step finish
# run commands registered with late_eval
eval_now

View File

@@ -9,6 +9,7 @@ function set_default() {
}
function block_step() { blocked_steps=("${blocked_steps[@]}" "$@"); }
function reset_steps() { steps=(); block_steps=(); }
function add_step() {
while [ "$1" ]; do
_is_blocked=

View File

@@ -1000,8 +1000,12 @@ function inst_gnucash() {
gnucash
qpopd
make install
make_install
qpopd
}
function make_install() {
make install
qpushd $_INSTALL_UDIR/lib
# Move modules that are compiled without -module to lib/gnucash and
@@ -1137,11 +1141,9 @@ function finish() {
fi
}
prepare
for step in "${steps[@]}" ; do
eval $step
done
finish
qpopd

View File

@@ -0,0 +1,18 @@
#!/bin/sh
set -e
function qpushd() { pushd "$@" >/dev/null; }
function qpopd() { popd >/dev/null; }
function unix_path() { echo "$*" | sed 's,^\([A-Za-z]\):,/\1,;s,\\,/,g'; }
qpushd "$(dirname $(unix_path "$0"))"
. functions.sh
. defaults.sh
reset_steps
. install.sh
prepare
qpopd
make_install