]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Use rsync to install manual and htdocs to speed up installation times.
authorJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 30 Sep 2005 13:01:39 +0000 (13:01 +0000)
committerJustin Erenkrantz <jerenkrantz@apache.org>
Fri, 30 Sep 2005 13:01:39 +0000 (13:01 +0000)
* Makefile.in: Update install-man and install-htdocs to use rsync if available,
  otherwise fail back to current cp -rp and rm -rf .svn/ strategy.
* configure.in: Look for rsync.
* acinclude.m4: Include RSYNC in exported config_vars.mk

(Incorporates suggestions on rsync flags from colm.)

Reviewed by: colm, trawick (concept), niq (concept)

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@292718 13f79535-47bb-0310-9956-ffa450edef68

Makefile.in
acinclude.m4
configure.in

index 4e04dd05680b738a14bf647b939c93ca4d22d6d7..6cfe9639adf6c3a9e3c46d68b5c59cfde3359f23 100644 (file)
@@ -122,8 +122,12 @@ install-htdocs:
         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 -rlpt --numeric-ids $(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 @@ install-man:
        @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 -rlpt --numeric-ids $(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 34ae6726313b84726c0aad8e22eb3a21c55e270a..0998bf9f6bd173c482e4f8bbb4ed32f984032484 100644 (file)
@@ -75,6 +75,7 @@ AC_DEFUN(APACHE_GEN_CONFIG_VARS,[
   APACHE_SUBST(EXTRA_INCLUDES)
   APACHE_SUBST(LIBTOOL)
   APACHE_SUBST(SHELL)
+  APACHE_SUBST(RSYNC)
   APACHE_SUBST(MODULE_DIRS)
   APACHE_SUBST(MODULE_CLEANDIRS)
   APACHE_SUBST(PORT)
index 18008727ab4f45725af4a274cb3575f4d848b31b..902bb1331762a6d5ba70cd3ebf1af9781048a00b 100644 (file)
@@ -297,6 +297,7 @@ dnl ## Check for programs
 
 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)