summaryrefslogtreecommitdiffhomepage
path: root/configure
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2020-01-03 23:57:22 +0000
committermidipix <writeonce@midipix.org>2020-01-04 00:07:49 +0000
commita8f1884d448a63ff82a4d3439b568d0333e79894 (patch)
treed1f01e0ec4558c26d6b1d4f0c10af3a08313831c /configure
parenta8acafe3b1d56d0efd53e87cf32d25fc5106ffc9 (diff)
downloadslibtool-a8f1884d448a63ff82a4d3439b568d0333e79894.tar.bz2
slibtool-a8f1884d448a63ff82a4d3439b568d0333e79894.tar.xz
build system: config.log: initial implementation.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure34
1 files changed, 32 insertions, 2 deletions
diff --git a/configure b/configure
index 607a974..1ce2ee8 100755
--- a/configure
+++ b/configure
@@ -52,6 +52,8 @@ output_step_prolog()
mb_line_dots="${mb_line_dots}${mb_line_dots}"
mb_step_desc="${mb_package} : ${1##*/} : ${2}() "
mb_step_dlen="$((${#mb_line_dots} - ${#mb_step_desc}))"
+
+ printf "configure step: ${2}()\n" >&3
printf "%s%${mb_step_dlen}.${mb_step_dlen}s " "${mb_step_desc}" "${mb_line_dots}"
}
@@ -64,6 +66,8 @@ output_script_status()
{
mb_step_name="${1##*/} : ${2}"
mb_step_desc="${mb_package} : ${mb_step_name}"
+
+ printf "configure info: ${2}\n" >&3
printf "%s\n" "${mb_step_desc}"
}
@@ -87,6 +91,20 @@ verify_safe_path()
esac
}
+init_log()
+{
+ exec 3> config.log
+
+ printf "This is config.log, generated by sofort's configure script.\n\n" >&3
+ printf '$ %s' "$mb_script" >&3
+
+ for arg in $mb_args; do
+ printf ' %s' "$arg" >&3
+ done
+
+ printf '\n\n' >&3
+}
+
init_vars()
{
mb_project_dir=$(cd -- "${mb_script%/*}/" ; pwd -P)
@@ -506,7 +524,7 @@ config_custom()
if [ _$mb_use_custom_cfgdefs = _yes ]; then
output_section_break
output_script_status ${mb_script} \
- 'invoking project-specific cfgdefs.sh ==>'
+ 'invoking project-specific cfgdefs.sh'
eval . $mb_project_dir/project/config/cfgdefs.sh \
"$mb_custom_cfgdefs_args"
@@ -518,7 +536,7 @@ config_custom()
if [ _$mb_use_custom_usrdefs = _yes ]; then
output_section_break
output_script_status ${mb_scirpt} \
- 'invoking project-specific usrdefs.sh ==>'
+ 'invoking project-specific usrdefs.sh'
. $mb_project_dir/project/usrdefs.sh
output_section_break
@@ -574,6 +592,8 @@ config_failure()
return 0
fi
+ printf 'configure info: exiting due to an error.\n' >&3
+
if [ -f Makefile ]; then
mb_error='failed to use the generated Makefile.'
printf '\n%s: error: %s\n' "${0}" "$mb_error" >&2
@@ -593,6 +613,16 @@ config_success()
# one: init
+mb_args=
+mb_args_space=
+
+for arg ; do
+ mb_escaped_arg=\'$(printf '%s\n' "$arg" | sed -e "s/'/'\\\\''/g")\'
+ mb_args="$mb_args$mb_args_space$mb_escaped_arg"
+ mb_args_space=' '
+done
+
+init_log
init_vars
verify_build_directory