From 472b9ed77838ccbcb24ab9a717c1683bc6f1b82e Mon Sep 17 00:00:00 2001 From: Pekka Riikonen Date: Mon, 18 Apr 2005 23:37:02 +0000 Subject: [PATCH] Compatibility kludges. --- apps/autodist/CHANGES | 2 ++ apps/autodist/autodist.in | 15 +++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/apps/autodist/CHANGES b/apps/autodist/CHANGES index c84bcf7..f17113f 100644 --- a/apps/autodist/CHANGES +++ b/apps/autodist/CHANGES @@ -2,6 +2,8 @@ Mon Apr 18 21:05:42 EEST 2005 Pekka Riikonen * Process '*.ad' files before calling autoconf and automake. + * Various shell compatibility kludges added. + Mon Apr 18 20:06:24 EEST 2005 Pekka Riikonen * Autodist 1.1. diff --git a/apps/autodist/autodist.in b/apps/autodist/autodist.in index 26f91c5..67a2663 100755 --- a/apps/autodist/autodist.in +++ b/apps/autodist/autodist.in @@ -35,7 +35,7 @@ # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then - # XXX We actually may not work on zsh + # Despite of this, we have managed to segfault some zsh's. emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which @@ -101,7 +101,7 @@ distdefs= undistdefs= # All distribution options -options= +doptions= opt_template=false opt_no_dist=false opt_no_inherit=false @@ -778,7 +778,7 @@ ad_makedist_makesane() ad_fatal "Makefile: No such file or directory" fi - configh=`grep "^CONFIG_HEADER" Makefile | cut -d= -f2 | sed 's/^[ \t]//'` + configh=`grep "^CONFIG_HEADER" Makefile | cut -d= -f2 | sed 's/^[ ]*//'` touch $am_distdir/$configh.in 1>/dev/null 2>/dev/null files=`find $am_distdir -name Makefile\.in` @@ -1114,10 +1114,10 @@ ad_parse_distribution() post_dist_hooks="$post_dist_hooks $podh" pre_p_dist_hooks="$pre_p_dist_hooks $prpdh" post_p_dist_hooks="$post_p_dist_hooks $popdh" - options="$options $opts" + doptions="$doptions $opts" - ad_handle_options "$options" - ad_debug "options=$options" + ad_handle_options "$doptions" + ad_debug "options=$doptions" fi # Return to caller @@ -1148,8 +1148,7 @@ ad_process_distdefs() distdefs=`echo $distdefs | sed s/$i//` done - rm -f autodist.tmp.defs autodist.pre.hooks autodist.post.hooks - rm -f autodist.pre.dist.hooks autodist.post.dist.hooks + rm -f autodist.tmp.defs # Remove duplicate distdefs for i in $distdefs -- 2.24.0