You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Thom May <th...@planetarytramp.net> on 2002/04/17 23:17:07 UTC

[PATCH] Cleanly enable VPATH builds

Hi,
currently to do a vpath build you have to create certain directories in
directory that you wish to build in, ie:
build/
srclib/{apr,apr-util,pcre,expat-lite}
docs/conf

This patch enables you to create a clean directory and run configure
directly. 
Cheers,
-Thom
-- 
Thom May -> thom@planetarytramp.net

   <srbaker> Overfiend: what's best?  new or used pussy?
 * stu hears the sound of #debian-devel opening up the fortunes file with $EDITOR


Index: acinclude.m4
===================================================================
RCS file: /home/cvspublic/httpd-2.0/acinclude.m4,v
retrieving revision 1.122
diff -u -u -r1.122 acinclude.m4
--- acinclude.m4	6 Apr 2002 22:00:56 -0000	1.122
+++ acinclude.m4	17 Apr 2002 20:18:04 -0000
@@ -28,8 +28,10 @@
     mkdir -p conftestdir/somedir >/dev/null 2>&1
     if test -d conftestdir/somedir; then
       ac_cv_mkdir_p=yes
+      mkdir_p="mkdir -p"
     else
       ac_cv_mkdir_p=no
+      mkdir_p="$top_srcdir/build/mkdir.sh"
     fi
     rm -rf conftestdir
   ])
@@ -103,13 +105,7 @@
 
   abs_srcdir="`(cd $srcdir && pwd)`"
 
-  APACHE_MKDIR_P_CHECK
   echo creating config_vars.mk
-  if test "$ac_cv_mkdir_p" = "yes"; then
-    mkdir_p="mkdir -p"
-  else
-    mkdir_p="$top_srcdir/build/mkdir.sh"
-  fi
   test -d build || $mkdir_p build
   > build/config_vars.mk
   for i in $APACHE_VAR_SUBST; do
Index: configure.in
===================================================================
RCS file: /home/cvspublic/httpd-2.0/configure.in,v
retrieving revision 1.215
diff -u -u -r1.215 configure.in
--- configure.in	12 Apr 2002 03:37:01 -0000	1.215
+++ configure.in	17 Apr 2002 20:18:08 -0000
@@ -47,6 +47,8 @@
 
 nl='
 '
+dnl Check that mkdir -p works
+APACHE_MKDIR_P_CHECK
 
 dnl ## Run configure for packages Apache uses
 
@@ -479,6 +481,9 @@
     fi
     ;;
 esac
+
+dnl Ensure that docs/conf is created.
+test -d docs/conf||$mkdir_p docs/conf
 
 AC_OUTPUT($APACHE_OUTPUT_FILES docs/conf/httpd-std.conf include/ap_config_layout.h support/apxs support/apachectl support/dbmmanage support/envvars-std support/log_server_status support/logresolve.pl support/phf_abuse_log.cgi support/split-logfile build/rules.mk,[true],[
   APACHE_GEN_MAKEFILES
Index: Makefile.in
===================================================================
RCS file: /home/cvspublic/httpd-2.0/Makefile.in,v
retrieving revision 1.106
diff -u -u -r1.106 Makefile.in
--- Makefile.in	12 Apr 2002 03:37:01 -0000	1.106
+++ Makefile.in	17 Apr 2002 20:18:08 -0000
@@ -31,6 +31,7 @@
 install-conf:
 	@echo Installing configuration files
 	@test -d $(sysconfdir) || $(MKINSTALLDIRS) $(sysconfdir)
+	@test -d $(top_builddir)/docs/conf || $(MKINSTALLDIRS) $(top_builddir)/docs/conf
 	@cd $(top_srcdir)/docs/conf; \
 	for i in mime.types magic; do \
 		$(INSTALL_DATA) $$i $(sysconfdir); \
 
---

Index: build/apr_common.m4
===================================================================
RCS file: /home/cvspublic/apr/build/apr_common.m4,v
retrieving revision 1.29
diff -u -u -r1.29 apr_common.m4
--- build/apr_common.m4	23 Mar 2002 16:18:35 -0000	1.29
+++ build/apr_common.m4	17 Apr 2002 18:56:07 -0000
@@ -58,9 +58,9 @@
 
   echo "configuring package in $1 now"
   ac_popdir=`pwd`
-  ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
   apr_config_subdirs="$1"
-  test -d $1 || $MKDIR $1
+  test -d $1 || $mkdir_p $1
+  ac_abs_srcdir=`(cd $srcdir/$1 && pwd)`
   cd $1
 
 changequote(, )dnl

Re: [PATCH] Cleanly enable VPATH builds

Posted by Justin Erenkrantz <je...@apache.org>.
On Wed, Apr 17, 2002 at 10:17:07PM +0100, Thom May wrote:
> Hi,
> currently to do a vpath build you have to create certain directories in
> directory that you wish to build in, ie:
> build/
> srclib/{apr,apr-util,pcre,expat-lite}
> docs/conf
> 
> This patch enables you to create a clean directory and run configure
> directly. 

Cool!

If no one reviews this patch soon-ish, I will do so.  -- justin

Re: [PATCH] Cleanly enable VPATH builds

Posted by Justin Erenkrantz <je...@apache.org>.
On Wed, Apr 17, 2002 at 10:17:07PM +0100, Thom May wrote:
> Hi,
> currently to do a vpath build you have to create certain directories in
> directory that you wish to build in, ie:
> build/
> srclib/{apr,apr-util,pcre,expat-lite}
> docs/conf
> 
> This patch enables you to create a clean directory and run configure
> directly. 
> Cheers,
> -Thom

Committed with some minor tweaks!  Thanks!  -- justin

Re: [PATCH] Cleanly enable VPATH builds

Posted by Justin Erenkrantz <je...@apache.org>.
On Wed, Apr 17, 2002 at 10:17:07PM +0100, Thom May wrote:
> Hi,
> currently to do a vpath build you have to create certain directories in
> directory that you wish to build in, ie:
> build/
> srclib/{apr,apr-util,pcre,expat-lite}
> docs/conf
> 
> This patch enables you to create a clean directory and run configure
> directly. 
> Cheers,
> -Thom

Committed with some minor tweaks!  Thanks!  -- justin

Re: [PATCH] Cleanly enable VPATH builds

Posted by Justin Erenkrantz <je...@apache.org>.
On Wed, Apr 17, 2002 at 10:17:07PM +0100, Thom May wrote:
> Hi,
> currently to do a vpath build you have to create certain directories in
> directory that you wish to build in, ie:
> build/
> srclib/{apr,apr-util,pcre,expat-lite}
> docs/conf
> 
> This patch enables you to create a clean directory and run configure
> directly. 

Cool!

If no one reviews this patch soon-ish, I will do so.  -- justin