You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rodent of Unusual Size <co...@decus.org> on 1997/03/09 20:56:03 UTC

[PATCH] Re: Putting modules in their own subdirectories

>From the fingers of Chuck Murcko flowed the following:
>
>Nope. Sounds right here. The really right way to do this is to build
>modules/Makefile during configuration.

    Okey, here is a new patch for Makefile.tmpl and Configure that
    builds modules/Makefile according to the modules included in the
    Configuration file.  If we go this route, modules/Makefile should
    probably be taken out of the distribution, since the first run of
    Configure will wipe it out.

    #ken    :-)}

Index: Makefile.tmpl
===================================================================
RCS file: /usr/users/coar/myApache/repository/apache/src/Makefile.tmpl,v
retrieving revision 1.41
diff -c -r1.41 Makefile.tmpl
*** 1.41	1997/02/25 20:56:38
--- Makefile.tmpl	1997/03/07 22:11:23
***************
*** 33,39 ****
  regex/libregex.a:
  	(cd regex; $(MAKE) lib CC=$(CC) AUX_CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)')
  
! modules/proxy/libproxy.a:
  	(cd modules; \
  	$(MAKE) CC=$(CC) AUX_CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)')
  
--- 33,39 ----
  regex/libregex.a:
  	(cd regex; $(MAKE) lib CC=$(CC) AUX_CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)')
  
! modules/last-built:
  	(cd modules; \
  	$(MAKE) CC=$(CC) AUX_CFLAGS='$(CFLAGS)' RANLIB='$(RANLIB)')
  

Index: Configure
===================================================================
RCS file: /usr/users/coar/myApache/repository/apache/src/Configure,v
retrieving revision 1.81
diff -c -r1.81 Configure
*** 1.81	1997/02/25 21:04:41
--- Configure	1997/03/09 19:45:19
***************
*** 567,570 ****
--- 567,600 ----
  # Now (finish) creating the makefiles
  cat Makefile.config >> Makefile
  cat "$makefile_tmpl" >> Makefile
+ awk >>Makefile <$tmpfile \
+    '$3 ~ "modules/" { printf "%s: modules/last-built ; @/bin/true\n\n", $3}'
  cat Makefile.config ../support/Makefile.tmpl > ../support/Makefile
+ cat << EOF > modules/Makefile
+ # 
+ # Simple Makefile for modules in src/modules.
+ # Generated by src/Configure according to rules in src/Configuration;
+ # hand-edit at your own risk!
+ # 
+ 
+ SHELL = /bin/sh
+ EOF
+ awk >> modules/Makefile < $tmpfile '\
+    BEGIN {printf "MODULES="} \
+    ($3 ~ "modules/") {split ($3, pp, "/"); printf "%s ", pp[2]} \
+    END {printf "\n"}'
+ cat << EOF >> modules/Makefile
+ 
+ default:
+ 	(for dir in \$(MODULES); do \\
+ 		cd \$\$dir; \\
+ 		\$(MAKE) CC=\$(CC) AUX_CFLAGS="\$(AUX_CFLAGS)" RANLIB="\$(RANLIB)"; \\
+ 		cd ..; \\
+ 	done)
+ 
+ clean:	
+ 	(for dir in \$(MODULES); do \\
+ 		cd \$\$dir; \$(MAKE) clean; \\
+ 		cd ..; \\
+ 	done)
+ EOF

Re: [PATCH] Re: Putting modules in their own subdirectories

Posted by Chuck Murcko <ch...@topsail.org>.
+1 if you lose the "/bin/" in "@/bin/true\n\n". Not every *NIX puts it
there, and not every *NIX has a which command. Safer to do what we do
for $RANLIB earlier in Configure. Or you can just use echo w/o
arguments, if you're worried about portability of true.

I think we want to leave the modules/Makefile in, but put a note that it
is autogenerated, so you lose manual changes if you run Configure.

