Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 44204 invoked by uid 500); 31 Aug 2001 14:46:07 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 44193 invoked from network); 31 Aug 2001 14:46:06 -0000 X-Authentication-Warning: rdu88-250-106.nc.rr.com: trawick set sender to trawick@attglobal.net using -f Sender: trawick@rdu88-250-106.nc.rr.com To: "William A. Rowe, Jr." Cc: Subject: Re: cvs commit: apr-util configure.in Makefile.in References: <20010831094754.12546.qmail@icarus.apache.org> <029301c13229$f90f4520$93c0b0d0@roweclan.net> From: Jeff Trawick Date: 31 Aug 2001 10:48:20 -0400 In-Reply-To: <029301c13229$f90f4520$93c0b0d0@roweclan.net> Message-ID: Lines: 83 User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N "William A. Rowe, Jr." writes: > Jeff, > > this will become a problem on Win32 as well, and it's pretty fragile. > > What if we institute a two-pass clean? Don't eliminate any dependencies on the > first go, and the distclean target can then mop up the obvious (.mk targets, generated > .h files, etc.) I think this would be safer, all the way around. Trying to toggle > build orders by model will just get messier and messier. What I have implemented/tested was my second suggestion -- copy apr's rules.mk into the apr-util tree at configuration time. apr-util already requires that apr was configured, so there is no additional dependency. Since apr-util has its own copy of rules.mk, the includes in apr-util makefiles still work regardless of the order of apr and apr-util in srclib/Makefile. Cool? That is simpler than a two-pass clean, and avoids a wasted second pass for certain operations (like normal make). Here is the patch: Index: srclib/apr-util/Makefile.in =================================================================== RCS file: /home/cvspublic/apr-util/Makefile.in,v retrieving revision 1.45 diff -u -r1.45 Makefile.in --- srclib/apr-util/Makefile.in 2001/08/31 09:47:53 1.45 +++ srclib/apr-util/Makefile.in 2001/08/31 14:31:50 @@ -17,7 +17,8 @@ CLEAN_TARGETS = $(TARGET_EXPORTS) DISTCLEAN_TARGETS = config.cache config.log config.status libtool \ include/private/apu_config.h include/private/apu_private.h \ - include/private/apu_select_dbm.h include/apu.h export_vars.sh + include/private/apu_select_dbm.h include/apu.h export_vars.sh \ + build/rules.mk EXTRACLEAN_TARGETS = configure aclocal.m4 include/private/apu_config.h.in prefix=@prefix@ Index: srclib/apr-util/configure.in =================================================================== RCS file: /home/cvspublic/apr-util/configure.in,v retrieving revision 1.34 diff -u -r1.34 configure.in --- srclib/apr-util/configure.in 2001/08/31 09:47:53 1.34 +++ srclib/apr-util/configure.in 2001/08/31 14:31:50 @@ -86,14 +86,26 @@ APR_ADDTO(LIBS,[$APRUTIL_EXPORT_LIBS]) dnl +dnl copy APR's build/rules.mk to our build directory; if we reference it +dnl from the APR directory then our "make *clean" is dependent on APR +dnl still being around +dnl +if cp $top_builddir/../apr/build/rules.mk $top_builddir/build/rules.mk; then + : +else + echo "Fatal error: APR hasn't been configured yet" + exit 1 +fi + +dnl dnl BSD/OS (BSDi) needs to use a different include syntax in the Makefiles dnl case "$host_alias" in *bsdi*) - INCLUDE_RULES=".include \"$top_builddir/../apr/build/rules.mk\"" + INCLUDE_RULES=".include \"$top_builddir/build/rules.mk\"" ;; *) - INCLUDE_RULES="include $top_builddir/../apr/build/rules.mk" + INCLUDE_RULES="include $top_builddir/build/rules.mk" ;; esac AC_SUBST(INCLUDE_RULES) -- Jeff Trawick | trawick@attglobal.net | PGP public key at web site: http://www.geocities.com/SiliconValley/Park/9289/ Born in Roswell... married an alien...