apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jerenkra...@ebuilt.com>
Subject [PATCH] Consolidate VPATH in APR-util
Date Mon, 31 Dec 2001 08:37:48 GMT
This patch attempts to sanitize the VPATH (where build != source 
dir) generation in apr-util by removing the code in configure.in 
that places srcdir and VPATH at the top of all Makefiles.

I'm not seeing the rationale behind not just always having srcdir 
and VPATH defined.  In httpd, we are always specifying top_srcdir,
top_builddir, srcdir, builddir, and VPATH - so all makes that 
work with httpd should support having these variables set already.

I also introduced top_srcdir and APR_INCLUDES to the Makefile's 
so that we do not have to deal with relative paths or APR's 
location in the Makefiles - without them, they make it awfully 
confusing to maintain.

I will commit soonish (Wed?) unless someone complains.  If this
goes smoothly, I'd like to do the same in apr.  I've tested 
this with VPATH and non-VPATH modes.  Is anyone aware of any 
pitfalls?  -- justin

Index: Makefile.in
===================================================================
RCS file: /home/cvs/apr-util/Makefile.in,v
retrieving revision 1.55
diff -u -r1.55 Makefile.in
--- Makefile.in	31 Dec 2001 07:34:05 -0000	1.55
+++ Makefile.in	31 Dec 2001 08:21:55 -0000
@@ -3,6 +3,9 @@
 #
 CPP = @CPP@
 
+srcdir = @srcdir@
+VPATH = @srcdir@
+
 INCLUDES=-I./include -I$(srcdir)/include @APR_INCLUDES@
 
 TARGET_LIB = libaprutil.la
Index: configure.in
===================================================================
RCS file: /home/cvs/apr-util/configure.in,v
retrieving revision 1.40
diff -u -r1.40 configure.in
--- configure.in	31 Dec 2001 07:25:25 -0000	1.40
+++ configure.in	31 Dec 2001 08:21:55 -0000
@@ -122,23 +122,3 @@
     include/apu.h
     $MAKEFILES
 	])
-
-dnl #----------------------------- Fixup Makefiles for VPATH support
- 
-changequote({,})
- 
-if test -n "$USE_VPATH"; then
-  for makefile in $MAKEFILES; do
-    dir=`echo $makefile|sed 's%[^/][^/]*$%%'`
-    (cat <<EOF
-srcdir = $abs_srcdir/$dir
-VPATH  = $abs_srcdir/$dir
- 
-EOF
-)    |  cat - $makefile > tmp
-    cp tmp $makefile
-  done
-  rm -f tmp
-fi
- 
-changequote([,])
Index: buckets/Makefile.in
===================================================================
RCS file: /home/cvs/apr-util/buckets/Makefile.in,v
retrieving revision 1.12
diff -u -r1.12 Makefile.in
--- buckets/Makefile.in	13 Sep 2001 06:56:54 -0000	1.12
+++ buckets/Makefile.in	31 Dec 2001 08:21:55 -0000
@@ -1,6 +1,9 @@
+srcdir = @srcdir@
+VPATH = @srcdir@
 
 top_builddir=@top_builddir@
-INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/../apr/include -I$(srcdir)../../apr/include
-I$(srcdir)../include
+top_srcdir=@abs_srcdir@
+INCLUDES=-I$(top_builddir)/include -I$(top_srcdir)/include @APR_INCLUDES@
 
 TARGETS = apr_buckets_file.lo apr_buckets_pool.lo apr_buckets_flush.lo \
 apr_buckets_refcount.lo apr_buckets_heap.lo apr_buckets_simple.lo apr_buckets.lo \
Index: crypto/Makefile.in
===================================================================
RCS file: /home/cvs/apr-util/crypto/Makefile.in,v
retrieving revision 1.8
diff -u -r1.8 Makefile.in
--- crypto/Makefile.in	13 Sep 2001 06:56:54 -0000	1.8
+++ crypto/Makefile.in	31 Dec 2001 08:21:55 -0000
@@ -1,6 +1,9 @@
+srcdir = @srcdir@
+VPATH = @srcdir@
 
 top_builddir=@top_builddir@
-INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/../apr/include -I$(srcdir)../../apr/include
-I$(srcdir)../include
+top_srcdir=@abs_srcdir@
+INCLUDES=-I$(top_builddir)/include -I$(top_srcdir)/include @APR_INCLUDES@
 
 TARGETS = apr_sha1.lo apr_md4.lo
 
Index: dbm/Makefile.in
===================================================================
RCS file: /home/cvs/apr-util/dbm/Makefile.in,v
retrieving revision 1.8
diff -u -r1.8 Makefile.in
--- dbm/Makefile.in	28 Nov 2001 17:34:17 -0000	1.8
+++ dbm/Makefile.in	31 Dec 2001 08:21:55 -0000
@@ -1,5 +1,9 @@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
 top_builddir=@top_builddir@
-INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/include/private -I$(top_builddir)/../apr/include
-I$(srcdir)../../apr/include -I$(srcdir)../include -I$(srcdir)../include/private
+top_srcdir=@abs_srcdir@
+INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/include/private -I$(top_srcdir)/include
-I$(top_srcdir)/include/private @APR_INCLUDES@
 
 TARGETS = apr_dbm.lo apr_dbm_berkeleydb.lo apr_dbm_gdbm.lo apr_dbm_sdbm.lo
 
Index: dbm/sdbm/Makefile.in
===================================================================
RCS file: /home/cvs/apr-util/dbm/sdbm/Makefile.in,v
retrieving revision 1.5
diff -u -r1.5 Makefile.in
--- dbm/sdbm/Makefile.in	13 Sep 2001 06:56:54 -0000	1.5
+++ dbm/sdbm/Makefile.in	31 Dec 2001 08:21:55 -0000
@@ -1,6 +1,9 @@
+srcdir = @srcdir@
+VPATH = @srcdir@
 
 top_builddir=@top_builddir@
-INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/../apr/include -I$(srcdir)../../../apr/include
-I$(srcdir)../../include
+top_srcdir=@abs_srcdir@
+INCLUDES=-I$(top_builddir)/include -I$(top_srcdir)/include @APR_INCLUDES@
 
 TARGETS = sdbm.lo sdbm_hash.lo sdbm_lock.lo sdbm_pair.lo
 
Index: encoding/Makefile.in
===================================================================
RCS file: /home/cvs/apr-util/encoding/Makefile.in,v
retrieving revision 1.8
diff -u -r1.8 Makefile.in
--- encoding/Makefile.in	13 Sep 2001 06:56:54 -0000	1.8
+++ encoding/Makefile.in	31 Dec 2001 08:21:55 -0000
@@ -1,6 +1,9 @@
+srcdir = @srcdir@
+VPATH = @srcdir@
 
 top_builddir=@top_builddir@
-INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/../apr/include -I$(srcdir)../../apr/include
-I$(srcdir)../include
+top_srcdir=@abs_srcdir@
+INCLUDES=-I$(top_builddir)/include -I$(top_srcdir)/include @APR_INCLUDES@
 
 TARGETS = apr_base64.lo
 
Index: hooks/Makefile.in
===================================================================
RCS file: /home/cvs/apr-util/hooks/Makefile.in,v
retrieving revision 1.7
diff -u -r1.7 Makefile.in
--- hooks/Makefile.in	13 Sep 2001 06:56:54 -0000	1.7
+++ hooks/Makefile.in	31 Dec 2001 08:21:55 -0000
@@ -1,6 +1,9 @@
+srcdir = @srcdir@
+VPATH = @srcdir@
 
 top_builddir=@top_builddir@
-INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/../apr/include -I$(srcdir)../../apr/include
-I$(srcdir)../include
+top_srcdir=@abs_srcdir@
+INCLUDES=-I$(top_builddir)/include -I$(top_srcdir)/include @APR_INCLUDES@
 
 TARGETS = apr_hooks.lo
 
Index: ldap/Makefile.in
===================================================================
RCS file: /home/cvs/apr-util/ldap/Makefile.in,v
retrieving revision 1.2
diff -u -r1.2 Makefile.in
--- ldap/Makefile.in	13 Sep 2001 06:56:55 -0000	1.2
+++ ldap/Makefile.in	31 Dec 2001 08:21:55 -0000
@@ -1,6 +1,9 @@
+srcdir = @srcdir@
+VPATH = @srcdir@
 
 top_builddir=@top_builddir@
-INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/../apr/include -I$(srcdir)../../apr/include
-I$(srcdir)../include
+top_srcdir=@abs_srcdir@
+INCLUDES=-I$(top_builddir)/include -I$(top_srcdir)/include @APR_INCLUDES@
 
 TARGETS = apr_ldap_compat.lo
 
Index: misc/Makefile.in
===================================================================
RCS file: /home/cvs/apr-util/misc/Makefile.in,v
retrieving revision 1.3
diff -u -r1.3 Makefile.in
--- misc/Makefile.in	13 Sep 2001 06:56:55 -0000	1.3
+++ misc/Makefile.in	31 Dec 2001 08:21:55 -0000
@@ -1,5 +1,9 @@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
 top_builddir=@top_builddir@
-INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/../apr/include -I$(srcdir)../../apr/include
-I$(srcdir)../include
+top_srcdir=@abs_srcdir@
+INCLUDES=-I$(top_builddir)/include -I$(top_srcdir)/include @APR_INCLUDES@
 
 TARGETS = apr_date.lo
 CLEAN_TARGETS = 
Index: test/Makefile.in
===================================================================
RCS file: /home/cvs/apr-util/test/Makefile.in,v
retrieving revision 1.16
diff -u -r1.16 Makefile.in
--- test/Makefile.in	24 Aug 2001 03:18:54 -0000	1.16
+++ test/Makefile.in	31 Dec 2001 08:21:55 -0000
@@ -1,5 +1,9 @@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
 top_builddir=@top_builddir@
-INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/include/private -I@APR_SOURCE_DIR@/include
+top_srcdir=@abs_srcdir@
+INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/include/private -I$(top_srcdir)/include
-I$(top_srcdir)/include @APR_INCLUDES@
 TARGETS =
 PROGRAMS = testdbm testdate testmd4 testxml
 
Index: uri/Makefile.in
===================================================================
RCS file: /home/cvs/apr-util/uri/Makefile.in,v
retrieving revision 1.12
diff -u -r1.12 Makefile.in
--- uri/Makefile.in	28 Nov 2001 23:47:54 -0000	1.12
+++ uri/Makefile.in	31 Dec 2001 08:21:55 -0000
@@ -1,5 +1,9 @@
+srcdir = @srcdir@
+VPATH = @srcdir@
+
 top_builddir=@top_builddir@
-INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/include/private -I$(top_builddir)/../apr/include
-I$(srcdir)../../apr/include -I$(srcdir)../include -I$(srcdir)../include/private
+top_srcdir=@abs_srcdir@
+INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/include/private -I$(top_srcdir)/include
-I$(top_srcdir)/include/private @APR_INCLUDES@
 
 TARGETS = $(top_builddir)/include/private/uri_delims.h apr_uri.lo
 CLEAN_TARGETS = gen_uri_delims $(top_builddir)/include/private/uri_delims.h
Index: xml/Makefile.in
===================================================================
RCS file: /home/cvs/apr-util/xml/Makefile.in,v
retrieving revision 1.8
diff -u -r1.8 Makefile.in
--- xml/Makefile.in	13 Sep 2001 06:56:55 -0000	1.8
+++ xml/Makefile.in	31 Dec 2001 08:21:55 -0000
@@ -1,6 +1,9 @@
+srcdir = @srcdir@
+VPATH = @srcdir@
 
 top_builddir=@top_builddir@
-INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/include/private -I$(top_builddir)/../apr/include
-I$(top_builddir)/xml/expat/lib -I$(srcdir)../../apr/include -I$(srcdir)../include -I$(srcdir)../../include/private
-I$(srcdir)/lib
+top_srcdir=@abs_srcdir@
+INCLUDES=-I$(top_builddir)/include -I$(top_builddir)/include/private -I$(top_builddir)/xml/expat/lib
-I$(top_srcdir)/include -I$(top_srcdir)/include/private -I$(srcdir)/lib @APR_INCLUDES@
 
 TARGETS = apr_xml.lo
 


Mime
View raw message