httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@hyperreal.org
Subject cvs commit: apache-1.3/src CHANGES
Date Mon, 27 Apr 1998 09:55:07 GMT
rse         98/04/27 02:55:07

  Modified:    .        STATUS configure
               src      CHANGES
  Log:
  Workaround sed limitations in APACI's configure script by now substituting in
  chunks of 50 commands.
  
  PR: 2136
  
  Revision  Changes    Path
  1.334     +1 -0      apache-1.3/STATUS
  
  Index: STATUS
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/STATUS,v
  retrieving revision 1.333
  retrieving revision 1.334
  diff -u -r1.333 -r1.334
  --- STATUS	1998/04/27 08:17:22	1.333
  +++ STATUS	1998/04/27 09:55:04	1.334
  @@ -69,6 +69,7 @@
       * Ralf's workaround for braindead awk when generating ap_config.h, PR#2139
       * Ralf's manual renaming of forgotten non-ap_-symbols because of #define
       * Ralf's fix for SOCKS4 and adding of additional SOCKS5 support, PR#2140
  +    * Ralf's workaround for sed limitation in configure script, PR#2136
   
   Available Patches:
   
  
  
  
  1.20      +52 -30    apache-1.3/configure
  
  Index: configure
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/configure,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- configure	1998/04/26 17:57:23	1.19
  +++ configure	1998/04/27 09:55:04	1.20
  @@ -74,6 +74,9 @@
   src=src
   aux=src/helpers
   
  +sedsubst=src/.apaci.sedsubst
  +addconf=src/.apaci.addconf
  +
   ##
   ##  pre-determine runtime modes
   ##
  @@ -185,7 +188,8 @@
   rules=`echo $rules | sed -e 's/^://'`
   
   #   determine modules
  -rm -f $src/Configuration.apaci 2>/dev/null
  +rm -f $addconf 2>/dev/null
  +touch $addconf
   modules=""
   modulelist=""
   OIFS="$IFS" IFS='
  @@ -406,10 +410,10 @@
               if [ ".$file" != ".$src/modules/extra/$modfilec" ]; then
                   cp $file $src/modules/extra/$modfilec
               fi
  -            echo "" >>$src/Configuration.apaci
  -            echo "## On-the-fly added module" >>$src/Configuration.apaci
  -            echo "## (configure --add-module=$file)" >>$src/Configuration.apaci
  -            echo "AddModule modules/extra/$modfileo" >>$src/Configuration.apaci
  +            echo "" >>$addconf
  +            echo "## On-the-fly added module" >>$addconf
  +            echo "## (configure --add-module=$file)" >>$addconf
  +            echo "AddModule modules/extra/$modfileo" >>$addconf
               module=`echo "$modfileo" |\
                       sed -e 's%^.*/\(.*\)$%\1%' \
                           -e 's/\.[^.]*$//' \
  @@ -432,10 +436,10 @@
                       ;;
               esac
               modfile=`echo $file | sed -e 's;^src/;;'`
  -            echo "" >>$src/Configuration.apaci
  -            echo "## On-the-fly activated module" >>$src/Configuration.apaci
  -            echo "## (configure --activate-module=$file)" >>$src/Configuration.apaci
  -            echo "AddModule $modfile" >>$src/Configuration.apaci
  +            echo "" >>$addconf
  +            echo "## On-the-fly activated module" >>$addconf
  +            echo "## (configure --activate-module=$file)" >>$addconf
  +            echo "AddModule $modfile" >>$addconf
               module=`echo "$modfile" |\
                       sed -e 's%^.*/\(.*\)$%\1%' \
                           -e 's/\.[^.]*$//' \
  @@ -783,8 +787,8 @@
   if [ .$quiet = .no ]; then
       echo "Creating Configuration.apaci in $src"
   fi
  -rm -f sedsubst 2>/dev/null
  -touch sedsubst
  +rm -f $sedsubst 2>/dev/null
  +touch $sedsubst
   
   #   generate settings from imported environment variables
   OIFS="$IFS" IFS="$DIFS"
  @@ -794,10 +798,10 @@
       if [ ".$val" != . ]; then
           case $var in 
               CFLAGS|LDFLAGS|LIBS|INCLUDES) 
  -                echo "s%^#*\\(EXTRA_$var=\\).*%\\1$val%g" >>sedsubst
  +                echo "s%^#*\\(EXTRA_$var=\\).*%\\1$val%g" >>$sedsubst
                   ;;
               *)
  -                echo "s%^#*\\($var=\\).*%\\1$val%g" >>sedsubst
  +                echo "s%^#*\\($var=\\).*%\\1$val%g" >>$sedsubst
                   ;;
           esac
           eval "$var=\"\"; export $var"
  @@ -810,7 +814,7 @@
   for rule in $rules; do
       name="`echo $rule | tr "a-z" "A-Z"`"
       eval "val=\$rule_$rule"
  -    echo "s%^\\(Rule $name=\\).*%\\1$val%g" >>sedsubst
  +    echo "s%^\\(Rule $name=\\).*%\\1$val%g" >>$sedsubst
       if [ $verbose = yes ]; then
           echo " + Rule $name=$val"
       fi
  @@ -846,17 +850,17 @@
   for module in $modules; do
       eval "add=\$module_$module"
       if [ $add = yes ]; then
  -        echo "s%^.*\\(AddModule.*$module\\..*\\)%\\1%g" >>sedsubst
  -        echo "s%^.*\\(SharedModule.*$module\\..*\\)%\\1%g" >>sedsubst
  +        echo "s%^.*\\(AddModule.*$module\\..*\\)%\\1%g" >>$sedsubst
  +        echo "s%^.*\\(SharedModule.*$module\\..*\\)%\\1%g" >>$sedsubst
           m="yes [static]"
       else
  -        echo "s%^.*\\(AddModule.*$module\\..*\\)%# \\1%g" >>sedsubst
  -        echo "s%^.*\\(SharedModule.*$module\\..*\\)%# \\1%g" >>sedsubst
  +        echo "s%^.*\\(AddModule.*$module\\..*\\)%# \\1%g" >>$sedsubst
  +        echo "s%^.*\\(SharedModule.*$module\\..*\\)%# \\1%g" >>$sedsubst
           m=no
       fi
       eval "share=\$shared_$module"
       if [ $share = yes ]; then
  -        echo "s%^\\(.*\\)AddModule\\(.*$module\\.\\)[oa]\\(.*\\)%\\1SharedModule\\2so\\3%g"
