You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jim Jagielski <ji...@devsys.jaguNET.com> on 1999/06/24 00:29:30 UTC

PATCH: Allow for greater depth in modules directory

Right now, modules added using AddModule must exist exactly one layer
under ./modules. This restriction results in a jumbled directory.
This patch removes this restriction.

This is for 1.3.7-dev. The patch is being applied to the -2.0
tree already. Note that it is subsequently easy after this to make
the minor changes that modules can be located ANYWHERE, even
outside of the Apache tree. This was recently suggested as
a "desirable" option :)

--- Configure.orig	Wed Jun 23 10:32:39 1999
+++ Configure	Wed Jun 23 17:59:35 1999
@@ -1479,10 +1479,12 @@
 	    }
     	}
 	(($1 == "AddModule" || $1 == "SharedModule") && $2 ~ /^modules\//) { 
-	    split ($2, pp, "/")
-	    if (! SEEN[pp[2]]) {
-		printf "%s ", pp[2]
-		SEEN[pp[2]] = 1
+	    count = split ($2, pp, "/")
+	    dir = pp[2]
+	    for (i = 3; i < count; i++) dir = dir "/" pp[i] 
+	    if (! SEEN[dir]) {
+		printf "%s ", dir
+		SEEN[dir] = 1
 	    } 
     	}'`
 MODDIRS_NO_SO=`awk < $tmpfile '
@@ -1494,10 +1496,12 @@
 	    }
     	}
 	(($1 == "AddModule") && $2 ~ /^modules\//) { 
-	    split ($2, pp, "/")
-	    if (! SEEN[pp[2]]) {
-		printf "%s ", pp[2]
-		SEEN[pp[2]] = 1
+	    count = split ($2, pp, "/")
+	    dir = pp[2]
+	    for (i = 3; i < count; i++) dir = dir "/" pp[i] 
+	    if (! SEEN[dir]) {
+		printf "%s ", dir
+		SEEN[dir] = 1
 	    } 
     	}'`
 
@@ -1753,9 +1757,10 @@
 done
 for moddir in $MODDIRS_NO_SO
 do
-	if [ -f modules/$moddir/Makefile.tmpl ] ; then
-		AUTOLIBS="$AUTOLIBS modules/$moddir/lib$moddir.a"
-	fi
+        if [ -f modules/$moddir/Makefile.tmpl ] ; then
+		autolibn=`echo $moddir | sed 's@.*/@@'`
+		AUTOLIBS="$AUTOLIBS modules/$moddir/lib$autolibn.a"
+        fi
 done
 
 ####################################################################
@@ -1776,8 +1781,9 @@
     END {
 	print "MODULES= \\"
 	for (i = 0; i < n; ++i) {
-	    split (modules[i], pp, "/")
-	    dir = pp[1] "/" pp[2] 
+	    count = split (modules[i], pp, "/")
+	    dir = pp[1]
+	    for (j = 2; j < count; j++) dir = dir "/" pp[j] 
 	    inthere = 0
 	    for ( tdir in autodirs ) {
 		if (tdir == dir) 
@@ -2135,11 +2141,11 @@
 INCDIR=$(SRCDIR)/include
 EOF
 	if [ -f $moddir/Makefile.libdir ]; then
-	    basedir=`echo $moddir | sed 's@^[^/]*/@@g'`
+	    basedir=`echo $moddir | sed 's@^[^/]*/@@g' | sed 's@/@\\\\/@g'`
 	    awk >> $moddir/Makefile < $tmpfile '
 		($2 ~ /^modules\/'$basedir'\//) {
-		    split($2, pp, "/");
-		    split(pp[3], parts, ".");
+		    count = split($2, pp, "/");
+		    split(pp[count], parts, ".");
 		    libext=parts[2];
 		}
 		END { 
@@ -2147,11 +2153,11 @@
 		}'
 	    # it's responsible for the rest of its Makefile...
 	else
-	    basedir=`echo $moddir | sed 's@^[^/]*/@@g'`
+	    basedir=`echo $moddir | sed 's@^[^/]*/@@g' | sed 's@/@\\\\/@g'`
 	    OBJS=`awk < $tmpfile '
 		($1 == "Module" && $3 ~ /^modules\/'$basedir'\//) { 
-		    split ($3, pp, "/")
-		    printf "%s ", pp[3] 
+		    count = split ($3, pp, "/")
+		    printf "%s ", pp[count] 
 		} 
 		'`
 	    echo "OBJS=$OBJS" >> $moddir/Makefile
@@ -2163,10 +2169,10 @@
 	    fi
 	    awk >> $moddir/Makefile < $tmpfile '
 	    ($1 == "SharedModule" && $2 ~ /^modules\/'$basedir'\//) {
-		split($2, pp, "/")
-		shlibs=shlibs " " pp[3]
-		so=pp[3]
-		split(pp[3], parts, ".")
+		count = split($2, pp, "/")
+		shlibs=shlibs " " pp[count]
+		so=pp[count]
+		split(pp[count], parts, ".")
 		base=parts[1]
 		objspic=objspic " " base ".lo"
 	    }
-- 
===========================================================================
   Jim Jagielski   |||   jim@jaguNET.com   |||   http://www.jaguNET.com/
            "That's no ordinary rabbit... that's the most foul,
            cruel and bad-tempered rodent you ever laid eyes on"

Re: PATCH: Allow for greater depth in modules directory

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Ben Hyde wrote:
> 
> A very desirable option.
> 
> I have no fear of work proceeding in the 1.3 branch
> at the same time as it proceeds in the 2.0 family.  If
> people don't want to work in the 1.3 branch, then don't.
> I no longer think it is good to try and force a shift of
> labor toward the 2.0 branch, it should attract labor
> on it's merits.

But not shoehorning in possibly destabilising bits right
before our 'last stable release before wholsesale 2.0 work.'
I want to get 1.3.7 out for that reason, and also because
its tag&release is holding up moving the hybrid work into
the 2.0 module.  Let's get a stable 1.3.7 out, move the
hybrid stuff, and *then* let people work on whichever stream
they want.
-- 
#ken    P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Software Foundation  <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>

Re: PATCH: Allow for greater depth in modules directory

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Ben Hyde wrote:
> 
> A very desirable option.
> 
> I have no fear of work proceeding in the 1.3 branch
> at the same time as it proceeds in the 2.0 family.  If
> people don't want to work in the 1.3 branch, then don't.
> I no longer think it is good to try and force a shift of
> labor toward the 2.0 branch, it should attract labor
> on it's merits.

But not shoehorning in possibly destabilising bits right
before our 'last stable release before wholsesale 2.0 work.'
I want to get 1.3.7 out for that reason, and also because
its tag&release is holding up moving the hybrid work into
the 2.0 module.  Let's get a stable 1.3.7 out, move the
hybrid stuff, and *then* let people work on whichever stream
they want.
-- 
#ken    P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Software Foundation  <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>

Re: In need of an NT version of 'ab'

Posted by "Edward S. Marshall" <em...@xnet.com>.
On Wed, 23 Jun 1999, Michael McCaffery wrote:
> I desparately need a compiled version of the ApacheBench 'ab' program for
> Windows NT 4.0/Intel.  In downloading the Apache Server, it was not part of
> the distribution, and I have had no luck in compiling the source under VC++
> 5.0 due to all the UNIX specifics in the source.

Give the Cygnus win32 port of gcc/egcs a try:

        http://sourceware.cygnus.com/cygwin/

-- 
Edward S. Marshall     emarshal at xnet.com      http://www.xnet.com/~emarshal/
-------------------------------------------------------------------------------
Systems Administrator   -   XNet Information Systems, Inc.   -   Lisle, IL, USA


In need of an NT version of 'ab'

Posted by Michael McCaffery <mi...@persistence.com>.
At the risk of getting flamed, I very much need some assistance....

I desparately need a compiled version of the ApacheBench 'ab' program for
Windows NT 4.0/Intel.  In downloading the Apache Server, it was not part of
the distribution, and I have had no luck in compiling the source under VC++
5.0 due to all the UNIX specifics in the source.

Can someone please send this to me directly or tell me where on the web I
may be able to get it????  I would be very appreciative.

thanks again
mike
michaelm@persistence.com


Re: PATCH: Allow for greater depth in modules directory

Posted by Ben Hyde <bh...@pobox.com>.
Jim Jagielski <ji...@devsys.jaguNET.com> writes:

> ... 
> the minor changes that modules can be located ANYWHERE, even
> outside of the Apache tree. This was recently suggested as
> a "desirable" option :)

A very desirable option.

I have no fear of work proceeding in the 1.3 branch
at the same time as it proceeds in the 2.0 family.  If
people don't want to work in the 1.3 branch, then don't.
I no longer think it is good to try and force a shift of 
labor toward the 2.0 branch, it should attract labor
on it's merits.

   - ben


Re: PATCH: Allow for greater depth in modules directory

Posted by Rasmus Lerdorf <ra...@raleigh.ibm.com>.
> > Right now, modules added using AddModule must exist exactly one layer
> > under ./modules. This restriction results in a jumbled directory.
> > This patch removes this restriction.
> > 
> > This is for 1.3.7-dev.
> 
> -1 for 1.3.7-dev.  This is a feature, not a bug fix.  Features
> should go into the 2.0 effort.  Since Configure is basic to building,
> there is a not-insignificant chance (IMHO) that this would
> destabilise the build process on one or more of our dozens of
> supported platforms.

In Apache2, should this sort of stuff not be done using automake?  

-Rasmus


Re: PATCH: Allow for greater depth in modules directory

Posted by Rodent of Unusual Size <Ke...@Golux.Com>.
Jim Jagielski wrote:
> 
> Right now, modules added using AddModule must exist exactly one layer
> under ./modules. This restriction results in a jumbled directory.
> This patch removes this restriction.
> 
> This is for 1.3.7-dev.

-1 for 1.3.7-dev.  This is a feature, not a bug fix.  Features
should go into the 2.0 effort.  Since Configure is basic to building,
there is a not-insignificant chance (IMHO) that this would
destabilise the build process on one or more of our dozens of
supported platforms.
-- 
#ken    P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Software Foundation  <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>