2010-06-10 Gary V. Vaughan <gary@gnu.org>
+ Support shell tracing inside functions even with ksh.
+ * libltdl/config/getopt.m4sh: Set $opt_debug to be either `:'
+ or `set -x' depending on whether --debug was parsed to match
+ usage in libtoolize.m4sh and ltmain.m4sh.
+ * clcommit.m4sh, libltdl/config/announce-gen.sh: Instead of
+ `$opt_debug && ...', use `test "$opt_debug" != ":" && ...'.
+ * clcommit.m4sh, libltdl/config/announce-gen.m4sh,
+ libltdl/config/getopt.m4sh, libltdl/connfig/mailnotify.m4sh:
+ Execute at the start of functions to cater to ksh, which
+ resets `-x' inside shell functions.
+
Fix a typu in HACKING.
* HACKING (Release Procedure): s/Makeflie/Makefile/.
[], [--tags], [], [],
[
# pass debug flag along to mailnotify
- $opt_debug &&
+ test "$opt_debug" != ":" &&
mailnotify_flags="${mailnotify_flags+$mailnotify_flags }--debug"
# validate $opt_first, $opt_file and $opt_message
# func_check_conflicts
func_check_conflicts ()
{
+ $opt_debug
+
func_verbose "checking for commit conflicts..."
if $GIT push --dry-run > "$push_conflicts" 2>&1; then :; else
cat "$push_conflicts" >&2
# func_check_commit_msg
func_check_commit_msg ()
{
+ $opt_debug
+
if test -z "$opt_changelog"; then
for f in ${1+"$@"}; do
case "$f" in
# func_commit
func_commit ()
{
+ $opt_debug
+
${PAGER-more} "$log_file" || exit $EXIT_FAILURE
sleep 1 # give the user some time for a ^C
# func_mailnotify
func_mailnotify ()
{
+ $opt_debug
+
notify_file="${log_dir}/notify"
func_verbose "Mailing commit notification to \"$opt_sendmail\""
}
# pass trace argument along to mailnotify too
- $opt_debug &&
+ test "$opt_debug" != ":" &&
mailnotify_flags="${mailnotify_flags+$mailnotify_flags }--debug"
# validate remaining command line args as destination addresses
# func_print_changelog_deltas
func_print_changelog_deltas ()
{
+ $opt_debug
+
# FIXME: Jim's announce-gen does something with ChangeLogs
# and cvs diff. We don't use CVS, and perl makes
# my eyes bleed... maybe I'll write this function
# func_print_checksums title filename...
func_print_checksums ()
{
+ $opt_debug
+
my_title="$1"; shift
test -n "$1" && {
# func_print_locations title url files
func_print_locations ()
{
+ $opt_debug
+
test -n "$3" && {
echo
echo "Here are the $1:"
# func_print_news_deltas
func_print_news_deltas ()
{
+ $opt_debug
+
my_news_file="$top_srcdir/NEWS"
my_skipping=:
# func_tool_versions toolname...
func_print_tool_versions ()
{
+ $opt_debug
+
test -n "$1" && {
echo
echo "This release was bootstrapped with the following tools:"
m4_define([m4go_printopts],
[
# Option defaults:
-opt_debug=false
+opt_debug=:
m4go_defaults
# Parse options once, thoroughly. This comes as soon as possible in the
opt="[$]1"
shift
case $opt in
- --debug|-x) opt_debug=:
+ --debug|-x) opt_debug='set -x'
func_echo "enabling shell trace mode"
- set -x
+ $opt_debug
;;
m4go_branches
-\?|-h) func_usage ;;
# Echo version message to standard output and exit.
func_version ()
{
+ $opt_debug
+
$SED -n '/(C)/!b go
:more
/\./!{
# Echo short help message to standard output and exit.
func_usage ()
{
+ $opt_debug
+
$SED -n '/^# Usage:/,/^# *.*--help/ {
s/^# //
s/^# *$//
# unless 'noexit' is passed as argument.
func_help ()
{
+ $opt_debug
+
$SED -n '/^# Usage:/,/# Report bugs to/ {
s/^# //
s/^# *$//
# exit_cmd.
func_missing_arg ()
{
+ $opt_debug
+
func_error "missing argument for $1."
exit_cmd=exit
}
# separated list of fully qualified destination addresses.
func_headers ()
{
+ $opt_debug
+
my_outfile="$1"
my_destination="$2"
my_sed_version_no='
# Send the only message part as a single mime mail part.
func_single_content ()
{
+ $opt_debug
+
my_outfile="$1"
$opt_dry_run || cat >> "$my_outfile" <<EOF
# Send the various message parts to OUTFILE as a multipart mime mail.
func_multipart_content ()
{
+ $opt_debug
+
my_outfile="$1"
boundary="boundary-${HOST}-$$-`date | tr ' :' -`"
$opt_dry_run || {
# sending domain.
func_sendmail ()
{
+ $opt_debug
+
my_infile="$1"
my_destination="$2"
my_from="$3"
# func_extract_email_from_header re_header headerfile
func_extract_email ()
{
+ $opt_debug
+
my_re_header="$1"
my_headerfile="$2"
$as_unset func_extract_email_result