You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Jeff Trawick <tr...@bellsouth.net> on 2000/11/15 04:42:38 UTC

[PATCH] change the way dependencies are built in APR makefiles

This patch is the result of discussion on new-httpd over the last
couple of days with subject "architecture-specific directories".

For a while, include paths and/or dependencies have been broken for
OS/390, which uses an os390 directory for DSO support but unix
directories for everything else within APR.  Some discussion today
covered the issue of dependencies, and whether or not some system (say
Unix) can generate dependencies (and check them into CVS) which work
on other systems which may have a different OSDIR.  No workable
solution was found.

This patch removes the dependencies from Makefile.in.  Dependencies
will not be checked into CVS, as they are added to Makefile when the
user runs "make depend."  The exact mechanism for building
dependencies is moved to a script called mkdep.sh in the root APR
directory.  Folks are free to make the mechanism more general (i.e.,
work on systems without gcc -MM), but for now it still requires gcc
-MM.  The patch also removes some commented out variable definitions
and rules.

BeOS- and OS/2-specific makefiles have not been updated.  I'll post a
patch to those once the Unix and generic makefiles have been taken
care of, and David and Brian can handle as appropriate.

Any remaining concerns?

All paths are relative to lib/apr.

? mkdep.sh
#!/bin/sh
cp Makefile Makefile.bak \
    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile > Makefile.new \
    && gcc -MM  $* >> Makefile.new \
    && mv Makefile.new Makefile

Index: dso/os390/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/os390/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- dso/os390/Makefile.in	2000/11/09 06:08:36	1.2
+++ dso/os390/Makefile.in	2000/11/15 03:34:42
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 RM=@RM@
 CC=@CC@
 RANLIB=@RANLIB@
@@ -11,6 +6,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../../include
 INCLUDES=-I$(INCDIR) -I$(INCDIR)/arch
+MKDEP=../../mkdep.sh
 
 LIB=libdso.a
 
@@ -24,37 +20,15 @@
 clean:
 	$(RM) -f *.o *.a *.so
 
-distclean: clean
-	-$(RM) -f Makefile
-
-
 $(LIB): $(OBJS)
 	$(RM) -f $@
 	$(AR) cr $@ $(OBJS)
 	$(RANLIB) $@
+
+distclean: clean
+	-$(RM) -f Makefile
 
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-getopt.o: getopt.c misc.h ../../include/apr_private.h \
- ../../include/apr_general.h ../../include/apr.h \
- ../../include/apr_errno.h ../../include/apr_pools.h \
- ../../include/apr_lib.h ../../include/apr_file_io.h \
- ../../include/apr_getopt.h
-start.o: start.c misc.h ../../include/apr_private.h \
- ../../include/apr_general.h ../../include/apr.h \
- ../../include/apr_errno.h ../../include/apr_pools.h \
- ../../include/apr_lib.h ../../include/apr_file_io.h \
- ../../include/apr_getopt.h
Index: dso/unix/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/dso/unix/Makefile.in,v
retrieving revision 1.12
diff -u -r1.12 Makefile.in
--- dso/unix/Makefile.in	2000/11/09 06:08:36	1.12
+++ dso/unix/Makefile.in	2000/11/15 03:34:42
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 RM=@RM@
 CC=@CC@
 AR=@AR@
@@ -12,6 +7,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../../include
 INCLUDES=-I$(INCDIR) -I$(INCDIR)/arch
+MKDEP=../../mkdep.sh
 
 LIB=libdso.a
 
@@ -34,23 +30,7 @@
 	$(AR) cr $@ $(OBJS)
 	$(RANLIB) $@
 
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-dso.o: dso.c $(INCDIR)/arch/unix/dso.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_dso.h
Index: file_io/unix/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/unix/Makefile.in,v
retrieving revision 1.18
diff -u -r1.18 Makefile.in
--- file_io/unix/Makefile.in	2000/11/14 06:40:03	1.18
+++ file_io/unix/Makefile.in	2000/11/15 03:34:43
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 RM=@RM@
 CC=@CC@
 RANLIB=@RANLIB@
@@ -13,8 +8,7 @@
 OSDIR=$(INCDIR)/arch/@OSDIR@
 DEFOSDIR=$(INCDIR)/arch/@DEFAULT_OSDIR@
 INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR)
-
-#LIB=libfile.a
+MKDEP=../../mkdep.sh
 
 OBJS=dir.o \
 	fileacc.o \
@@ -37,65 +31,7 @@
 distclean: clean
 	-$(RM) -f Makefile
 
