Return-Path: Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 12345 invoked by uid 500); 19 Jan 2003 08:33:00 -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 12333 invoked from network); 19 Jan 2003 08:33:00 -0000 Date: Sun, 19 Jan 2003 00:33:10 -0800 From: Justin Erenkrantz Reply-To: Justin Erenkrantz To: Craig Rodrigues , dev@apr.apache.org Subject: Re: Attempt to unbreak apr-util build Message-ID: <2147483647.1042936390@[10.0.1.46]> In-Reply-To: <20030119082616.GA45809@attbi.com> References: <20030119082616.GA45809@attbi.com> X-Mailer: Mulberry/3.0.0 (Mac OS X) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Spam-Status: No, hits=-4.5 required=5.0 tests=IN_REP_TO,QUOTED_EMAIL_TEXT,RCS_FORMAT_PATCH,REFERENCES, REPLY_WITH_QUOTES version=2.50-cvs X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --On Sunday, January 19, 2003 3:26 AM -0500 Craig Rodrigues wrote: > Index: buildconf > =================================================================== > RCS file: /home/cvspublic/apr-util/buildconf,v > retrieving revision 1.6 > diff -u -r1.6 buildconf > --- buildconf 15 May 2002 16:51:52 -0000 1.6 > +++ buildconf 19 Jan 2003 08:24:35 -0000 > @@ -1,5 +1,35 @@ > #!/bin/sh > > +# > +# Check command-line arguments for: --with-apr=[directory] > +# which specifies the root directory of apr source code. > +# > +while test $# -ne 0 > +do > + apr_src_dir=`expr "x$1" : 'x\-\-with-apr=\(.*\)'` > + shift > +done I would take a look at how apu-config does its argument parsing (namely use case statements with pattern matching). That approach is much cleaner. > +if test -z "$apr_src_dir" > +then > + echo "" > + echo " --with-apr=[directory] not specified for apr source" > + echo "" > + exit 1 > +else > + echo "" > + echo "Looking for apr source in $apr_src_dir" > +fi My preference here would be to default to ../apr if --with-apr isn't specified. If --with-apr isn't specified and ../apr isn't present, then error out. But, it'd be nice to be able to work seamlessly with any new system. > +# Remove some files copied from apr source tree > +rm -rf build/apr_common.m4 build/find_apr.m4 build/install.sh > +rm -rf build/config.guess build/config.sub These shouldn't be directories, so -r shouldn't be needed. > +cp $apr_src_dir/build/apr_common.m4 build > +cp $apr_src_dir/build/find_apr.m4 build > +cp $apr_src_dir/build/install.sh build > +cp $apr_src_dir/build/config.guess build > +cp $apr_src_dir/build/config.sub build Much the same as you used multiple args to rm, I think you could do the same here - i.e. only do one cp command. > @@ -8,6 +38,7 @@ > # > echo "Creating include/private/apu_config.h ..." > ${AUTOHEADER:-autoheader} > + > > echo "Creating configure ..." > ### do some work to toss config.cache? That change is just gratutious. On the right track though. =) Woo-hoo! -- justin