From 9ea5112f6cb85d6b2b70820d96c0eba2b8f32ea0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20K=C3=B6hler?= Date: Wed, 6 Feb 2008 22:50:56 +0000 Subject: [PATCH] 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 --- packaging/win32/defaults.sh | 2 ++ packaging/win32/functions.sh | 1 + packaging/win32/install.sh | 8 +++++--- packaging/win32/make_install.sh | 18 ++++++++++++++++++ 4 files changed, 26 insertions(+), 3 deletions(-) create mode 100644 packaging/win32/make_install.sh diff --git a/packaging/win32/defaults.sh b/packaging/win32/defaults.sh index e67de22155..d0ad56e1cf 100644 --- a/packaging/win32/defaults.sh +++ b/packaging/win32/defaults.sh @@ -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 diff --git a/packaging/win32/functions.sh b/packaging/win32/functions.sh index 42751a11e4..0c904068a5 100644 --- a/packaging/win32/functions.sh +++ b/packaging/win32/functions.sh @@ -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= diff --git a/packaging/win32/install.sh b/packaging/win32/install.sh index 4ae0dc45ff..a737666b43 100755 --- a/packaging/win32/install.sh +++ b/packaging/win32/install.sh @@ -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 diff --git a/packaging/win32/make_install.sh b/packaging/win32/make_install.sh new file mode 100644 index 0000000000..3c2473093c --- /dev/null +++ b/packaging/win32/make_install.sh @@ -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