-
-#$(LIB): $(OBJS)
-#	$(RM) -f $@
-#	$(AR) cr $@ $(OBJS)
-#	$(RANLIB) $@
-
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-dir.o: dir.c $(INCDIR)/apr_strings.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_tables.h \
- $(INCDIR)/apr_portable.h $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_lock.h $(INCDIR)/apr_dso.h
-fileacc.o: fileacc.c $(INCDIR)/apr_strings.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_tables.h
-filedup.o: filedup.c $(INCDIR)/apr_strings.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_tables.h \
- $(INCDIR)/apr_portable.h $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_lock.h $(INCDIR)/apr_dso.h
-filestat.o: filestat.c $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h
-fullrw.o: fullrw.c $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h
-open.o: open.c $(INCDIR)/apr_strings.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_tables.h \
- $(INCDIR)/apr_portable.h $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_lock.h $(INCDIR)/apr_dso.h
-pipe.o: pipe.c $(INCDIR)/apr_strings.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_tables.h
-readwrite.o: readwrite.c $(INCDIR)/apr_lock.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_errno.h
-seek.o: seek.c
Index: i18n/unix/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/i18n/unix/Makefile.in,v
retrieving revision 1.8
diff -u -r1.8 Makefile.in
--- i18n/unix/Makefile.in	2000/11/09 06:19:12	1.8
+++ i18n/unix/Makefile.in	2000/11/15 03:34:43
@@ -1,4 +1,3 @@
-
 RM=@RM@
 CC=@CC@
 RANLIB=@RANLIB@
@@ -7,6 +6,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../../include
 INCLUDES=-I$(INCDIR) -I$(INCDIR)/arch
+MKDEP=../../mkdep.sh
 
 OBJS=xlate.o
 
@@ -21,29 +21,7 @@
 distclean: clean
 	-$(RM) -f Makefile
 
-
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-utf8_ucs2.o: utf8_ucs2.c $(INCDIR)/arch/unix/i18n.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_xlate.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h
-xlate.o: xlate.c $(INCDIR)/apr_private.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_tables.h \
- $(INCDIR)/apr_strings.h $(INCDIR)/apr_xlate.h
Index: lib/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/lib/Makefile.in,v
retrieving revision 1.32
diff -u -r1.32 Makefile.in
--- lib/Makefile.in	2000/11/09 14:59:20	1.32
+++ lib/Makefile.in	2000/11/15 03:34:43
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 CC=@CC@
 RANLIB=@RANLIB@
 AR=@AR@
@@ -12,8 +7,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../include
 INCLUDES=-I$(INCDIR) -I$(INCDIR)/arch/@OSDIR@
-
-#LIB=@LIBPREFIX@apr.a
+MKDEP=../mkdep.sh
 
 OBJS=apr_pools.o
 
@@ -28,36 +22,7 @@
 distclean: clean
 	-$(RM) -f Makefile
 
-
-#$(LIB): $(OBJS)
-#	$(RM) -f $@
-#	$(AR) cr $@ $(OBJS)
-#	$(RANLIB) $@
-
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-apr_pools.o: apr_pools.c $(INCDIR)/apr.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_portable.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_network_io.h $(INCDIR)/apr_lock.h \
- $(INCDIR)/apr_dso.h $(INCDIR)/apr_strings.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_tables.h
-apr_signal.o: apr_signal.c $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_tables.h
Index: locks/unix/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/locks/unix/Makefile.in,v
retrieving revision 1.15
diff -u -r1.15 Makefile.in
--- locks/unix/Makefile.in	2000/11/09 06:25:29	1.15
+++ locks/unix/Makefile.in	2000/11/15 03:34:43
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 RM=@RM@
 CC=@CC@
 RANLIB=@RANLIB@
@@ -11,8 +6,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../../include
 INCLUDES=-I$(INCDIR) -I$(INCDIR)/arch
-
-#LIB=liblock.a
+MKDEP=../../mkdep.sh
 
 OBJS=locks.o \
 	crossproc.o \
@@ -29,46 +23,7 @@
 distclean: clean
 	-$(RM) -f Makefile
 