Rodent of Unusual Size wrote:
> 
> >From the fingers of Chuck Murcko flowed the following:
> >
> >Nope. Sounds right here. The really right way to do this is to build
> >modules/Makefile during configuration.
> 
>     Okey, here is a new patch for Makefile.tmpl and Configure that
>     builds modules/Makefile according to the modules included in the
>     Configuration file.  If we go this route, modules/Makefile should
>     probably be taken out of the distribution, since the first run of
>     Configure will wipe it out.
> 
-- 
chuck
Chuck Murcko
The Topsail Group, West Chester PA USA
chuck@topsail.org

Re: [PATCH] Re: Putting modules in their own subdirectories

Posted by Alexei Kosut <ak...@nueva.pvt.k12.ca.us>.
On Sun, 9 Mar 1997, Chuck Murcko wrote:

> Yeah. I'm aware of that one, but where do I find regex if the OS doesn't
> have it? I seem to remember compiles failing on IRIX 5.3 because
> "regex.h" gets #included in conf.h or another of the basic set of
> headers, so I played it safe. The configure process should pass the -I
> down in AUX_CFLAGS if the Spencer regex is used, no? Want me to add
> this?

I realize why you're doing it. I'm just saying that if we're going
to be generating the files now instead of them being static, it can do
it correctly. Yes, it should pass along the -I if we're using the
Spencer regex. That'd be good.

-- 
________________________________________________________________________
Alexei Kosut <ak...@nueva.pvt.k12.ca.us>      The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/   http://www.apache.org/


Re: [PATCH] Re: Putting modules in their own subdirectories

Posted by Chuck Murcko <ch...@topsail.org>.
Alexei Kosut wrote:
> 
> On Sun, 9 Mar 1997, Rodent of Unusual Size wrote:
> 
> > >From the fingers of Chuck Murcko flowed the following:
> > >
> > >Nope. Sounds right here. The really right way to do this is to build
> > >modules/Makefile during configuration.
> >
> >     Okey, here is a new patch for Makefile.tmpl and Configure that
> >     builds modules/Makefile according to the modules included in the
> >     Configuration file.  If we go this route, modules/Makefile should
> >     probably be taken out of the distribution, since the first run of
> >     Configure will wipe it out.
> 
> As long as we're generating Makefiles in modules/ now, can we please
> fix the proxy Makefile to not always compile with -I../../regex? It
> should only do that if the Spencer library is being used. It doesn't
> matter much now, since mod_proxy doesn't actually use regexes, but it
> really should be fixed. Otherwise, should mod_proxy (or another such
> module) use regex stuff sometime in the future, it will not work.
> 
Yeah. I'm aware of that one, but where do I find regex if the OS doesn't
have it? I seem to remember compiles failing on IRIX 5.3 because
"regex.h" gets #included in conf.h or another of the basic set of
headers, so I played it safe. The configure process should pass the -I
down in AUX_CFLAGS if the Spencer regex is used, no? Want me to add
this?
-- 
chuck
Chuck Murcko
The Topsail Group, West Chester PA USA
chuck@topsail.org

Re: [PATCH] Re: Putting modules in their own subdirectories

Posted by Alexei Kosut <ak...@nueva.pvt.k12.ca.us>.
On Sun, 9 Mar 1997, Rodent of Unusual Size wrote:

> >From the fingers of Chuck Murcko flowed the following:
> >
> >Nope. Sounds right here. The really right way to do this is to build
> >modules/Makefile during configuration.
> 
>     Okey, here is a new patch for Makefile.tmpl and Configure that
>     builds modules/Makefile according to the modules included in the
>     Configuration file.  If we go this route, modules/Makefile should
>     probably be taken out of the distribution, since the first run of
>     Configure will wipe it out.

As long as we're generating Makefiles in modules/ now, can we please
fix the proxy Makefile to not always compile with -I../../regex? It
should only do that if the Spencer library is being used. It doesn't
matter much now, since mod_proxy doesn't actually use regexes, but it
really should be fixed. Otherwise, should mod_proxy (or another such
module) use regex stuff sometime in the future, it will not work. 

-- 
________________________________________________________________________
Alexei Kosut <ak...@nueva.pvt.k12.ca.us>      The Apache HTTP Server
URL: http://www.nueva.pvt.k12.ca.us/~akosut/   http://www.apache.org/