httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerenkra...@apache.org
Subject cvs commit: httpd-2.0/build fastgen.sh
Date Thu, 18 Apr 2002 18:44:04 GMT
jerenkrantz    02/04/18 11:44:03

  Modified:    build    fastgen.sh
  Log:
  Simplify last commit by only calling cat once (this should hopefully resolve
  rbb's concern about maintainability and still address mine about annoying /s).
  
  Don't call mkdir when we are the top-level directory.  We *have* to have
  been created before hand.
  
  Also add this fix to the bsd_makefile section.
  
  Revision  Changes    Path
  1.19      +24 -18    httpd-2.0/build/fastgen.sh
  
  Index: fastgen.sh
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/build/fastgen.sh,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- fastgen.sh	18 Apr 2002 17:49:41 -0000	1.18
  +++ fastgen.sh	18 Apr 2002 18:44:03 -0000	1.19
  @@ -79,42 +79,48 @@
     for makefile in $@; do
       echo "creating $makefile"
       dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
  -    $mkdir_p "$dir/"
   
  +    if test -z "$dir"; then
  +        real_srcdir=$top_srcdir
  +        real_builddir=$top_builddir
  +        dir="."
  +    else
  +        $mkdir_p "$dir/"
  +        real_srcdir=$top_srcdir/$dir
  +        real_builddir=$top_builddir/$dir
  +    fi
       cat - $top_srcdir/$makefile.in <<EOF |sed 's/^include \(.*\)/.include "\1"/'
>$makefile 
   top_srcdir   = $top_srcdir
   top_builddir = $top_builddir
  -srcdir       = $top_srcdir/$dir
  -builddir     = $top_builddir/$dir
  -VPATH        = $top_srcdir/$dir
  +srcdir       = $real_srcdir
  +builddir     = $real_builddir
  +VPATH        = $real_srcdir
   EOF
       
  -    test -z "$dir" && dir="."
       touch $dir/.deps
     done
   else  
     for makefile in $@; do
       echo "creating $makefile"
       dir=`echo $makefile|sed 's%/*[^/][^/]*$%%'`
  -    $mkdir_p "$dir/"
  +
       if test -z "$dir"; then
  -        cat - $top_srcdir/$makefile.in <<EOF >$makefile
  -top_srcdir   = $top_srcdir
  -top_builddir = $top_builddir
  -srcdir       = $top_srcdir
  -builddir     = $top_builddir
  -VPATH        = $top_srcdir
  -EOF
  +        real_srcdir=$top_srcdir
  +        real_builddir=$top_builddir
           dir="."
       else
  -        cat - $top_srcdir/$makefile.in <<EOF >$makefile
  +        $mkdir_p "$dir/"
  +        real_srcdir=$top_srcdir/$dir
  +        real_builddir=$top_builddir/$dir
  +    fi
  +    cat - $top_srcdir/$makefile.in <<EOF >$makefile
   top_srcdir   = $top_srcdir
   top_builddir = $top_builddir
  -srcdir       = $top_srcdir/$dir
  -builddir     = $top_builddir/$dir
  -VPATH        = $top_srcdir/$dir
  +srcdir       = $real_srcdir
  +builddir     = $real_builddir
  +VPATH        = $real_srcdir
   EOF
  -    fi 
  +
       touch $dir/.deps
     done
   fi
  
  
  

Mime
View raw message