-
-#$(LIB): $(OBJS)
-#	$(RM) -f $@
-#	$(AR) cr $@ $(OBJS)
-#	$(RANLIB) $@
-
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-crossproc.o: crossproc.c $(INCDIR)/apr.h \
- $(INCDIR)/apr_strings.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_tables.h $(INCDIR)/arch/unix/locks.h \
- $(INCDIR)/apr_private.h $(INCDIR)/apr_lock.h
-intraproc.o: intraproc.c $(INCDIR)/arch/unix/locks.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_tables.h \
- $(INCDIR)/apr_lock.h
-locks.o: locks.c $(INCDIR)/arch/unix/locks.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_private.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_tables.h $(INCDIR)/apr_lock.h \
- $(INCDIR)/apr_strings.h $(INCDIR)/apr_portable.h \
- $(INCDIR)/apr_network_io.h $(INCDIR)/apr_dso.h
Index: misc/unix/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/misc/unix/Makefile.in,v
retrieving revision 1.25
diff -u -r1.25 Makefile.in
--- misc/unix/Makefile.in	2000/11/14 06:40:06	1.25
+++ misc/unix/Makefile.in	2000/11/15 03:34:43
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 RM=@RM@
 CC=@CC@
 RANLIB=@RANLIB@
@@ -13,8 +8,7 @@
 OSDIR=$(INCDIR)/arch/@OSDIR@
 DEFOSDIR=$(INCDIR)/arch/@DEFAULT_OSDIR@
 INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR)
-
-#LIB=libmisc.a
+MKDEP=../../mkdep.sh
 
 OBJS=start.o getopt.o otherchild.o errorcodes.o rand.o canonerr.o \
 	uuid.o getuuid.o
@@ -30,76 +24,7 @@
 distclean: clean
 	-$(RM) -f Makefile
 
-
-#$(LIB): $(OBJS)
-#	$(RM) -f $@
-#	$(AR) cr $@ $(OBJS)
-#	$(RANLIB) $@
-
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' \
-                   -e '1,$$s: $(DEFOSDIR)/: $$(DEFOSDIR)/:g' \
-	           -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-canonerr.o: canonerr.c $(DEFOSDIR)/misc.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_getopt.h
-errorcodes.o: errorcodes.c $(DEFOSDIR)/misc.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_getopt.h $(INCDIR)/apr_strings.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_tables.h \
- $(INCDIR)/apr_dso.h
-getopt.o: getopt.c $(DEFOSDIR)/misc.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_private.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_getopt.h
-getuuid.o: getuuid.c $(INCDIR)/apr.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_uuid.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_md5.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_tables.h \
- $(INCDIR)/apr_xlate.h
-otherchild.o: otherchild.c $(INCDIR)/apr.h \
- $(DEFOSDIR)/misc.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_getopt.h $(OSDIR)/threadproc.h \
- $(OSDIR)/fileio.h $(INCDIR)/apr_lock.h
-rand.o: rand.c $(DEFOSDIR)/misc.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_private.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_getopt.h
-start.o: start.c $(DEFOSDIR)/misc.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_private.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_getopt.h \
- $(OSDIR)/locks.h $(INCDIR)/apr_lock.h \
- $(INCDIR)/apr_strings.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_tables.h
-uuid.o: uuid.c $(INCDIR)/apr.h $(INCDIR)/apr_uuid.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_tables.h
Index: mmap/unix/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/mmap/unix/Makefile.in,v
retrieving revision 1.15
diff -u -r1.15 Makefile.in
--- mmap/unix/Makefile.in	2000/11/09 07:13:42	1.15
+++ mmap/unix/Makefile.in	2000/11/15 03:34:44
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 RM=@RM@
 CC=@CC@
 RANLIB=@RANLIB@
@@ -11,6 +6,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../../include
 INCLUDES=-I$(INCDIR) -I$(INCDIR)/arch
+MKDEP=../../mkdep.sh
 
 LIB=libmmap.a
 
@@ -27,38 +23,7 @@
 distclean: clean
 	-$(RM) -f Makefile
 
-
-#$(LIB): $(OBJS)
-#	$(RM) -f $@
-#	$(AR) cr $@ $(OBJS)
-#	$(RANLIB) $@
-
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-common.o: common.c $(INCDIR)/apr.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_mmap.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_portable.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_lock.h $(INCDIR)/apr_dso.h
-mmap.o: mmap.c $(INCDIR)/apr.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_mmap.h $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_portable.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_lock.h $(INCDIR)/apr_dso.h \
- $(INCDIR)/arch/unix/fileio.h $(INCDIR)/apr_tables.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h
Index: network_io/unix/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/Makefile.in,v
retrieving revision 1.19
diff -u -r1.19 Makefile.in
--- network_io/unix/Makefile.in	2000/11/14 06:40:06	1.19
+++ network_io/unix/Makefile.in	2000/11/15 03:34:44
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 RM=@RM@
 CC=@CC@
 RANLIB=@RANLIB@
