rse 98/05/07 08:24:44
Modified: src CHANGES . .cvsignore Makefile.tmpl configure src/helpers mkshadow.sh Log: Cleanup of the `configure --shadow' process: - make sure the configure script creates its temporary files in the shadow tree to avoid conflicts with parallel configure runs - removed unnecessary option "-r" from "rm" call for Makefiles - make sure the configure scripts creates the shadow-wrapper Makefile only when no shadow trees already exists - make sure "make distclean" removes the shadow-wrapper Makefile but only when no more shadow trees exists - overhauled mkshadow.sh script: now its more IFS-safe and approx. twice as fast (in the past it needed 70sec, now it runs just 38sec) - make sure CVS does not complain about the created files Makefille.<gnutriple> and directories src.<gnutriple> Revision Changes Path 1.833 +14 -0 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.832 retrieving revision 1.833 diff -u -r1.832 -r1.833 --- CHANGES 1998/05/07 15:04:14 1.832 +++ CHANGES 1998/05/07 15:24:41 1.833 @@ -1,5 +1,19 @@ Changes with Apache 1.3b7 + *) Cleanup of the `configure --shadow' process: + - make sure the configure script creates its temporary files in the + shadow tree to avoid conflicts with parallel configure runs + - removed unnecessary option "-r" from "rm" call for Makefiles + - make sure the configure scripts creates the shadow-wrapper Makefile + only when no shadow trees already exists + - make sure "make distclean" removes the shadow-wrapper Makefile but only + when no more shadow trees exists + - overhauled mkshadow.sh script: now its more IFS-safe and approx. twice + as fast (in the past it needed 70sec, now it runs just 38sec) + - make sure CVS does not complain about the created files + Makefille.<gnutriple> and directories src.<gnutriple> + [Ralf S. Engelschall] + *) Added the AddVersionComponent and AddVersionPlatform core directives. The first allows the addition of arbitrary text to the Server-Version response header field value, augmenting the SERVER_SUBVERSION define in 1.2 +2 -0 apache-1.3/.cvsignore Index: .cvsignore =================================================================== RCS file: /export/home/cvs/apache-1.3/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- .cvsignore 1998/03/29 12:27:27 1.1 +++ .cvsignore 1998/05/07 15:24:42 1.2 @@ -1 +1,3 @@ Makefile +Makefile.* +src.* 1.33 +5 -1 apache-1.3/Makefile.tmpl Index: Makefile.tmpl =================================================================== RCS file: /export/home/cvs/apache-1.3/Makefile.tmpl,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- Makefile.tmpl 1998/05/06 15:17:57 1.32 +++ Makefile.tmpl 1998/05/07 15:24:43 1.33 @@ -453,5 +453,9 @@ distclean-shadow: $(RM) -r $(SRC) - $(RM) -r $(MKF) + $(RM) $(MKF) + [EMAIL PROTECTED] [ ".`ls $(TOP)/src.* 2>/dev/null`" = . ]; then \ + echo "$(RM) Makefile"; \ + $(RM) Makefile; \ + fi 1.23 +21 -14 apache-1.3/configure Index: configure =================================================================== RCS file: /export/home/cvs/apache-1.3/configure,v retrieving revision 1.22 retrieving revision 1.23 diff -u -r1.22 -r1.23 --- configure 1998/04/27 13:00:59 1.22 +++ configure 1998/05/07 15:24:43 1.23 @@ -73,7 +73,6 @@ mkf=Makefile src=src aux=src/helpers - sedsubst=src/.apaci.sedsubst addconf=src/.apaci.addconf @@ -265,34 +264,42 @@ --shadow) # determine GNU platform triple gnutriple=`$aux/GuessOS | awk '{ printf("%s",$1); }' | sed -e 's:/:-:g'` - # create Makefile wrapper - if [ .$quiet = .no ]; then - echo " + creating Makefile (shadow wrapper)" + # create Makefile wrapper (the first time only) + if [ ".`ls $top/src.* 2>/dev/null`" = . ]; then + if [ .$quiet = .no ]; then + echo " + creating Makefile (shadow wrapper)" + fi + echo "##" > Makefile + echo "## Apache Makefile (shadow wrapper)" >> Makefile + echo "##" >> Makefile + echo "" >> Makefile + echo "GNUTRIPLE=\`$aux/GuessOS | awk '{ printf(\"%s\",\$\$1); }' | sed -e 's:/:-:g'\`" >> Makefile + echo "" >> Makefile + echo "all build install install-quiet clean distclean:" >> Makefile + echo " @\$(MAKE) -f Makefile.\$(GNUTRIPLE) \$(MFLAGS) \$@" >> Makefile + echo "" >> Makefile fi - echo "##" > Makefile - echo "## Apache Makefile (shadow wrapper)" >> Makefile - echo "##" >> Makefile - echo "" >> Makefile - echo "GNUTRIPLE=\`$aux/GuessOS | awk '{ printf(\"%s\",\$\$1); }' | sed -e 's:/:-:g'\`" >> Makefile - echo "" >> Makefile - echo "all build install install-quiet clean distclean:" >> Makefile - echo " @\$(MAKE) -f Makefile.\$(GNUTRIPLE) \$(MFLAGS) \$@" >> Makefile - echo "" >> Makefile # set shadow paths shadowmkf="Makefile.$gnutriple" shadowsrc="src.$gnutriple" shadowaux="src.$gnutriple/helpers" + shadowsedsubst="src.$gnutriple/.apaci.sedsubst" + shadowaddconf="src.$gnutriple/.apaci.addconf" # (re)create shadow tree if [ .$quiet = .no ]; then echo " + create shadow tree ($shadowsrc)" fi rm -rf $shadowsrc - mkdir $shadowsrc $aux/mkshadow.sh $src $shadowsrc # delegate us to the shadow paths mkf=$shadowmkf src=$shadowsrc aux=$shadowaux + sedsubst=$shadowsedsubst + rm -f $addconf 2>/dev/null + addconf=$shadowaddconf + rm -f $addconf 2>/dev/null + touch $addconf ;; --help | -h | -help ) echo "Usage: configure [options]" 1.2 +40 -21 apache-1.3/src/helpers/mkshadow.sh Index: mkshadow.sh =================================================================== RCS file: /export/home/cvs/apache-1.3/src/helpers/mkshadow.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- mkshadow.sh 1998/03/29 12:27:35 1.1 +++ mkshadow.sh 1998/05/07 15:24:44 1.2 @@ -7,19 +7,40 @@ ## Apache's Autoconf-style Interface (APACI) ## +# default IFS +DIFS=' +' + +# source and destination directory src=`echo $1 | sed -e 's:/$::'` dst=`echo $2 | sed -e 's:/$::'` -aux=$3 + +# determine if source is an absolute path +case $src in + /* ) srcisabs=1 ;; + * ) srcisabs=0 ;; +esac + +# determine reverse directory to directory +case $dst in + /* ) dstrevdir='' ;; + * ) dstrevdir="`$src/helpers/fp2rp $dst`/" ;; +esac -# create directory tree +# create directory tree at destination +if [ ! -d $dst ]; then + mkdir $dst +fi DIRS="`cd $src find . -type d -print |\ sed -e '/\/CVS/d' \ -e '/^\.$/d' \ - -e 's/^\.\///'`" + -e 's:^\./::'`" +OIFS="$IFS" IFS="$DIFS" for dir in $DIRS; do mkdir $dst/$dir done +IFS="$OIFS" # fill directory tree with symlinks to files FILES="`cd $src @@ -31,34 +52,32 @@ -e '/\.cvsignore$/d' \ -e '/\/CVS/d' \ -e '/\.indent\.pro$/d' \ + -e '/\.apaci.*/d' \ -e '/Makefile$/d' \ -e '/\/\.#/d' \ -e '/\.orig$/d' \ -e 's/^\.\///'`" +OIFS="$IFS" IFS="$DIFS" for file in $FILES; do basename=`echo $file | sed -e 's:^.*/::'` dir=`echo $file | sed -e 's:[^/]*$::' -e 's:/$::' -e 's:$:/:' -e 's:^/$::'` from="$src/$file" to="$dst/$dir$basename" - case $from in - /* ) ;; - * ) - if [ ".$dir" != . ]; then - subdir=`echo $dir | sed -e 's:/$::'` - revdir=`$src/helpers/fp2rp $subdir` - from="$revdir/$from" - fi - ;; - esac - case $dst in - /* ) ;; - * ) - subdir=`echo $dst | sed -e 's:/$::'` - revdir=`$src/helpers/fp2rp $subdir` - from="$revdir/$from" - ;; - esac + if [ $srcisabs = 0 -a ".$dir" != . ]; then + subdir=`echo $dir | sed -e 's:/$::'` + # (inlined fp2rp) + revdir='' + OIFS2="$IFS"; IFS='/' + for pe in $subdir; do + revdir="../$revdir" + done + IFS="$OIFS2" + # finalize from + from="$revdir$from" + fi + from="$dstrevdir$from" echo " $to" ln -s $from $to done +IFS="$OIFS"