Compatibility kludges.
authorPekka Riikonen <priikone@silcnet.org>
Mon, 18 Apr 2005 23:37:02 +0000 (23:37 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Mon, 18 Apr 2005 23:37:02 +0000 (23:37 +0000)
apps/autodist/CHANGES
apps/autodist/autodist.in

index c84bcf738bbc8e1dfa950f23432eab3228f76752..f17113f25364d5be3ac7aa42927e767db6a9122f 100644 (file)
@@ -2,6 +2,8 @@ Mon Apr 18 21:05:42 EEST 2005  Pekka Riikonen <priikone@silcnet.org>
 
        * Process '*.ad' files before calling autoconf and automake.
 
+       * Various shell compatibility kludges added.
+
 Mon Apr 18 20:06:24 EEST 2005  Pekka Riikonen <priikone@silcnet.org>
 
        * Autodist 1.1.
index 26f91c582e4c177a35bde154fc7ae0735393ffaa..67a266314f42237d242ebe8e5282b42a64acdf09 100755 (executable)
@@ -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