Sitting around waiting for another install to complete due to the large
size of our manual, I wrote this patch to switch install-man and
install-htdocs to use rsync if available.  If it isn't available, it'll
fall back on the current cp and rm -rf .svn strategy.  (Tested with and
without rsync and it appears okay in my testing.)

This greatly speeds up installation.  =)  So, any objections to
committing?  -- justin

Index: Makefile.in
===================================================================
--- Makefile.in (revision 292616)
+++ Makefile.in (working copy)
@@ -122,8 +122,12 @@
         else \
            echo Installing HTML documents ; \
            $(MKINSTALLDIRS) $(DESTDIR)$(htdocsdir) ; \
-           test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * 
$(DESTDIR)$(htdocsdir)) ; \
-           cd $(DESTDIR)$(htdocsdir) && find . -name ".svn" -type d -print | 
xargs rm -rf 2>/dev/null || true; \
+           if test -d $(htdocs-srcdir) && test "x$(RSYNC)" != "x" && test -x 
$(RSYNC) ; then \
+               $(RSYNC) --exclude .svn -a $(htdocs-srcdir)/ 
$(DESTDIR)$(htdocsdir); \
+           else \
+               test -d $(htdocs-srcdir) && (cd $(htdocs-srcdir) && cp -rp * 
$(DESTDIR)$(htdocsdir)) ; \
+               cd $(DESTDIR)$(htdocsdir) && find . -name ".svn" -type d -print 
| xargs rm -rf 2>/dev/null || true; \
+           fi; \
        fi
 
 install-error:
@@ -201,8 +205,12 @@
        @test -d $(DESTDIR)$(manualdir)   || $(MKINSTALLDIRS) 
$(DESTDIR)$(manualdir)
        @cp -p $(top_srcdir)/docs/man/*.1 $(DESTDIR)$(mandir)/man1
        @cp -p $(top_srcdir)/docs/man/*.8 $(DESTDIR)$(mandir)/man8
-       @(cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir))
-       @(cd $(DESTDIR)$(manualdir) && find . -name ".svn" -type d -print | 
xargs rm -rf 2>/dev/null ) || true
+       @if test "x$(RSYNC)" != "x" && test -x $(RSYNC) ; then \
+         $(RSYNC) --exclude .svn -a $(top_srcdir)/docs/manual/ 
$(DESTDIR)$(manualdir); \
+       else \
+         cd $(top_srcdir)/docs/manual && cp -rp * $(DESTDIR)$(manualdir); \
+         cd $(DESTDIR)$(manualdir) && find . -name ".svn" -type d -print | 
xargs rm -rf 2>/dev/null; \
+       fi
 
 install-suexec:
        @if test -f $(builddir)/support/suexec; then \
Index: configure.in
===================================================================
--- configure.in        (revision 292616)
+++ configure.in        (working copy)
@@ -297,6 +297,7 @@
 
 AC_PATH_PROG(RM, rm)
 AC_PATH_PROG(PKGCONFIG, pkg-config)
+AC_PATH_PROG(RSYNC, rsync)
 AC_PROG_AWK
 AC_PROG_LN_S
 AC_CHECK_TOOL(RANLIB, ranlib, true)
Index: acinclude.m4
===================================================================
--- acinclude.m4        (revision 292616)
+++ acinclude.m4        (working copy)
@@ -75,6 +75,7 @@
   APACHE_SUBST(EXTRA_INCLUDES)
   APACHE_SUBST(LIBTOOL)
   APACHE_SUBST(SHELL)
+  APACHE_SUBST(RSYNC)
   APACHE_SUBST(MODULE_DIRS)
   APACHE_SUBST(MODULE_CLEANDIRS)
   APACHE_SUBST(PORT)

Reply via email to