httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chuck Murcko <ch...@topsail.org>
Subject Re: [PATCH] Re: Putting modules in their own subdirectories
Date Mon, 10 Mar 1997 04:24:08 GMT
OK. +1 to this, without the -n.

Rodent of Unusual Size wrote:
> 
>     Apology accepted <g>.  Are there any Unices that object to the shell
>     command "echo -n"?  I wouldn't think so, but..  That neatly solves
>     the issue with minimum fuss, and keeps Configure tidy.
> 
> >                            The proxy Makefile now gets its
> >-I../../regex from Configure, and also forces an rm of the lib so it
> >gets rebuilt correctly if source has changed. The appended patch
> >includes Ken's mods. This builds a good modules/Makefile whether or not
> >the target system has a regex lib.
> 
>     Excellent!  For the complete patch to work, though, you need the
>     change to Makefile.tmpl as well.  Here's a single package with all
>     three file mods for ease of application (Configure, Makefile.tmpl,
>     and modules/proxy/Makefile).  [I sneaked in the change to "echo -n",
>     too - those newlines really offend me - but nuke it if it's not on
>     for some OSes.. ;-]
> 
>     #ken    :-)}
> 
> 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/10 03:53:03
> ***************
> *** 567,570 ****
> --- 567,609 ----
>   # Now (finish) creating the makefiles
>   cat Makefile.config >> Makefile
>   cat "$makefile_tmpl" >> Makefile
> + awk >>Makefile <$tmpfile \
> +    '($3 ~ "modules/") { printf "%s: modules/last-built ; @echo\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
> +
> + if [ "$RULE_WANTHSREGEX" = "yes" ]; then
> +     INCLUDES2="-I../../regex"
> + fi
> +
> + echo "INCLUDES2=$INCLUDES2">> modules/Makefile
> + echo "MOD_CFLAGS=\$(INCLUDES2) \$(AUX_CFLAGS)">> modules/Makefile
> +
> + 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="\$(MOD_CFLAGS)" RANLIB="\$(RANLIB)"; \\
> +               cd ..; \\
> +       done)
> +
> + clean:
> +       (for dir in \$(MODULES); do \\
> +               cd \$\$dir; \$(MAKE) clean; \\
> +               cd ..; \\
> +       done)
> + EOF
> 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: Makefile
> ===================================================================
> RCS file: /usr/users/coar/myApache/repository/apache/src/modules/proxy/Makefile,v
> retrieving revision 1.10
> diff -c -r1.10 Makefile
> *** 1.10        1997/01/01 18:19:59
> --- Makefile    1997/03/10 03:36:43
> ***************
> *** 53,64 ****
> 
>   SHELL = /bin/sh
> 
> ! INCDIR=../..
> 
>   LIB=libproxy.a
> 
>   # AUX_CFLAGS comes from higher level Makefile
> ! CFLAGS=-I. -I$(INCDIR) -I$(INCDIR)/regex $(AUX_CFLAGS)
> 
>   # Internal stuff, should not need changing.
>   PROXYSRC=mod_proxy.c proxy_cache.c proxy_connect.c proxy_ftp.c proxy_http.c \
> --- 53,64 ----
> 
>   SHELL = /bin/sh
> 
> ! INCDIR = ../..
> 
>   LIB=libproxy.a
> 
>   # AUX_CFLAGS comes from higher level Makefile
> ! CFLAGS=-I$(INCDIR) $(AUX_CFLAGS)
> 
>   # Internal stuff, should not need changing.
>   PROXYSRC=mod_proxy.c proxy_cache.c proxy_connect.c proxy_ftp.c proxy_http.c \
> ***************
> *** 66,78 ****
> 
>   OBJS=$(PROXYSRC:.c=.o)
> 
> ! default:      $(LIB)
> 
>   .c.a:
>         $(MAKE) $(CFLAGS) $<
> 
>   $(LIB):       $(OBJS)
> -       rm -f $@
>         ar crv $@ $(OBJS)
>         $(RANLIB) $@
> 
> --- 66,80 ----
> 
>   OBJS=$(PROXYSRC:.c=.o)
> 
> ! default:      force $(LIB)
> 
>   .c.a:
>         $(MAKE) $(CFLAGS) $<
> 
> + force:
> +       rm -f $(LIB)
> +
>   $(LIB):       $(OBJS)
>         ar crv $@ $(OBJS)
>         $(RANLIB) $@
> 

-- 
chuck
Chuck Murcko
The Topsail Group, West Chester PA USA
chuck@topsail.org

Mime
View raw message