@@ -13,6 +8,7 @@
 OSDIR=$(INCDIR)/arch/@OSDIR@
 DEFOSDIR=$(INCDIR)/arch/@DEFAULT_OSDIR@
 INCLUDES=-I$(INCDIR) -I$(OSDIR) -I$(DEFOSDIR)
+MKDEP=../../mkdep.sh
 
 LIB=libnetwork.a
 
@@ -33,63 +29,7 @@
 distclean: clean
 	-$(RM) -f Makefile
 
-
-#$(LIB): $(OBJS)
-#	$(RM) -f $@
-#	$(AR) cr $@ $(OBJS)
-#	$(RANLIB) $@
-
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' \
-                   -e '1,$$s: $(DEFOSDIR)/: $$(DEFOSDIR)/:g' \
-	           -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-inet_aton.o: inet_aton.c $(INCDIR)/apr_private.h
-poll.o: poll.c $(OSDIR)/networkio.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_private.h $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_tables.h \
- $(OSDIR)/fileio.h
-sa_common.o: sa_common.c $(INCDIR)/apr.h
-sendrecv.o: sendrecv.c $(OSDIR)/networkio.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_network_io.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_tables.h
-sockaddr.o: sockaddr.c $(OSDIR)/networkio.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_network_io.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_tables.h $(INCDIR)/apr_strings.h sa_common.c
-sockets.o: sockets.c $(OSDIR)/networkio.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_network_io.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_tables.h $(INCDIR)/apr_portable.h \
- $(INCDIR)/apr_lock.h $(INCDIR)/apr_dso.h
-sockopt.o: sockopt.c $(OSDIR)/networkio.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_network_io.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_tables.h $(INCDIR)/apr_strings.h
Index: network_io/unix/sockets.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/unix/sockets.c,v
retrieving revision 1.54
diff -u -r1.54 sockets.c
--- network_io/unix/sockets.c	2000/11/02 03:02:49	1.54
+++ network_io/unix/sockets.c	2000/11/15 03:34:44
@@ -209,24 +209,25 @@
 #endif
     }
 
