httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@engelschall.com (Ralf S. Engelschall)
Subject Re: cvs commit: apache-1.3 STATUS
Date Tue, 17 Mar 1998 16:07:22 GMT

In article <199803171603.LAA11505@devsys.jaguNET.com> you wrote:
> Ralf S. Engelschall wrote:
>> 
>> In article <199803171552.KAA10371@devsys.jaguNET.com> you wrote:
>> > Ralf S. Engelschall wrote:
>> >> 
>> >>   @@ -95,6 +95,7 @@
>> >>        * Dean's API_EXPORT and CORE_EXPORT cleanup for core functions
>> >>        * Ralf's new ApacheBench support program (src/support/ab.c)
>> >>        * Ken's change HIDE default to "yes", always include hide.h
>> >>   +    * Ralf's major Configure cleanup
>> >>    
>> 
>> > This uses shell functions... we have never allowed shell functions
>> > before in Configure because of the guideline that it use only
>> > System 7 shell capability...
>> 
>> > I like the changes, but I'm leaning towards voting that the functions
>> > be removed and coded some other way...
>> 
>> Although none of my test platforms had problems, we just can put the two
>> functions into src/helpers/.  How about this?

> I'm doing it now :) :)

<grins> Take this:

=============
#!/bin/sh
##
##  fp2rp -- convert a standard forward path to a reverse dotted path
##           (used by ../Configure script)
##
if [ "x$1" = x. ]; then
    rp="."
else
    rp=""
    for pe in `echo $1 | sed -e 's:/: :'`; do
        rp="../$rp"
    done
fi
echo $rp | sed -e 's:/$::'
=============

and this:

Index: Configure
===================================================================
RCS file: /e/apache/REPOS/apache-1.3/src/Configure,v
retrieving revision 1.211
diff -u -r1.211 Configure
--- Configure	1998/03/17 15:42:23	1.211
+++ Configure	1998/03/17 16:05:16
@@ -87,30 +87,6 @@
 SUBDIRS='$(OSDIR) main ap modules'
 
 ####################################################################
-## Some helper functions
-##
-fp2rp () {
-	if [ "x$1" = x. ]; then
-		rp="."
-	else
-	    rp=""
-        for pe in `echo $1 | sed -e 's:/: :'`; do
-		    rp="../$rp"
-        done
-	fi
-	echo $rp | sed -e 's:/$::'
-}
-mfhead () {
-    echo "##"
-    echo "##  Apache Makefile, automatically generated by Configure script."
-    echo "##  Hand-edited changes will be lost if the Configure script is re-run."
-    echo "##  Sources: - `fp2rp $1`/Makefile.config (via $file)"
-    echo "##           - ./Makefile.tmpl"
-    echo "##"
-    echo ""
-}
-
-####################################################################
 ## Now handle any arguments, which, for now, is -file
 ## to select an alternate Configuration file
 ##
@@ -218,7 +194,13 @@
 ## then fold in the modules that were included in Configuration
 ##
 echo "Creating Makefile"
-mfhead . > Makefile
+echo "##" > Makefile
+echo "##  Apache Makefile, automatically generated by Configure script." >>Makefile
+echo "##  Hand-edited changes will be lost if the Configure script is re-run." >>Makefile
+echo "##  Sources: - ./Makefile.config (via $file)" >>Makefile
+echo "##           - ./Makefile.tmpl" >>Makefile
+echo "##" >>Makefile
+echo "" >>Makefile
 
 ####################################################################
 ## Now we create a stub file, called Makefile.config, which
@@ -1300,15 +1282,27 @@
 MAKEDIRS="support main ap regex $OSDIR"
 for dir in $MAKEDIRS ; do
 	echo Creating Makefile in $dir
-	mfhead $dir > $dir/Makefile
+    echo "##" > $dir/Makefile
+    echo "##  Apache Makefile, automatically generated by Configure script." >>$dir/Makefile
+    echo "##  Hand-edited changes will be lost if the Configure script is re-run." >>$dir/Makefile
+    echo "##  Sources: - `helpers/fp2rp $dir`/Makefile.config (via $file)" >>$dir/Makefile
+    echo "##           - ./Makefile.tmpl" >>$dir/Makefile
+    echo "##" >>$dir/Makefile
+    echo "" >>$dir/Makefile
 	$CAT Makefile.config $dir/Makefile.tmpl |\
-	sed -e "s:^SRCDIR=.*:SRCDIR=`fp2rp $dir`:" >> $dir/Makefile
+	sed -e "s:^SRCDIR=.*:SRCDIR=`helpers/fp2rp $dir`:" >> $dir/Makefile
 done
 
 ####################################################################
 ## Now create the modules/Makefile
 ##
-mfhead modules > modules/Makefile
+echo "##" > modules/Makefile
+echo "##  Apache Makefile, automatically generated by Configure script." >>modules/Makefile
+echo "##  Hand-edited changes will be lost if the Configure script is re-run." >>modules/Makefile
+echo "##  Sources: - ../Makefile.config (via $file)" >>modules/Makefile
+echo "##           - ./Makefile.tmpl" >>modules/Makefile
+echo "##" >>modules/Makefile
+echo "" >>modules/Makefile
 $CAT Makefile.config | sed -e 's:^SRCDIR=.*:SRCDIR=..:' >> modules/Makefile
 
 $CAT << EOF >> modules/Makefile
@@ -1332,9 +1326,14 @@
 for moddir in $AUTODIRS ; do
 	echo "Creating Makefile in $moddir"
 
-    mfhead $moddir > $moddir/Makefile
+    echo "##" > $moddir/Makefile
+    echo "##  Apache Makefile, automatically generated by Configure script." >>$moddir/Makefile
+    echo "##  Hand-edited changes will be lost if the Configure script is re-run." >>$moddir/Makefile
+    echo "##  Sources: - `helpers/fp2rp $moddir`/Makefile.config (via $file)" >>$moddir/Makefile
+    echo "##           - ./Makefile.tmpl" >>$moddir/Makefile
+    echo "##" >>$moddir/Makefile
 	$CAT Makefile.config |\
-	sed -e "s:^SRCDIR=.*:SRCDIR=`fp2rp $moddir`:" >> $moddir/Makefile
+	sed -e "s:^SRCDIR=.*:SRCDIR=`helpers/fp2rp $moddir`:" >> $moddir/Makefile
 	$CAT << 'EOF' >> $moddir/Makefile
 ##
 ##  Default Makefile options from Configure script

                                       Ralf S. Engelschall
                                       rse@engelschall.com
                                       www.engelschall.com

Mime
View raw message