>>sedsubst
  +        echo "s%^\\(.*\\)AddModule\\(.*$module\\.\\)[oa]\\(.*\\)%\\1SharedModule\\2so\\3%g"
>>$sedsubst
           m="yes [shared]"
       fi
       if [ $verbose = yes ]; then
  @@ -865,17 +869,35 @@
   done
   IFS="$OIFS"
   
  -#   and finally translate the config template according to our situation
  -if [ -f $src/Configuration.apaci ]; then
  -    (cat $src/Configuration.tmpl;
  -     cat $src/Configuration.apaci ) |\
  -    sed -f sedsubst >$src/Configuration.apaci.tmp
  -    cp $src/Configuration.apaci.tmp $src/Configuration.apaci
  -    rm -f $src/Configuration.apaci.tmp
  -else
  -    cat $src/Configuration.tmpl | sed -f sedsubst >$src/Configuration.apaci
  -fi
  -rm -f sedsubst 2>/dev/null
  +#   split sedsubst into chunks of 50 commands
  +#   to workaround limits in braindead seds
  +files=`awk <$sedsubst '
  +    BEGIN { line=0; cnt=0; }
  +    {
  +        if (line % 50 == 0) {
  +            file = sedsubst "." cnt;
  +            printf("%s\n", file);
  +            cnt++;
  +        }
  +        line++;
  +        print $0 >file;
  +    }
  +' "sedsubst=$sedsubst"`
  +OIFS="$IFS" IFS="$DIFS"
  +substcmd=""
  +for file in $files; do
  +    substcmd="${substcmd} sed -f $file |"
  +done
  +substcmd="${substcmd} cat"
  +IFS="$OIFS"
  +
  +#   and finally translate the config template 
  +#   according to our defined configuration
  +eval "cat $src/Configuration.tmpl $addconf | $substcmd >$src/Configuration.apaci"
  +
  +#   cleanup
  +rm -f $sedsubst $sedsubst.[0-9] 2>/dev/null
  +rm -f $addconf 2>/dev/null
   
   ##
   ##  create all other Makefiles by running the proprietary 
  
  
  
  1.797     +5 -0      apache-1.3/src/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v
  retrieving revision 1.796
  retrieving revision 1.797
  diff -u -r1.796 -r1.797
  --- CHANGES	1998/04/27 08:17:24	1.796
  +++ CHANGES	1998/04/27 09:55:05	1.797
  @@ -1,5 +1,10 @@
   Changes with Apache 1.3b7
   
  +  *) Workaround sed limitations in APACI's configure script by now
  +     substituting in chunks of 50 commands (because for instance HPUX's vendor
  +     sed has a limit of max. 98 commands)
  +     [Ralf S. Engelschall] PR#2136
  +
     *) Adding SOCKS5 support and fixing existing SOCKS4 support.
        [Ralf S. Engelschall] PR#2140
   
  
  
  

Mime
View raw message