-    if ((connect(sock->socketdes, (const struct sockaddr *)sock->remote_addr,
-        sock->addr_len) < 0) && (errno != EINPROGRESS)) {
-        return errno;
+    /* Fill out some info in apr_socket_t as if connect() will work. */
+    if (sock->local_addr->sin_port == 0) {
+        /* connect() got us an ephemeral port */
+        sock->local_port_unknown = 1;
     }
-    else {
-        if (sock->local_addr->sin_port == 0) {
-            /* connect() got us an ephemeral port */
-            sock->local_port_unknown = 1;
-        }
-        if (sock->local_addr->sin_addr.s_addr == 0) {
-            /* not bound to specific local interface; connect() had to assign
-             * one for the socket
-             */
-            sock->local_interface_unknown = 1;
-        }
+    if (sock->local_addr->sin_addr.s_addr == 0) {
+        /* not bound to specific local interface; connect() had to assign
+         * one for the socket
+         */
+        sock->local_interface_unknown = 1;
+    }
 #ifndef HAVE_POLL
-	sock->connected=1;
+    sock->connected = 1;
 #endif
+    if (connect(sock->socketdes, (const struct sockaddr *)sock->remote_addr,
+        sock->addr_len) < 0) {
+        return errno;
+    }
+    else {
         return APR_SUCCESS;
     }
 }
Index: network_io/win32/sockets.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/network_io/win32/sockets.c,v
retrieving revision 1.39
diff -u -r1.39 sockets.c
--- network_io/win32/sockets.c	2000/11/02 03:02:50	1.39
+++ network_io/win32/sockets.c	2000/11/15 03:34:44
@@ -215,8 +215,11 @@
 apr_status_t apr_connect(apr_socket_t *sock, const char *hostname)
 {
     struct hostent *hp;
+<<<<<<< sockets.c
+=======
     apr_status_t lasterror;
     fd_set temp;
+>>>>>>> 1.38
 
     if ((sock->sock == INVALID_SOCKET) || (!sock->local_addr)) {
         return APR_ENOTSOCK;
@@ -239,6 +242,9 @@
     
     sock->remote_addr->sin_family = AF_INET;
 
+<<<<<<< sockets.c
+    /* Fill out some info in apr_socket_t as if connect() will work. */
+=======
     if (connect(sock->sock, (const struct sockaddr *)sock->remote_addr, 
                 sock->addr_len) == SOCKET_ERROR) {
         lasterror = apr_get_netos_error();
@@ -253,12 +259,17 @@
         }
     }
     /* connect was OK .. amazing */
+>>>>>>> 1.38
     if (sock->local_addr->sin_port == 0) {
         sock->local_port_unknown = 1;
     }
     if (sock->local_addr->sin_addr.s_addr == 0) {
         /* must be using free-range port */
         sock->local_interface_unknown = 1;
+    }
+    if (connect(sock->sock, (const struct sockaddr *)sock->remote_addr, 
+                sock->addr_len) == SOCKET_ERROR) {
+        return WSAGetLastError();
     }
     return APR_SUCCESS;
 }
Index: passwd/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/passwd/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- passwd/Makefile.in	2000/11/13 18:32:29	1.2
+++ passwd/Makefile.in	2000/11/15 03:34:44
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 CC=@CC@
 RANLIB=@RANLIB@
 AR=@AR@
@@ -12,8 +7,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../include
 INCLUDES=-I$(INCDIR)
-
-#LIB=@LIBPREFIX@apr.a
+MKDEP=../mkdep.sh
 
 OBJS=apr_md5.o \
 	apr_getpass.o 
@@ -29,34 +23,7 @@
 distclean: clean
 	-$(RM) -f Makefile
 
-
-#$(LIB): $(OBJS)
-#	$(RM) -f $@
-#	$(AR) cr $@ $(OBJS)
-#	$(RANLIB) $@
-
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-apr_getpass.o: apr_getpass.c $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_strings.h $(INCDIR)/apr.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h $(INCDIR)/apr_tables.h
-apr_md5.o: apr_md5.c $(INCDIR)/apr_private.h $(INCDIR)/apr_strings.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_tables.h $(INCDIR)/apr_md5.h $(INCDIR)/apr_xlate.h
Index: shmem/unix/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/shmem/unix/Makefile.in,v
retrieving revision 1.13
diff -u -r1.13 Makefile.in
--- shmem/unix/Makefile.in	2000/11/09 06:36:04	1.13
+++ shmem/unix/Makefile.in	2000/11/15 03:34:44
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 RM=@RM@
 CC=@CC@
 AR=@AR@
@@ -13,6 +8,7 @@
 INCDIR=../../include
 INCDIR1=mm
 INCLUDES=-I$(INCDIR) -I$(INCDIR1)
+MKDEP=../../mkdep.sh
 
 LIB=libshmem.a
 
@@ -39,21 +35,7 @@
 	$(AR) cr $@ $(OBJS)
 	$(RANLIB) $@
 
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-shmem.o: shmem.c mm/mm.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_shmem.h
Index: strings/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/strings/Makefile.in,v
retrieving revision 1.5
diff -u -r1.5 Makefile.in
--- strings/Makefile.in	2000/11/09 06:38:15	1.5
+++ strings/Makefile.in	2000/11/15 03:34:45
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 CC=@CC@
 RANLIB=@RANLIB@
 AR=@AR@
@@ -12,8 +7,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../include
 INCLUDES=-I$(INCDIR)
-
-#LIB=@LIBPREFIX@apr.a
+MKDEP=../mkdep.sh
 
 OBJS=apr_cpystrn.o \
 	apr_snprintf.o \
@@ -32,50 +26,7 @@
 distclean: clean
 	-$(RM) -f Makefile
 
-
-#$(LIB): $(OBJS)
-#	$(RM) -f $@
-#	$(AR) cr $@ $(OBJS)
-#	$(RANLIB) $@
-
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-apr_cpystrn.o: apr_cpystrn.c $(INCDIR)/apr.h $(INCDIR)/apr_strings.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_tables.h $(INCDIR)/apr_private.h
-apr_fnmatch.o: apr_fnmatch.c $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_fnmatch.h $(INCDIR)/apr_errno.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_tables.h
-apr_snprintf.o: apr_snprintf.c $(INCDIR)/apr.h \
- $(INCDIR)/apr_private.h $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_tables.h
-apr_strings.o: apr_strings.c $(INCDIR)/apr.h $(INCDIR)/apr_strings.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_tables.h $(INCDIR)/apr_private.h
-apr_strnatcmp.o: apr_strnatcmp.c $(INCDIR)/apr_strings.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_tables.h
Index: tables/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/tables/Makefile.in,v
retrieving revision 1.3
diff -u -r1.3 Makefile.in
--- tables/Makefile.in	2000/11/09 15:01:23	1.3
+++ tables/Makefile.in	2000/11/15 03:34:45
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 CC=@CC@
 RANLIB=@RANLIB@
 AR=@AR@
@@ -12,6 +7,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../include
 INCLUDES=-I$(INCDIR) -I$(INCDIR)/arch
+MKDEP=../mkdep.sh
 
 OBJS=apr_tables.o \
 	apr_hash.o 
@@ -27,33 +23,7 @@
 distclean: clean
 	-$(RM) -f Makefile
 
-
-#$(LIB): $(OBJS)
-#	$(RM) -f $@
-#	$(AR) cr $@ $(OBJS)
-#	$(RANLIB) $@
-
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-apr_hash.o: apr_hash.c $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h $(INCDIR)/apr_hash.h
-apr_tables.o: apr_tables.c $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_tables.h $(INCDIR)/apr_strings.h $(INCDIR)/apr_lib.h
Index: test/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/test/Makefile.in,v
retrieving revision 1.25
diff -u -r1.25 Makefile.in
--- test/Makefile.in	2000/10/06 12:19:42	1.25
+++ test/Makefile.in	2000/11/15 03:34:45
@@ -1,9 +1,3 @@
-# Generated automatically from Makefile.in by configure.
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 RM=@RM@
 CC=@CC@
 RANLIB=@RANLIB@
@@ -12,6 +6,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../include
 INCLUDES=-I$(INCDIR)
+MKDEP=../mkdep.sh
 
 TARGETS= testmd5@EXEEXT@ \
 	testfile@EXEEXT@ \
@@ -111,71 +106,7 @@
 distclean: clean
 	-$(RM) -f Makefile
 
-
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-abc.o: abc.c $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h
-client.o: client.c $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h
-mod_test.o: mod_test.c
-server.o: server.c $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h
-testargs.o: testargs.c $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_getopt.h
-testcontext.o: testcontext.c $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_thread_proc.h
-testdso.o: testdso.c $(INCDIR)/apr_general.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_pools.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_dso.h
-testfile.o: testfile.c $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_thread_proc.h
-testmmap.o: testmmap.c $(INCDIR)/apr_mmap.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_errno.h $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_portable.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_lock.h $(INCDIR)/apr_lib.h
-testoc.o: testoc.c $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h $(INCDIR)/apr_lib.h
-testpipe.o: testpipe.c $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_thread_proc.h
-testproc.o: testproc.c $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h $(INCDIR)/apr_lib.h
-testshmem.o: testshmem.c $(INCDIR)/apr_shmem.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h $(INCDIR)/apr_lock.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_thread_proc.h
-testsock.o: testsock.c $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h $(INCDIR)/apr_lib.h
-testthread.o: testthread.c $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_general.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_time.h $(INCDIR)/apr_lock.h
-testtime.o: testtime.c $(INCDIR)/apr_time.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_errno.h
Index: test/client.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/test/client.c,v
retrieving revision 1.17
diff -u -r1.17 client.c
--- test/client.c	2000/11/09 15:01:35	1.17
+++ test/client.c	2000/11/15 03:34:45
@@ -52,6 +52,7 @@
  * <http://www.apache.org/>.
  */
 
+#include <assert.h>
 #include <stdlib.h>
 #include "apr_network_io.h"
 #include "apr_errno.h"
@@ -127,7 +128,9 @@
 
     stat = apr_connect(sock, dest);
 
-    if (stat != APR_SUCCESS) {
+    if (stat != APR_SUCCESS && 
+        !(apr_canonical_error(stat) == APR_EINPROGRESS ||
+            apr_canonical_error(stat) == APR_EAGAIN)) {
         apr_close_socket(sock);
         fprintf(stderr, "Could not connect: %s (%d)\n", 
 		apr_strerror(stat, msgbuf, sizeof(msgbuf)), stat);
@@ -135,6 +138,35 @@
         exit(-1);
     }
     fprintf(stdout, "OK\n");
+
+    if (stat != APR_SUCCESS) {
+        apr_pollfd_t *pfd;
+        apr_int32_t nsocks;
+
+        assert(read_timeout == -1);
+        fprintf(stdout, "\tClient:  Waiting for connect to complete (or fail).....");
+        pfd = NULL;
+        stat = apr_setup_poll(&pfd, 1, context);
+        assert(!stat);
+        stat = apr_add_poll_socket(pfd, sock, APR_POLLOUT);
+        assert(!stat);
+        nsocks = 1;
+        stat = apr_poll(pfd, &nsocks, -1);
+        assert(!stat);
+        assert(nsocks == 1);
+        fprintf(stdout, "OK\n");
+        fprintf(stdout, "\tClient:  Checking result of connect....");
+        stat = apr_connect(sock, dest);
+        if (stat != APR_SUCCESS) {
+            apr_close_socket(sock);
+            fprintf(stdout, "Failed: %s (%d)\n", 
+                    apr_strerror(stat, msgbuf, sizeof(msgbuf)), stat);
+            exit(-1);
+        }
+        else {
+            fprintf(stdout, "OK\n");
+        }
+    }
 
     apr_get_ipaddr(&remote_ipaddr, APR_REMOTE, sock);
     apr_get_port(&remote_port, APR_REMOTE, sock);
Index: threadproc/unix/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/threadproc/unix/Makefile.in,v
retrieving revision 1.24
diff -u -r1.24 Makefile.in
--- threadproc/unix/Makefile.in	2000/11/09 06:47:53	1.24
+++ threadproc/unix/Makefile.in	2000/11/15 03:34:45
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 RM=@RM@
 CC=@CC@
 RANLIB=@RANLIB@
@@ -11,6 +6,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../../include
 INCLUDES=-I$(INCDIR) -I$(INCDIR)/arch
+MKDEP=../../mkdep.sh
 
 LIB=libthreadproc.a
 
@@ -31,64 +27,12 @@
 distclean: clean
 	-$(RM) -f Makefile
 
-
-#$(LIB): $(OBJS)
-#	$(RM) -f $@
-#	$(AR) cr $@ $(OBJS)
-#	$(RANLIB) $@
-
 #
 # We really don't expect end users to use this rule.  It works only with
 # gcc, and rebuilds Makefile.in.  You have to re-run configure after
 # using it.
 #
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-proc.o: proc.c $(INCDIR)/arch/unix/threadproc.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h $(INCDIR)/arch/unix/fileio.h \
- $(INCDIR)/apr_tables.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_strings.h \
- $(INCDIR)/apr_portable.h $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_lock.h $(INCDIR)/apr_dso.h
-procsup.o: procsup.c $(INCDIR)/arch/unix/threadproc.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h $(INCDIR)/arch/unix/fileio.h \
- $(INCDIR)/apr_tables.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h
-signals.o: signals.c $(INCDIR)/arch/unix/threadproc.h \
- $(INCDIR)/apr.h $(INCDIR)/apr_private.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h $(INCDIR)/arch/unix/fileio.h \
- $(INCDIR)/apr_tables.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h
-thread.o: thread.c $(INCDIR)/apr.h $(INCDIR)/apr_portable.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_lock.h $(INCDIR)/apr_dso.h \
- $(INCDIR)/arch/unix/threadproc.h $(INCDIR)/apr_private.h \
- $(INCDIR)/arch/unix/fileio.h $(INCDIR)/apr_tables.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h
-threadpriv.o: threadpriv.c $(INCDIR)/apr.h \
- $(INCDIR)/apr_portable.h $(INCDIR)/apr_general.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_network_io.h $(INCDIR)/apr_lock.h \
- $(INCDIR)/apr_dso.h $(INCDIR)/arch/unix/threadproc.h \
- $(INCDIR)/apr_private.h $(INCDIR)/arch/unix/fileio.h \
- $(INCDIR)/apr_tables.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h
Index: time/unix/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/time/unix/Makefile.in,v
retrieving revision 1.18
diff -u -r1.18 Makefile.in
--- time/unix/Makefile.in	2000/11/09 06:50:16	1.18
+++ time/unix/Makefile.in	2000/11/15 03:34:45
@@ -1,8 +1,3 @@
-#CFLAGS=$(OPTIM) $(CFLAGS1) $(EXTRA_CFLAGS)
-#LIBS=$(EXTRA_LIBS) $(LIBS1)
-#INCLUDES=$(INCLUDES1) $(INCLUDES0) $(EXTRA_INCLUDES)
-#LDFLAGS=$(LDFLAGS1) $(EXTRA_LDFLAGS)
-
 RM=@RM@
 CC=@CC@
 RANLIB=@RANLIB@
@@ -11,8 +6,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../../include
 INCLUDES=-I$(INCDIR)
-
-#LIB=libtime.a
+MKDEP=../../mkdep.sh
 
 OBJS=time.o \
 	timestr.o
@@ -28,40 +22,7 @@
 distclean: clean
 	-$(RM) -f Makefile
 
-
-#$(LIB): $(OBJS)
-#	$(RM) -f $@
-#	$(AR) cr $@ $(OBJS)
-#	$(RANLIB) $@
-
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-time.o: time.c $(INCDIR)/apr_portable.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_network_io.h $(INCDIR)/apr_lock.h \
- $(INCDIR)/apr_dso.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_tables.h \
- $(INCDIR)/apr_private.h
-timestr.o: timestr.c $(INCDIR)/apr_portable.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_errno.h $(INCDIR)/apr_thread_proc.h \
- $(INCDIR)/apr_file_io.h $(INCDIR)/apr_time.h \
- $(INCDIR)/apr_network_io.h $(INCDIR)/apr_lock.h \
- $(INCDIR)/apr_dso.h $(INCDIR)/apr_lib.h \
- $(INCDIR)/apr_pools.h $(INCDIR)/apr_tables.h \
- $(INCDIR)/apr_private.h
Index: user/unix/Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/lib/apr/user/unix/Makefile.in,v
retrieving revision 1.1
diff -u -r1.1 Makefile.in
--- user/unix/Makefile.in	2000/11/13 03:18:18	1.1
+++ user/unix/Makefile.in	2000/11/15 03:34:45
@@ -1,4 +1,3 @@
-
 RM=@RM@
 CC=@CC@
 RANLIB=@RANLIB@
@@ -7,6 +6,7 @@
 LDFLAGS=@LDFLAGS@ $(LIBS)
 INCDIR=../../include
 INCLUDES=-I$(INCDIR) -I$(INCDIR)/arch
+MKDEP=../../mkdep.sh
 
 OBJS=homedir.o
 
@@ -21,27 +21,7 @@
 distclean: clean
 	-$(RM) -f Makefile
 
-
-#
-# We really don't expect end users to use this rule.  It works only with
-# gcc, and rebuilds Makefile.in.  You have to re-run configure after
-# using it.
-#
 depend:
-	cp Makefile.in Makefile.in.bak \
-	    && sed -ne '1,/^# DO NOT REMOVE/p' Makefile.in > Makefile.new \
-	    && gcc -MM $(INCLUDES) $(CFLAGS) *.c >> Makefile.new \
-	    && sed -e '1,$$s: $(INCDIR)/: $$(INCDIR)/:g' \
-	           -e '1,$$s: $(OSDIR)/: $$(OSDIR)/:g' Makefile.new \
-		> Makefile.in \
-	    && rm Makefile.new
+	$(MKDEP) $(INCLUDES) $(CFLAGS) *.c
 
 # DO NOT REMOVE
-homedir.o: homedir.c $(INCDIR)/apr_strings.h $(INCDIR)/apr.h \
- $(INCDIR)/apr_lib.h $(INCDIR)/apr_pools.h \
- $(INCDIR)/apr_thread_proc.h $(INCDIR)/apr_file_io.h \
- $(INCDIR)/apr_general.h $(INCDIR)/apr_errno.h \
- $(INCDIR)/apr_time.h $(INCDIR)/apr_tables.h \
- $(INCDIR)/apr_portable.h $(INCDIR)/apr_network_io.h \
- $(INCDIR)/apr_lock.h $(INCDIR)/apr_dso.h \
- $(INCDIR)/apr_user.h $(INCDIR)/apr_private.h

-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...

Re: [PATCH] change the way dependencies are built in APR makefiles

Posted by Greg Stein <gs...@lyra.org>.
On Tue, Nov 14, 2000 at 10:42:38PM -0500, Jeff Trawick wrote:
>...
> This patch removes the dependencies from Makefile.in.  Dependencies
> will not be checked into CVS, as they are added to Makefile when the
> user runs "make depend."  The exact mechanism for building
> dependencies is moved to a script called mkdep.sh in the root APR
> directory.

Why not apr/helpers/ ? That will keep the root clean, and the helpers
directory certainly has similar types of files/proggies.

+1 on concept. -0 on mkdep.sh location.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

Re: [PATCH] change the way dependencies are built in APR makefiles

Posted by Jeff Trawick <tr...@bellsouth.net>.
Ignore the diffs to files network_io/unix/sockets.c,
network_io/win32/sockets.c, and test/client.c.  Those diffs were not
intended to be posted. 
-- 
Jeff Trawick | trawick@ibm.net | PGP public key at web site:
     http://www.geocities.com/SiliconValley/Park/9289/
          Born in Roswell... married an alien...