--On Sunday, January 19, 2003 3:26 AM -0500 Craig Rodrigues <[EMAIL PROTECTED]> 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

Reply via email to