On Friday 31 August 2001 07:48, Jeff Trawick wrote:

-1  This is where we were before I made the change a few weeks
ago.  APR-util relies on APR to build, duplicating the build logic
is a bad idea, because like all duplicate code, it opens up places
for bugs to hide.

Ryan

> "William A. Rowe, Jr." <[EMAIL PROTECTED]> 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
>
>  [EMAIL PROTECTED]@
> 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)

-- 

______________________________________________________________
Ryan Bloom                              [EMAIL PROTECTED]
Covalent Technologies                   [EMAIL PROTECTED]
--------------------------------------------------------------

Reply via email to